Codota Logo
XmlSchemaComplexContentExtension
Code IndexAdd Codota to your IDE (free)

How to use
XmlSchemaComplexContentExtension
in
org.apache.ws.commons.schema

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

Refine searchRefine arrow

  • XmlSchemaContentModel
  • XmlSchemaComplexType
  • Common ways to obtain XmlSchemaComplexContentExtension
private void myMethod () {
XmlSchemaComplexContentExtension x =
  • Codota Iconnew XmlSchemaComplexContentExtension()
  • Smart code suggestions by Codota
}
origin: org.apache.cxf/cxf-core

public static QName getBaseType(XmlSchemaComplexType type) {
  XmlSchemaContentModel model = type.getContentModel();
  if (model == null) {
    return null;
  }
  XmlSchemaContent content = model.getContent();
  if (content == null) {
    return null;
  }
  if (!(content instanceof XmlSchemaComplexContentExtension)) {
    return null;
  }
  XmlSchemaComplexContentExtension ext = (XmlSchemaComplexContentExtension)content;
  return ext.getBaseTypeName();
}
origin: apache/cxf

public static XmlSchemaSequence getContentSequence(XmlSchemaComplexType type) {
  XmlSchemaContentModel model = type.getContentModel();
  if (model == null) {
    return null;
  }
  XmlSchemaContent content = model.getContent();
  if (content == null) {
    return null;
  }
  if (!(content instanceof XmlSchemaComplexContentExtension)) {
    return null;
  }
  XmlSchemaComplexContentExtension ext = (XmlSchemaComplexContentExtension)content;
  XmlSchemaParticle particle = ext.getParticle();
  if (particle == null) {
    return null;
  }
  XmlSchemaSequence sequence = null;
  try {
    sequence = (XmlSchemaSequence) particle;
  } catch (ClassCastException cce) {
    unsupportedConstruct("NON_SEQUENCE_PARTICLE", type);
  }
  return sequence;
}
origin: apache/cxf

public static List<XmlSchemaAttributeOrGroupRef> getContentAttributes(XmlSchemaComplexType type) {
  XmlSchemaContentModel model = type.getContentModel();
  if (model == null) {
    return null;
  }
  XmlSchemaContent content = model.getContent();
  if (content == null) {
    return null;
  }
  if (!(content instanceof XmlSchemaComplexContentExtension)) {
    return null;
  }
  XmlSchemaComplexContentExtension ext = (XmlSchemaComplexContentExtension)content;
  return ext.getAttributes();
}
origin: apache/cxf

XmlSchemaSequence seq = (XmlSchemaSequence)type.getParticle();
if (seq == null && type.getContentModel() != null) {
  XmlSchemaContent xmlSchemaConent = type.getContentModel().getContent();
  if (xmlSchemaConent instanceof XmlSchemaComplexContentExtension) {
    XmlSchemaComplexContentExtension extension = (XmlSchemaComplexContentExtension)type
      .getContentModel().getContent();
    QName baseTypeName = extension.getBaseTypeName();
    XmlSchemaType schemaType = schema.getTypeByQName(baseTypeName);
    if (schemaType instanceof XmlSchemaComplexType) {
    if (extension.getParticle() instanceof XmlSchemaSequence) {
      XmlSchemaSequence xmlSchemaSeq = (XmlSchemaSequence)extension.getParticle();
      qnames.addAll(createWrappedElements(xmlSchemaSeq));
origin: org.apache.axis2/axis2-kernel

XmlSchemaComplexType complexType = new XmlSchemaComplexType(xmlSchema, false);
XmlSchemaSequence sequence = new XmlSchemaSequence();
XmlSchemaComplexContentExtension complexExtension =
    new XmlSchemaComplexContentExtension();
  complexExtension.setBaseTypeName(basetype);
  complexExtension.setParticle(sequence);
  XmlSchemaComplexContent contentModel = new XmlSchemaComplexContent();
  contentModel.setContent(complexExtension);
  complexType.setContentModel(contentModel);
  complexType.setParticle(sequence);
origin: org.apache.tuscany.sca/tuscany-base-runtime

public void processXMLSchemaObject(String toNamespace, XmlSchemaObject obj,  XmlSchemaObject fixUpObj){
  if (obj instanceof XmlSchemaComplexType){
    processXMLSchemaObject(toNamespace, ((XmlSchemaComplexType)obj).getParticle(), fixUpObj);
    processXMLSchemaObject(toNamespace, ((XmlSchemaComplexType)obj).getContentModel(), fixUpObj);
  } else if (obj instanceof XmlSchemaComplexContent){
    processXMLSchemaObject(toNamespace, ((XmlSchemaComplexContent)obj).getContent(), fixUpObj);            
  } else if (obj instanceof XmlSchemaElement){
    XmlSchemaElement element = (XmlSchemaElement)obj;
    if(element.getSchemaType() == fixUpObj){
      QName name = element.getSchemaTypeName();
      QName newName = new QName(toNamespace, name.getLocalPart());
      element.setSchemaTypeName(newName);
    }
    ((XmlSchemaElement)obj).getSchemaType();
  } else if (obj instanceof XmlSchemaGroupBase){
    XmlSchemaObjectCollection items = ((XmlSchemaGroupBase)obj).getItems();
    Iterator<XmlSchemaObject> iter = items.getIterator();
    while(iter.hasNext()){
      processXMLSchemaObject(toNamespace, iter.next(), fixUpObj);
    }
  } else if (obj instanceof XmlSchemaComplexContentExtension){
    XmlSchemaComplexContentExtension extension = (XmlSchemaComplexContentExtension)obj;
    QName name = extension.getBaseTypeName();
    QName newName = new QName(toNamespace, name.getLocalPart());
    extension.setBaseTypeName(newName);
  }
  // TODO - what other structure items will be generated by JAXB?
}    

origin: org.apache.axis2/axis2-jaxbri

XmlSchemaComplexType complexType = new XmlSchemaComplexType(xmlSchema, false);
XmlSchemaSequence sequence = new XmlSchemaSequence();
XmlSchemaComplexContentExtension complexExtension =
    new XmlSchemaComplexContentExtension();
  complexExtension.setBaseTypeName(basetype);
  complexExtension.setParticle(sequence);
  XmlSchemaComplexContent contentModel = new XmlSchemaComplexContent();
  contentModel.setContent(complexExtension);
  complexType.setContentModel(contentModel);
  complexType.setParticle(sequence);
origin: apache/cxf

  return;
XmlSchemaContent content = contentModel.getContent();
if (content == null) {
  return;
  XmlSchemaUtils.addImportIfNeeded(schema, extension.getBaseTypeName());
  addCrossImportsAttributeList(schema, extension.getAttributes());
  XmlSchemaParticle particle = extension.getParticle();
  if (particle instanceof XmlSchemaSequence) {
    addCrossImports(schema, (XmlSchemaSequence)particle);
origin: org.apache.axis2/axis2-adb-codegen

private static void processComplexContentModel(XmlSchemaComplexType cmplxType,
                        TypeMapper mapper,
                        String opName,
                        Map<String,XmlSchema> schemaMap,
                        String qnameSuffix) {
  XmlSchemaContentModel contentModel = cmplxType.getContentModel();
  if (contentModel instanceof XmlSchemaComplexContent) {
    XmlSchemaComplexContent xmlSchemaComplexContent = (XmlSchemaComplexContent) contentModel;
    XmlSchemaContent content = xmlSchemaComplexContent.getContent();
    if (content instanceof XmlSchemaComplexContentExtension) {
      XmlSchemaComplexContentExtension schemaExtension = (XmlSchemaComplexContentExtension) content;
      // process particles inside this extension, if any
      processSchemaSequence(schemaExtension.getParticle(), mapper, opName, schemaMap, qnameSuffix);
       XmlSchemaType extensionSchemaType = null;
      for (XmlSchema xmlSchema : schemaMap.values()) {
        extensionSchemaType = getSchemaType(xmlSchema,schemaExtension.getBaseTypeName());
        if (extensionSchemaType != null){
          break;
        }
      }
      processXMLSchemaComplexType(extensionSchemaType, mapper, opName, schemaMap, qnameSuffix);
    }
  }
}
origin: apache/axis2-java

if (!isAlreadyProcessed(extension.getBaseTypeName())) {
  XmlSchema resolvedSchema = getParentSchema(parentSchema, extension.getBaseTypeName(),
                        COMPONENT_TYPE);
  if (resolvedSchema == null) {
    throw new SchemaCompilationException("can not find the compley type " +
                       extension.getBaseTypeName()
                       + " from the parent type " +
                       parentSchema.getTargetNamespace());
  } else {
    XmlSchemaType type = resolvedSchema.getTypeByName(extension.getBaseTypeName());
    if (type instanceof XmlSchemaComplexType) {
      XmlSchemaComplexType complexType = (XmlSchemaComplexType) type;
      if (complexType.getName() != null) {
        processNamedComplexSchemaType(complexType, resolvedSchema);
      } else {
copyMetaInfoHierarchy(metaInfHolder, extension.getBaseTypeName(), parentSchema);
if (extension.getParticle() != null) {
  processParticle(extension.getBaseTypeName(), extension.getParticle(), metaInfHolder,
          parentSchema);
processAttributes(extension.getAttributes(), metaInfHolder, parentSchema);
XmlSchemaAnyAttribute anyAtt = extension.getAnyAttribute();
if (anyAtt != null) {
  processAnyAttribute(metaInfHolder, anyAtt);
origin: org.apache.axis2/axis2-adb-codegen

if (complexType.getContentModel() != null) {
  XmlSchemaContentModel content = complexType.getContentModel();
  if (content instanceof XmlSchemaComplexContent) {
    XmlSchemaComplexContent complexContent =
                 extension.getBaseTypeName(),
                 resolvedSchema);
origin: apache/cxf

protected Struct processComplexContentStruct(XmlSchemaComplexContent complex, QName defaultName,
                       Struct corbaStruct, QName schematypeName)
  throws Exception {
  if (complex.getContent() instanceof XmlSchemaComplexContentExtension) {
    XmlSchemaComplexContentExtension extype
      = (XmlSchemaComplexContentExtension)complex.getContent();
    QName extName = extype.getBaseTypeName();
    corbaStruct = processComplexContentStructParticle(extype.getParticle(), defaultName, corbaStruct,
                           schematypeName, extName, extype.getAttributes());
  } else {
    if (complex.getContent() instanceof XmlSchemaComplexContentRestriction) {
      XmlSchemaComplexContentRestriction extype
        = (XmlSchemaComplexContentRestriction)complex.getContent();
      QName extName = extype.getBaseTypeName();
      corbaStruct =
        processComplexContentStructParticle(extype.getParticle(), defaultName,
                        corbaStruct, schematypeName,
                        extName, extype.getAttributes());
    }
  }
  return corbaStruct;
}
origin: org.apache.ws.commons.schema/XmlSchema

private XmlSchemaComplexContentExtension handleComplexContentExtension(
    XmlSchema schema, Element extEl, Element schemaEl) {
  XmlSchemaComplexContentExtension ext = new XmlSchemaComplexContentExtension();
  if (extEl.hasAttribute("base")) {
    String name = extEl.getAttribute("base");
    ext.baseTypeName = getRefQName(name, extEl);
  }
  for (Element el = XDOMUtil.getFirstChildElementNS(extEl,
      XmlSchema.SCHEMA_NS); el != null; el = XDOMUtil
      .getNextSiblingElementNS(el, XmlSchema.SCHEMA_NS)) {
    if (el.getLocalName().equals("sequence")) {
      ext.particle = handleSequence(schema, el, schemaEl);
    } else if (el.getLocalName().equals("choice")) {
      ext.particle = handleChoice(schema, el, schemaEl);
    } else if (el.getLocalName().equals("all")) {
      ext.particle = handleAll(schema, el, schemaEl);
    } else if (el.getLocalName().equals("attribute")) {
      ext.attributes.add(handleAttribute(schema, el, schemaEl));
    } else if (el.getLocalName().equals("attributeGroup")) {
      ext.attributes.add(handleAttributeGroupRef(el));
    } else if (el.getLocalName().equals("group")) {
      ext.particle = handleGroupRef(schema, el, schemaEl);
    } else if (el.getLocalName().equals("anyAttribute")) {
      ext.anyAttribute = handleAnyAttribute(schema, el, schemaEl);
    } else if (el.getLocalName().equals("annotation")) {
      ext.setAnnotation(handleAnnotation(el));
    }
  }
  return ext;
}
origin: apache/cxf

private static boolean isWrappableSequence(XmlSchemaComplexType type, String namespaceURI,
                      MessageInfo wrapper, boolean allowRefs) {
  if (!hasAttributes(type)) {
    if (type.getParticle() instanceof XmlSchemaSequence) {
      XmlSchemaSequence seq = (XmlSchemaSequence)type.getParticle();
      return buildMessageParts(seq, namespaceURI, wrapper, allowRefs);
    } else if (type.getParticle() == null) {
      if (type.getContentModel() == null) {
        return true;
      if (type.getContentModel().getContent() instanceof XmlSchemaComplexContentExtension) {
        XmlSchemaComplexContentExtension extension = (XmlSchemaComplexContentExtension)type
          .getContentModel().getContent();
        QName baseTypeName = extension.getBaseTypeName();
        ServiceInfo serviceInfo = wrapper.getOperation().getInterface().getService();
        XmlSchemaType schemaType = serviceInfo.getXmlSchemaCollection().getTypeByQName(baseTypeName);
        if (extension.getParticle() instanceof XmlSchemaSequence) {
          XmlSchemaSequence seq = (XmlSchemaSequence)extension.getParticle();
          return buildMessageParts(seq, namespaceURI, wrapper, allowRefs);
origin: apache/axis2-java

XmlSchemaComplexType complexType = new XmlSchemaComplexType(xmlSchema, false);
XmlSchemaSequence sequence = new XmlSchemaSequence();
XmlSchemaComplexContentExtension complexExtension =
    new XmlSchemaComplexContentExtension();
  complexExtension.setBaseTypeName(basetype);
  complexExtension.setParticle(sequence);
  XmlSchemaComplexContent contentModel = new XmlSchemaComplexContent();
  contentModel.setContent(complexExtension);
  complexType.setContentModel(contentModel);
  complexType.setParticle(sequence);
origin: org.apache.tuscany.sca/tuscany-binding-ws-wsdlgen

public void processXMLSchemaObject(String toNamespace, XmlSchemaObject obj,  XmlSchemaObject fixUpObj){
  if (obj instanceof XmlSchemaComplexType){
    processXMLSchemaObject(toNamespace, ((XmlSchemaComplexType)obj).getParticle(), fixUpObj);
    processXMLSchemaObject(toNamespace, ((XmlSchemaComplexType)obj).getContentModel(), fixUpObj);
  } else if (obj instanceof XmlSchemaComplexContent){
    processXMLSchemaObject(toNamespace, ((XmlSchemaComplexContent)obj).getContent(), fixUpObj);            
  } else if (obj instanceof XmlSchemaElement){
    XmlSchemaElement element = (XmlSchemaElement)obj;
    if(element.getSchemaType() == fixUpObj){
      QName name = element.getSchemaTypeName();
      QName newName = new QName(toNamespace, name.getLocalPart());
      element.setSchemaTypeName(newName);
    }
    ((XmlSchemaElement)obj).getSchemaType();
  } else if (obj instanceof XmlSchemaGroupBase){
    XmlSchemaObjectCollection items = ((XmlSchemaGroupBase)obj).getItems();
    Iterator<XmlSchemaObject> iter = items.getIterator();
    while(iter.hasNext()){
      processXMLSchemaObject(toNamespace, iter.next(), fixUpObj);
    }
  } else if (obj instanceof XmlSchemaComplexContentExtension){
    XmlSchemaComplexContentExtension extension = (XmlSchemaComplexContentExtension)obj;
    QName name = extension.getBaseTypeName();
    QName newName = new QName(toNamespace, name.getLocalPart());
    extension.setBaseTypeName(newName);
  }
  // TODO - what other structure items will be generated by JAXB?
}    

origin: apache/axis2-java

XmlSchemaComplexType complexType = new XmlSchemaComplexType(xmlSchema, false);
XmlSchemaSequence sequence = new XmlSchemaSequence();
XmlSchemaComplexContentExtension complexExtension =
    new XmlSchemaComplexContentExtension();
  complexExtension.setBaseTypeName(basetype);
  complexExtension.setParticle(sequence);
  XmlSchemaComplexContent contentModel = new XmlSchemaComplexContent();
  contentModel.setContent(complexExtension);
  complexType.setContentModel(contentModel);
  complexType.setParticle(sequence);
origin: org.apache.cxf/cxf-core

  return;
XmlSchemaContent content = contentModel.getContent();
if (content == null) {
  return;
  XmlSchemaUtils.addImportIfNeeded(schema, extension.getBaseTypeName());
  addCrossImportsAttributeList(schema, extension.getAttributes());
  XmlSchemaParticle particle = extension.getParticle();
  if (particle instanceof XmlSchemaSequence) {
    addCrossImports(schema, (XmlSchemaSequence)particle);
origin: apache/axis2-java

private static void processComplexContentModel(XmlSchemaComplexType cmplxType,
                        TypeMapper mapper,
                        String opName,
                        Map<String,XmlSchema> schemaMap,
                        String qnameSuffix) {
  XmlSchemaContentModel contentModel = cmplxType.getContentModel();
  if (contentModel instanceof XmlSchemaComplexContent) {
    XmlSchemaComplexContent xmlSchemaComplexContent = (XmlSchemaComplexContent) contentModel;
    XmlSchemaContent content = xmlSchemaComplexContent.getContent();
    if (content instanceof XmlSchemaComplexContentExtension) {
      XmlSchemaComplexContentExtension schemaExtension = (XmlSchemaComplexContentExtension) content;
      // process particles inside this extension, if any
      processSchemaSequence(schemaExtension.getParticle(), mapper, opName, schemaMap, qnameSuffix);
       XmlSchemaType extensionSchemaType = null;
      for (XmlSchema xmlSchema : schemaMap.values()) {
        extensionSchemaType = getSchemaType(xmlSchema,schemaExtension.getBaseTypeName());
        if (extensionSchemaType != null){
          break;
        }
      }
      processXMLSchemaComplexType(extensionSchemaType, mapper, opName, schemaMap, qnameSuffix);
    }
  }
}
origin: org.apache.axis2/axis2-adb-codegen

if (!isAlreadyProcessed(extension.getBaseTypeName())) {
  XmlSchema resolvedSchema = getParentSchema(parentSchema, extension.getBaseTypeName(),
                        COMPONENT_TYPE);
  if (resolvedSchema == null) {
    throw new SchemaCompilationException("can not find the compley type " +
                       extension.getBaseTypeName()
                       + " from the parent type " +
                       parentSchema.getTargetNamespace());
  } else {
    XmlSchemaType type = resolvedSchema.getTypeByName(extension.getBaseTypeName());
    if (type instanceof XmlSchemaComplexType) {
      XmlSchemaComplexType complexType = (XmlSchemaComplexType) type;
      if (complexType.getName() != null) {
        processNamedComplexSchemaType(complexType, resolvedSchema);
      } else {
copyMetaInfoHierarchy(metaInfHolder, extension.getBaseTypeName(), parentSchema);
if (extension.getParticle() != null) {
  processParticle(extension.getBaseTypeName(), extension.getParticle(), metaInfHolder,
          parentSchema);
processAttributes(extension.getAttributes(), metaInfHolder, parentSchema);
XmlSchemaAnyAttribute anyAtt = extension.getAnyAttribute();
if (anyAtt != null) {
  processAnyAttribute(metaInfHolder, anyAtt);
org.apache.ws.commons.schemaXmlSchemaComplexContentExtension

Javadoc

Class for complex types with a complex content model derived by extension. Extends the complex type by adding attributes or elements. Represents the World Wide Web Consortium (W3C) extension element for complex content.

Most used methods

  • getBaseTypeName
  • getParticle
  • <init>
    Creates new XmlSchemaComplexContentExtension
  • getAttributes
  • setBaseTypeName
  • setParticle
  • setAnnotation
  • getAnyAttribute

Popular in Java

  • Running tasks concurrently on multiple threads
  • onRequestPermissionsResult (Fragment)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • startActivity (Activity)
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • DataSource (javax.sql)
    A factory for connections to the physical data source that this DataSource object represents. An alt
  • Runner (org.openjdk.jmh.runner)
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