Codota Logo
XmlSchemaElement.getSchemaType
Code IndexAdd Codota to your IDE (free)

How to use
getSchemaType
method
in
org.apache.ws.commons.schema.XmlSchemaElement

Best Java code snippets using org.apache.ws.commons.schema.XmlSchemaElement.getSchemaType (Showing top 20 results out of 315)

  • Common ways to obtain XmlSchemaElement
private void myMethod () {
XmlSchemaElement x =
  • Codota Iconnew XmlSchemaElement()
  • Codota IconXmlSchema schema;QName name;schema.getElementByName(name)
  • Codota IconXmlSchemaCollection schemaCollection;QName qname;schemaCollection.getElementByQName(qname)
  • Smart code suggestions by Codota
}
origin: stackoverflow.com

 @Override
public List<QName> getChildElementNames(QName parentElementName) {
  XmlSchemaElement element = xmlSchemaCollection.getElementByQName(parentElementName);
  XmlSchemaType type = element != null ? element.getSchemaType() : null;

  List<QName> result = new LinkedList<>();
  if (type instanceof XmlSchemaComplexType) {
    addElementNames(result, (XmlSchemaComplexType) type);
  }
  return result;
}
origin: org.wso2.carbon.data/org.wso2.carbon.dataservices.core

/**
 * Extracts the schema type from the given element.
 * @param cparams The common parameters used in the schema generator
 * @param element The element the type will be extract from
 * @return The element type
 */
private static XmlSchemaComplexType extractElementSchemaType(CommonParams cparams,
    XmlSchemaElement element) {
  XmlSchemaComplexType type = (XmlSchemaComplexType) element.getSchemaType();
  /* if null, this must be globally defined */
  if (type == null) {
    type = cparams.getTypeMap().get(element.getSchemaTypeName());
  }
  return type;
}
origin: org.apache.axis2/axis2-kernel

protected XmlSchemaComplexType getComplexTypeForElement(XmlSchema xmlSchema, QName name) {
  for (XmlSchemaObject object : xmlSchema.getItems()) {
    if (object instanceof XmlSchemaElement && ((XmlSchemaElement) object).getQName().equals(name)) {
      XmlSchemaComplexType xmlSchemaComplexType = (XmlSchemaComplexType) ((XmlSchemaElement) object).getSchemaType();
      if ((xmlSchemaComplexType == null) && (((XmlSchemaElement) object).getSchemaTypeName() != null)) {
        xmlSchemaComplexType =
            (XmlSchemaComplexType) xmlSchema.getTypeByName(((XmlSchemaElement) object).getSchemaTypeName());
      }
      return xmlSchemaComplexType;
    }
  }
  return null;
}
origin: org.apache.axis2/axis2-adb-codegen

/**
 * Checks whether a given element is a binary element
 *
 * @param elt
 */
private boolean isBinary(XmlSchemaElement elt) {
  return elt.getSchemaType() != null &&
      SchemaConstants.XSD_BASE64.equals(elt.getSchemaType().getQName());
}
origin: apache/axis2-java

protected XmlSchemaComplexType getComplexTypeForElement(XmlSchema xmlSchema, QName name) {
  for (XmlSchemaObject object : xmlSchema.getItems()) {
    if (object instanceof XmlSchemaElement && ((XmlSchemaElement) object).getQName().equals(name)) {
      XmlSchemaComplexType xmlSchemaComplexType = (XmlSchemaComplexType) ((XmlSchemaElement) object).getSchemaType();
      if ((xmlSchemaComplexType == null) && (((XmlSchemaElement) object).getSchemaTypeName() != null)) {
        xmlSchemaComplexType =
            (XmlSchemaComplexType) xmlSchema.getTypeByName(((XmlSchemaElement) object).getSchemaTypeName());
      }
      return xmlSchemaComplexType;
    }
  }
  return null;
}
origin: apache/axis2-java

/**
 * Checks whether a given element is a binary element
 *
 * @param elt
 */
private boolean isBinary(XmlSchemaElement elt) {
  return elt.getSchemaType() != null &&
      SchemaConstants.XSD_BASE64.equals(elt.getSchemaType().getQName());
}
origin: apache/cxf

private static void factorySetupType(XmlSchemaElement element, SchemaCollection schemaCollection,
                   ParticleInfo elementInfo) {
  elementInfo.type = element.getSchemaType();
  if (elementInfo.type == null) {
    if (element.getSchemaTypeName() == null // no type at all -> anyType
      || element.getSchemaTypeName().equals(Constants.XSD_ANYTYPE)) {
      elementInfo.anyType = true;
    } else {
      elementInfo.type = schemaCollection.getTypeByQName(element.getSchemaTypeName());
      if (elementInfo.type == null
        && !element.getSchemaTypeName()
            .getNamespaceURI().equals(Constants.URI_2001_SCHEMA_XSD)) {
        JavascriptUtils.unsupportedConstruct("MISSING_TYPE", element.getSchemaTypeName()
            .toString(), element.getQName(), element);
      }
    }
  } else if (elementInfo.type.getQName() != null
    && Constants.XSD_ANYTYPE.equals(elementInfo.type.getQName())) {
    elementInfo.anyType = true;
  }
}
origin: org.codehaus.xfire/xfire-core

private XmlSchemaElement getWrappedSchema(Message message)
{
  Part part = (Part) message.getParts().values().iterator().next();
  
  XmlSchemaElement schemaEl = schemas.getElementByQName(part.getElementName());
  
  if (schemaEl.getSchemaType() instanceof XmlSchemaComplexType)
    return schemaEl;
  
  return null;
}
 
origin: org.apache.openejb/openejb-axis

private void addGlobalElement(final XmlSchemaElement element) {
  // Nested anonymous type
  QName xmlType = element.getSchemaTypeName();
  if (xmlType == null) {
    // Rule 1.b: Anonymous type inside an element ">E"
    xmlType = new QName(element.getQName().getNamespaceURI(), ">" + element.getQName().getLocalPart());
    addType(xmlType, element.getSchemaType());
  }
  // create the XmlElementInfo
  final XmlElementInfo elementInfo = createXmlElementInfo(element.getQName(), xmlType, element);
  xmlElements.put(element.getQName(), elementInfo);
}
origin: org.wso2.carbon.data/org.wso2.carbon.dataservices.core

private static XmlSchemaComplexType getRowNameBasedSchemaComplexType(
    XmlSchemaComplexType wrapperSchemaComplexType) {
  return (((XmlSchemaComplexType) ((XmlSchemaElement) ((XmlSchemaSequence) wrapperSchemaComplexType
      .getParticle()).getItems().getItem(0)).getSchemaType()));
}
 
origin: apache/cxf

private void addElementCrossImportsElement(XmlSchema schema, XmlSchemaElement item) {
  XmlSchemaElement element = item;
  XmlSchemaUtils.addImportIfNeeded(schema, element.getRef().getTargetQName());
  XmlSchemaUtils.addImportIfNeeded(schema, element.getSchemaTypeName());
  // if there's an anonymous type, it might have element refs in it.
  XmlSchemaType schemaType = element.getSchemaType();
  if (!crossImportsAdded(schema, schemaType)) {
    addCrossImportsType(schema, schemaType);
  }
}
origin: apache/cxf

public static XmlSchemaType getXmlSchemaType(ServiceInfo serviceInfo, QName name) {
  XmlSchemaType result = null;
  if ((name != null) && (serviceInfo != null)) {
    SchemaCollection col = serviceInfo.getXmlSchemaCollection();
    result = col.getTypeByQName(name);
    if (result == null) {
      //check the name, if it is an element
      XmlSchemaElement el = col.getElementByQName(name);
      if (el != null) {
        result = el.getSchemaType();
      }
    }
  }
  return result;
}
origin: org.apache.cxf/cxf-api

private void addElementCrossImportsElement(XmlSchema schema, XmlSchemaElement item) {
  XmlSchemaElement element = item;
  XmlSchemaUtils.addImportIfNeeded(schema, element.getRef().getTargetQName());
  XmlSchemaUtils.addImportIfNeeded(schema, element.getSchemaTypeName());
  // if there's an anonymous type, it might have element refs in it.
  XmlSchemaType schemaType = element.getSchemaType();
  if (!crossImportsAdded(schema, schemaType)) {
    addCrossImportsType(schema, schemaType);
  }
}
origin: apache/cxf

protected XmlSchemaType lookUpType(Part part) {
  XmlSchemaType schemaType = null;
  for (XmlSchema xmlSchema : xmlSchemaList.getXmlSchemas()) {
    if (part.getElementName() != null) {
      XmlSchemaElement schemaElement = xmlSchema.getElementByName(part.getElementName());
      if (schemaElement != null) {
        schemaType = schemaElement.getSchemaType();
      }
    } else {
      if (part.getTypeName() != null) {
        schemaType = xmlSchema.getTypeByName(part.getTypeName());
      }
    }
    if (schemaType != null) {
      return schemaType;
    }
  }
  return schemaType;
}
origin: org.apache.cxf/cxf-core

private void addElementCrossImportsElement(XmlSchema schema, XmlSchemaElement item) {
  XmlSchemaElement element = item;
  XmlSchemaUtils.addImportIfNeeded(schema, element.getRef().getTargetQName());
  XmlSchemaUtils.addImportIfNeeded(schema, element.getSchemaTypeName());
  // if there's an anonymous type, it might have element refs in it.
  XmlSchemaType schemaType = element.getSchemaType();
  if (!crossImportsAdded(schema, schemaType)) {
    addCrossImportsType(schema, schemaType);
  }
}
origin: org.apache.tuscany.sca/tuscany-base-runtime

private static ElementInfo getElementInfo(XmlSchemaElement element) {
  if (element == null) {
    return null;
  }
  ElementInfo elementInfo = new ElementInfo(element.getQName(), getTypeInfo(element.getSchemaType()));
  elementInfo.setMany(element.getMaxOccurs() > 1);
  elementInfo.setNillable(element.isNillable());
  elementInfo.setOmissible(element.getMinOccurs()==0);
  return elementInfo;
}
origin: org.apache.cxf/cxf-common-utilities

private void addElementCrossImportsElement(XmlSchema schema, XmlSchemaElement item) {
  XmlSchemaElement element = (XmlSchemaElement)item;
  XmlSchemaUtils.addImportIfNeeded(schema, element.getRef().getTargetQName());
  XmlSchemaUtils.addImportIfNeeded(schema, element.getSchemaTypeName());
  // if there's an anonymous type, it might have element refs in it.
  XmlSchemaType schemaType = element.getSchemaType();
  if (!crossImportsAdded(schema, schemaType)) {
    addCrossImportsType(schema, schemaType);
  }
}
origin: org.apache.tuscany.sca/tuscany-interface-wsdl

private static ElementInfo getElementInfo(XmlSchemaElement element) {
  if (element == null) {
    return null;
  }
  ElementInfo elementInfo = new ElementInfo(element.getQName(), getTypeInfo(element.getSchemaType()));
  elementInfo.setMany(element.getMaxOccurs() > 1);
  elementInfo.setNillable(element.isNillable());
  elementInfo.setOmissible(element.getMinOccurs()==0);
  return elementInfo;
}
origin: org.apache.cxf/cxf-bundle-jaxrs

private void addElementCrossImportsElement(XmlSchema schema, XmlSchemaElement item) {
  XmlSchemaElement element = item;
  XmlSchemaUtils.addImportIfNeeded(schema, element.getRef().getTargetQName());
  XmlSchemaUtils.addImportIfNeeded(schema, element.getSchemaTypeName());
  // if there's an anonymous type, it might have element refs in it.
  XmlSchemaType schemaType = element.getSchemaType();
  if (!crossImportsAdded(schema, schemaType)) {
    addCrossImportsType(schema, schemaType);
  }
}
origin: org.fabric3/fabric3-interface-wsdl

private XSDType getElementDataType(QName elementName, XmlSchemaCollection collection, PortType portType, IntrospectionContext context) {
  XmlSchemaElement element = collection.getElementByQName(elementName);
  if (element == null) {
    SchemaTypeNotFound error = new SchemaTypeNotFound("Schema type " + elementName + " not found referenced in: " + portType.getQName());
    context.addError(error);
    return null;
  }
  XmlSchemaType type = element.getSchemaType();
  if (type == null) {
    SchemaTypeNotFound error = new SchemaTypeNotFound("Invalid schema type " + elementName + " referenced in: " + portType.getQName());
    context.addError(error);
    return null;
  }
  return createDataType(type, elementName);
}
org.apache.ws.commons.schemaXmlSchemaElementgetSchemaType

Popular methods of XmlSchemaElement

  • getSchemaTypeName
  • getQName
  • getName
  • getRef
  • <init>
  • getMinOccurs
  • isNillable
  • setName
  • setSchemaTypeName
  • getMaxOccurs
  • setSchemaType
  • setMaxOccurs
  • setSchemaType,
  • setMaxOccurs,
  • setMinOccurs,
  • setNillable,
  • getRefName,
  • getDefaultValue,
  • getWireName,
  • isRef,
  • addMetaInfo

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSystemService (Context)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • onCreateOptionsMenu (Activity)
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • ResourceBundle (java.util)
    Resource bundles contain locale-specific objects. When your program needs a locale-specific resource
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Collectors (java.util.stream)
  • BoxLayout (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now