Codota Logo
XmlSchemaComplexType.getAttributes
Code IndexAdd Codota to your IDE (free)

How to use
getAttributes
method
in
org.apache.ws.commons.schema.XmlSchemaComplexType

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

  • Common ways to obtain XmlSchemaComplexType
private void myMethod () {
XmlSchemaComplexType x =
  • Codota IconXmlSchema xmlSchema;new XmlSchemaComplexType(xmlSchema, false)
  • Codota IconXmlSchemaElement element;(XmlSchemaComplexType) element.getSchemaType()
  • Codota IconXmlSchema schema;new XmlSchemaComplexType(schema)
  • Smart code suggestions by Codota
}
origin: apache/cxf

private void complexTypeSerializeAttributes(XmlSchemaComplexType type, String string) {
  @SuppressWarnings("unused")
  List<XmlSchemaAttributeOrGroupRef> attributes = type.getAttributes();
  // work in progress.
}
origin: apache/cxf

private static boolean hasAttributes(XmlSchemaComplexType complexType) {
  // Now lets see if we have any attributes...
  // This should probably look at the restricted and substitute types too.
  return complexType.getAnyAttribute() != null || !complexType.getAttributes().isEmpty();
}
origin: org.apache.cxf/cxf-rt-core

private static boolean hasAttributes(XmlSchemaComplexType complexType) {
  // Now lets see if we have any attributes...
  // This should probably look at the restricted and substitute types too.
  if (complexType.getAnyAttribute() != null || !complexType.getAttributes().isEmpty()) {
    return true;
  }
  return false;
}
origin: apache/cxf

public static boolean isUnion(XmlSchemaComplexType type) {
  boolean isUnion = false;
  if (type.getParticle() instanceof XmlSchemaChoice && type.getAttributes().isEmpty()) {
    isUnion = true;
  }
  return isUnion;
}
origin: apache/cxf

private boolean hasAttributes(XmlSchemaComplexType complexType) {
  // Now lets see if we have any attributes...
  // This should probably look at the restricted and substitute types too.
  return complexType.getAnyAttribute() != null || complexType.getAttributes().size() > 0;
}
origin: org.apache.cxf/cxf-bundle-jaxrs

private static boolean hasAttributes(XmlSchemaComplexType complexType) {
  // Now lets see if we have any attributes...
  // This should probably look at the restricted and substitute types too.
  if (complexType.getAnyAttribute() != null || !complexType.getAttributes().isEmpty()) {
    return true;
  }
  return false;
}
origin: org.codehaus.xfire/xfire-core

protected static boolean hasAttributes(XmlSchemaComplexType complexType)
{
  // Now lets see if we have any attributes...
  // This should probably look at the restricted and substitute types too.
  
  if (complexType.getAnyAttribute() != null ||
      complexType.getAttributes().getCount() > 0)
    return true;
  else
    return false;
}
 
origin: apache/cxf

public static List<XmlSchemaAnnotated> getContentAttributes(XmlSchemaComplexType type,
                              SchemaCollection collection) {
  List<XmlSchemaAnnotated> results = new ArrayList<>();
  QName baseTypeName = getBaseType(type);
  if (baseTypeName != null) {
    XmlSchemaComplexType baseType = (XmlSchemaComplexType)collection.getTypeByQName(baseTypeName);
    // recurse onto the base type ...
    results.addAll(getContentAttributes(baseType, collection));
    // and now process our sequence.
    List<XmlSchemaAttributeOrGroupRef> extAttrs = getContentAttributes(type);
    results.addAll(extAttrs);
    return results;
  }
  // no base type, the simple case.
  List<XmlSchemaAttributeOrGroupRef> attrs = type.getAttributes();
  results.addAll(attrs);
  return results;
}
origin: org.apache.cxf/cxf-core

public static List<XmlSchemaAnnotated> getContentAttributes(XmlSchemaComplexType type,
                              SchemaCollection collection) {
  List<XmlSchemaAnnotated> results = new ArrayList<>();
  QName baseTypeName = getBaseType(type);
  if (baseTypeName != null) {
    XmlSchemaComplexType baseType = (XmlSchemaComplexType)collection.getTypeByQName(baseTypeName);
    // recurse onto the base type ...
    results.addAll(getContentAttributes(baseType, collection));
    // and now process our sequence.
    List<XmlSchemaAttributeOrGroupRef> extAttrs = getContentAttributes(type);
    results.addAll(extAttrs);
    return results;
  }
  // no base type, the simple case.
  List<XmlSchemaAttributeOrGroupRef> attrs = type.getAttributes();
  results.addAll(attrs);
  return results;
}
origin: org.apache.cxf/cxf-api

public static List<XmlSchemaAnnotated>
getContentAttributes(XmlSchemaComplexType type, SchemaCollection collection) {
  List<XmlSchemaAnnotated> results = new ArrayList<XmlSchemaAnnotated>();
  QName baseTypeName = getBaseType(type);
  if (baseTypeName != null) {
    XmlSchemaComplexType baseType = (XmlSchemaComplexType)collection.getTypeByQName(baseTypeName);
    // recurse onto the base type ...
    results.addAll(getContentAttributes(baseType, collection));
    // and now process our sequence.
    List<XmlSchemaAttributeOrGroupRef> extAttrs = getContentAttributes(type);
    results.addAll(extAttrs);
    return results;
  } else {
    // no base type, the simple case.
    List<XmlSchemaAttributeOrGroupRef> attrs = type.getAttributes();
    results.addAll(attrs);
    return results;
  }
}
origin: org.apache.cxf/cxf-common-utilities

public static List<XmlSchemaAnnotated>
getContentAttributes(XmlSchemaComplexType type, SchemaCollection collection) {
  List<XmlSchemaAnnotated> results = new ArrayList<XmlSchemaAnnotated>();
  QName baseTypeName = getBaseType(type);
  if (baseTypeName != null) {
    XmlSchemaComplexType baseType = (XmlSchemaComplexType)collection.getTypeByQName(baseTypeName);
    // recurse onto the base type ...
    results.addAll(getContentAttributes(baseType, collection));
    // and now process our sequence.
    List<XmlSchemaAttributeOrGroupRef> extAttrs = getContentAttributes(type);
    results.addAll(extAttrs);
    return results;
  } else {
    // no base type, the simple case.
    List<XmlSchemaAttributeOrGroupRef> attrs = type.getAttributes();
    results.addAll(attrs);
    return results;
  }
}
origin: org.apache.cxf/cxf-bundle-jaxrs

public static List<XmlSchemaAnnotated>
getContentAttributes(XmlSchemaComplexType type, SchemaCollection collection) {
  List<XmlSchemaAnnotated> results = new ArrayList<XmlSchemaAnnotated>();
  QName baseTypeName = getBaseType(type);
  if (baseTypeName != null) {
    XmlSchemaComplexType baseType = (XmlSchemaComplexType)collection.getTypeByQName(baseTypeName);
    // recurse onto the base type ...
    results.addAll(getContentAttributes(baseType, collection));
    // and now process our sequence.
    List<XmlSchemaAttributeOrGroupRef> extAttrs = getContentAttributes(type);
    results.addAll(extAttrs);
    return results;
  } else {
    // no base type, the simple case.
    List<XmlSchemaAttributeOrGroupRef> attrs = type.getAttributes();
    results.addAll(attrs);
    return results;
  }
}
origin: apache/cxf

public static boolean isOMGUnion(XmlSchemaComplexType type) {
  boolean isUnion = false;
  if (type.getParticle() instanceof XmlSchemaSequence
    && type.getAttributes().isEmpty()) {
    XmlSchemaSequence stype = (XmlSchemaSequence)type.getParticle();
    if (stype.getItems().size() == 2) {
      XmlSchemaParticle st1 = (XmlSchemaParticle)stype.getItems().get(0);
      XmlSchemaParticle st2 = (XmlSchemaParticle)stype.getItems().get(1);
      XmlSchemaElement discEl = null;
      if (st1 instanceof XmlSchemaChoice && st2 instanceof XmlSchemaElement) {
        isUnion = true;
        discEl = (XmlSchemaElement)st2;
      } else if (st2 instanceof XmlSchemaChoice && st1 instanceof XmlSchemaElement) {
        isUnion = true;
        discEl = (XmlSchemaElement)st1;
      }
      if (isUnion && !"discriminator".equals(discEl.getQName().getLocalPart())) {
        isUnion = false;
      }
    }
  }
  return isUnion;
}
origin: apache/axis2-java

private void processAttributes(XmlSchemaComplexType complexType,
                AxisMessage message,
                List partNameList,
                String qnameSuffix) {
  QName opName = message.getAxisOperation().getName();
  XmlSchemaAttribute xmlSchemaAttribute;
  for (XmlSchemaObject item : complexType.getAttributes()) {
    if (item instanceof XmlSchemaAttribute) {
      xmlSchemaAttribute = (XmlSchemaAttribute) item;
      String partName = xmlSchemaAttribute.getName();
      partNameList.add(
          WSDLUtil.getPartQName(opName.getLocalPart(),
              qnameSuffix,
              partName));
    }
  }
}
origin: org.apache.axis2/axis2-adb-codegen

private static void processAttributes(XmlSchemaComplexType complexType,
                String opName,
                String qnameSuffix,
                TypeMapper typeMap) {
  for (XmlSchemaObject item : complexType.getAttributes()) {
    XmlSchemaAttribute xmlSchemaAttribute;
    if (item instanceof XmlSchemaAttribute) {
      xmlSchemaAttribute = (XmlSchemaAttribute) item;
      populateClassName(xmlSchemaAttribute.getMetaInfoMap(),
          typeMap,
          opName,
          false,
          xmlSchemaAttribute.getName(),
          qnameSuffix);
    }
  }
}
origin: apache/axis2-java

private static void processAttributes(XmlSchemaComplexType complexType,
                String opName,
                String qnameSuffix,
                TypeMapper typeMap) {
  for (XmlSchemaObject item : complexType.getAttributes()) {
    XmlSchemaAttribute xmlSchemaAttribute;
    if (item instanceof XmlSchemaAttribute) {
      xmlSchemaAttribute = (XmlSchemaAttribute) item;
      populateClassName(xmlSchemaAttribute.getMetaInfoMap(),
          typeMap,
          opName,
          false,
          xmlSchemaAttribute.getName(),
          qnameSuffix);
    }
  }
}
origin: apache/cxf

public boolean isLiteralArray(XmlSchemaComplexType type) {
  boolean array = false;
  if ((type.getAttributes().isEmpty())
    && (type.getParticle() instanceof XmlSchemaSequence)) {
    XmlSchemaSequence stype = (XmlSchemaSequence)type.getParticle();
    if ((stype.getItems().size() == 1)
      && (stype.getItems().get(0) instanceof XmlSchemaElement)) {
      XmlSchemaElement el = (XmlSchemaElement)stype.getItems().get(0);
      if (!(el.getMaxOccurs() == 1)) {
        // it's a literal array
        array = true;
      }
      if (el.getMaxOccurs() == 1
        && el.getMinOccurs() == 1
        && type.getName() != null
        &&  WSDLTypes.isAnonymous(type.getName())) {
        array = true;
      }
    }
  }
  return array;
}
origin: org.wso2.carbon.data/org.wso2.carbon.dataservices.core

private static XmlSchemaObjectCollection getSchemaObjectsFromComplexType(XmlSchemaComplexType schemaComplexType) {
  XmlSchemaObjectCollection collection = new XmlSchemaObjectCollection();
  XmlSchemaSequence sequence = (XmlSchemaSequence) schemaComplexType.getParticle();
  if (sequence != null) {
    XmlSchemaObjectCollection seqItems = sequence.getItems();
    int c = seqItems.getCount();
    for (int i = 0; i < c; i++) {
      // add elements
      collection.add(seqItems.getItem(i));
    }
  }
  XmlSchemaObjectCollection attrItems = schemaComplexType.getAttributes();
  int c = attrItems.getCount();
  for (int i = 0; i < c; i++) {
    // add attributes
    collection.add(attrItems.getItem(i));
  }
  return collection;
}
 
origin: org.apache.cxf/cxf-api

private void addCrossImportsType(XmlSchema schema, XmlSchemaType schemaType) {
  // the base type might cross schemas.
  if (schemaType instanceof XmlSchemaComplexType) {
    XmlSchemaComplexType complexType = (XmlSchemaComplexType)schemaType;
    XmlSchemaUtils.addImportIfNeeded(schema, complexType.getBaseSchemaTypeName());
    addCrossImports(schema, complexType.getContentModel());
    addCrossImportsAttributeList(schema, complexType.getAttributes());
    // could it be a choice or something else?
    
    if (complexType.getParticle() instanceof XmlSchemaChoice) {
      XmlSchemaChoice choice = XmlSchemaUtils.getChoice(complexType);
      addCrossImports(schema, choice);
    } else if (complexType.getParticle() instanceof XmlSchemaAll) {
      XmlSchemaAll all = XmlSchemaUtils.getAll(complexType);
      addCrossImports(schema, all);
    } else {
      XmlSchemaSequence sequence = XmlSchemaUtils.getSequence(complexType);
      addCrossImports(schema, sequence);
    }
  }
}
private void addCrossImports(XmlSchema schema, XmlSchemaAll all) {
origin: org.apache.cxf/cxf-core

private void addCrossImportsType(XmlSchema schema, XmlSchemaType schemaType) {
  // the base type might cross schemas.
  if (schemaType instanceof XmlSchemaComplexType) {
    XmlSchemaComplexType complexType = (XmlSchemaComplexType)schemaType;
    XmlSchemaUtils.addImportIfNeeded(schema, complexType.getBaseSchemaTypeName());
    addCrossImports(schema, complexType.getContentModel());
    addCrossImportsAttributeList(schema, complexType.getAttributes());
    // could it be a choice or something else?
    if (complexType.getParticle() instanceof XmlSchemaChoice) {
      XmlSchemaChoice choice = (XmlSchemaChoice)complexType.getParticle();
      addCrossImports(schema, choice);
    } else if (complexType.getParticle() instanceof XmlSchemaAll) {
      XmlSchemaAll all = (XmlSchemaAll)complexType.getParticle();
      addCrossImports(schema, all);
    } else if (complexType.getParticle() instanceof XmlSchemaSequence) {
      XmlSchemaSequence sequence = (XmlSchemaSequence)complexType.getParticle();
      addCrossImports(schema, sequence);
    }
  }
}
private void addCrossImports(XmlSchema schema, XmlSchemaAll all) {
org.apache.ws.commons.schemaXmlSchemaComplexTypegetAttributes

Popular methods of XmlSchemaComplexType

  • getParticle
  • getContentModel
  • <init>
  • setName
  • getQName
  • setParticle
  • getAnyAttribute
  • getName
  • setAbstract
  • getBaseSchemaTypeName
    Return the QName of the base schema type, if any, as defined in the content model.
  • isAbstract
  • setAnyAttribute
  • isAbstract,
  • setAnyAttribute,
  • setContentModel,
  • setAnnotation,
  • setBlock,
  • setFinal,
  • setMixed,
  • addMetaInfo,
  • getLineNumber

Popular in Java

  • Updating database using SQL prepared statement
  • getResourceAsStream (ClassLoader)
  • getApplicationContext (Context)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Notification (javax.management)
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • JCheckBox (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
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