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

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

Best Java code snippets using org.apache.ws.commons.schema.XmlSchemaComplexType.getParticle (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 boolean isWrappableSequence(XmlSchemaComplexType type) {
  if (type.getParticle() instanceof XmlSchemaSequence) {
    XmlSchemaSequence seq = (XmlSchemaSequence)type.getParticle();
    List<XmlSchemaSequenceMember> items = seq.getItems();
    for (XmlSchemaSequenceMember member : items) {
      if (!(member instanceof XmlSchemaElement)) {
        return false;
      }
    }
    return true;
  } else if (type.getParticle() == null) {
    return true;
  }
  return false;
}
origin: stackoverflow.com

 private void addElementNames(List<QName> result, XmlSchemaComplexType type) {
  XmlSchemaComplexType baseType = getBaseType(type);
  XmlSchemaParticle particle = baseType != null ? baseType.getParticle() : type.getParticle();

  addElementNames(result, particle);
}
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: com.legsem.legstar/legstar.avro.translator

/**
 * Create an avro complex type field using an XML schema type.
 * 
 * @param xsdType the XML schema complex type
 * @param level the depth in the hierarchy
 * @param avroFields array of avro fields being populated
 * @throws Xsd2AvroTranslatorException if something abnormal in the xsd
 */
private void visit(XmlSchema xmlSchema, XmlSchemaComplexType xsdType,
    final int level, final ArrayNode avroFields) {
  visit(xmlSchema, xsdType.getParticle(), level, avroFields);
}
origin: apache/cxf

public static XmlSchemaAll getAll(XmlSchemaComplexType type) {
  XmlSchemaParticle particle = type.getParticle();
  XmlSchemaAll all = null;
  if (particle == null) {
    // the code that uses this wants to iterate. An empty one is more useful than
    // a null pointer, and certainly an exception.
    return EMPTY_ALL;
  }
  try {
    all = (XmlSchemaAll) particle;
  } catch (ClassCastException cce) {
    unsupportedConstruct("NON_CHOICE_PARTICLE", type);
  }
  return all;
}
origin: apache/cxf

public static XmlSchemaSequence getSequence(XmlSchemaComplexType type) {
  XmlSchemaParticle particle = type.getParticle();
  XmlSchemaSequence sequence = null;
  if (particle == null) {
    // the code that uses this wants to iterate. An empty one is more useful than
    // a null pointer, and certainly an exception.
    return EMPTY_SEQUENCE;
  }
  try {
    sequence = (XmlSchemaSequence) particle;
  } catch (ClassCastException cce) {
    unsupportedConstruct("NON_SEQUENCE_PARTICLE", type);
  }
  return sequence;
}
public static XmlSchemaChoice getChoice(XmlSchemaComplexType type) {
origin: org.apache.cxf/cxf-api

public static XmlSchemaSequence getSequence(XmlSchemaComplexType type) {
  XmlSchemaParticle particle = type.getParticle();
  XmlSchemaSequence sequence = null;
  if (particle == null) {
    // the code that uses this wants to iterate. An empty one is more useful than
    // a null pointer, and certainly an exception.
    return EMPTY_SEQUENCE;
  }
  try {
    sequence = (XmlSchemaSequence) particle;
  } catch (ClassCastException cce) {
    unsupportedConstruct("NON_SEQUENCE_PARTICLE", type);
  }
  return sequence;
}
public static XmlSchemaChoice getChoice(XmlSchemaComplexType type) {
origin: org.apache.cxf/cxf-api

public static XmlSchemaChoice getChoice(XmlSchemaComplexType type) {
  XmlSchemaParticle particle = type.getParticle();
  XmlSchemaChoice choice = null;
  if (particle == null) {
    // the code that uses this wants to iterate. An empty one is more useful than
    // a null pointer, and certainly an exception.
    return EMPTY_CHOICE;
  }
  try {
    choice = (XmlSchemaChoice) particle;
  } catch (ClassCastException cce) {
    unsupportedConstruct("NON_CHOICE_PARTICLE", type);
  }
  return choice;
}
public static XmlSchemaAll getAll(XmlSchemaComplexType type) {
origin: org.apache.cxf/cxf-common-utilities

public static XmlSchemaAll getAll(XmlSchemaComplexType type) {
  XmlSchemaParticle particle = type.getParticle();
  XmlSchemaAll all = null;
  if (particle == null) {
    // the code that uses this wants to iterate. An empty one is more useful than
    // a null pointer, and certainly an exception.
    return EMPTY_ALL;
  }
  try {
    all = (XmlSchemaAll) particle;
  } catch (ClassCastException cce) {
    unsupportedConstruct("NON_CHOICE_PARTICLE", type);
  }
  return all;
}
public static boolean isAttributeNameQualified(XmlSchemaAttribute attribute, XmlSchema schema) {
origin: apache/cxf

public static XmlSchemaChoice getChoice(XmlSchemaComplexType type) {
  XmlSchemaParticle particle = type.getParticle();
  XmlSchemaChoice choice = null;
  if (particle == null) {
    // the code that uses this wants to iterate. An empty one is more useful than
    // a null pointer, and certainly an exception.
    return EMPTY_CHOICE;
  }
  try {
    choice = (XmlSchemaChoice) particle;
  } catch (ClassCastException cce) {
    unsupportedConstruct("NON_CHOICE_PARTICLE", type);
  }
  return choice;
}
public static XmlSchemaAll getAll(XmlSchemaComplexType type) {
origin: org.apache.cxf/cxf-bundle-jaxrs

public static XmlSchemaAll getAll(XmlSchemaComplexType type) {
  XmlSchemaParticle particle = type.getParticle();
  XmlSchemaAll all = null;
  if (particle == null) {
    // the code that uses this wants to iterate. An empty one is more useful than
    // a null pointer, and certainly an exception.
    return EMPTY_ALL;
  }
  try {
    all = (XmlSchemaAll) particle;
  } catch (ClassCastException cce) {
    unsupportedConstruct("NON_CHOICE_PARTICLE", type);
  }
  return all;
}
public static boolean isAttributeNameQualified(XmlSchemaAttribute attribute, XmlSchema schema) {
origin: org.apache.cxf/cxf-bundle-jaxrs

public static XmlSchemaSequence getSequence(XmlSchemaComplexType type) {
  XmlSchemaParticle particle = type.getParticle();
  XmlSchemaSequence sequence = null;
  if (particle == null) {
    // the code that uses this wants to iterate. An empty one is more useful than
    // a null pointer, and certainly an exception.
    return EMPTY_SEQUENCE;
  }
  try {
    sequence = (XmlSchemaSequence) particle;
  } catch (ClassCastException cce) {
    unsupportedConstruct("NON_SEQUENCE_PARTICLE", type);
  }
  return sequence;
}
public static XmlSchemaChoice getChoice(XmlSchemaComplexType type) {
origin: apache/cxf

private XmlSchemaSequence getTypeSequence(XmlSchemaComplexType type,
                     QName parentName) {
  if (!(type.getParticle() instanceof XmlSchemaSequence)) {
    unsupportedConstruct("NON_SEQUENCE_PARTICLE",
               type.getQName() != null ? type.getQName()
                 :
                 parentName);
  }
  return (XmlSchemaSequence)type.getParticle();
}
origin: apache/cxf

private boolean isEmptyType(XmlSchemaType type, QName parentName) {
  if (type instanceof XmlSchemaComplexType) {
    XmlSchemaComplexType complexType = (XmlSchemaComplexType)type;
    if (complexType.getParticle() == null) {
      return true;
    }
    XmlSchemaSequence sequence = getTypeSequence(complexType, parentName);
    if (sequence.getItems().isEmpty()) {
      return true;
    }
  }
  return false;
}
origin: apache/cxf

private CorbaType processRegularUnion(XmlSchemaComplexType complex,
                     QName defaultName) throws Exception {
  //NEED TO DO
  QName name = null;
  QName schematypeName = complex.getQName();
  if (schematypeName == null) {
    schematypeName = defaultName;
    name = createQNameCorbaNamespace(defaultName.getLocalPart() + "Type");
  } else {
    name = createQNameCorbaNamespace(schematypeName.getLocalPart());
  }
  return createUnion(name, (XmlSchemaChoice)complex.getParticle(), defaultName, schematypeName);
}
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: org.wso2.carbon.data/org.wso2.carbon.dataservices.core

private static String getResultRowName(XmlSchemaComplexType wrapperSchemaComplexType) {
  return ((XmlSchemaElement) ((XmlSchemaSequence) wrapperSchemaComplexType
      .getParticle()).getItems().getItem(0)).getName();
}
 
origin: org.apache.axis2/axis2-adb-codegen

private static void processXMLSchemaComplexType(XmlSchemaType schemaType,
                        TypeMapper mapper,
                        String opName,
                        Map schemaMap,
                        String qnameSuffix) {
  if (schemaType instanceof XmlSchemaComplexType) {
    XmlSchemaComplexType cmplxType = (XmlSchemaComplexType) schemaType;
    if (cmplxType.getContentModel() == null) {
      processSchemaSequence(cmplxType.getParticle(), mapper, opName, schemaMap, qnameSuffix);
    } else {
      processComplexContentModel(cmplxType, mapper, opName, schemaMap, qnameSuffix);
    }
    processAttributes(cmplxType, opName, qnameSuffix, mapper);
  }
}
origin: apache/axis2-java

private static void processXMLSchemaComplexType(XmlSchemaType schemaType,
                        TypeMapper mapper,
                        String opName,
                        Map schemaMap,
                        String qnameSuffix) {
  if (schemaType instanceof XmlSchemaComplexType) {
    XmlSchemaComplexType cmplxType = (XmlSchemaComplexType) schemaType;
    if (cmplxType.getContentModel() == null) {
      processSchemaSequence(cmplxType.getParticle(), mapper, opName, schemaMap, qnameSuffix);
    } else {
      processComplexContentModel(cmplxType, mapper, opName, schemaMap, qnameSuffix);
    }
    processAttributes(cmplxType, opName, qnameSuffix, mapper);
  }
}
origin: apache/cxf

private XmlSchemaComplexType duplicateXmlSchemaComplexType(Scope newScope) {
  XmlSchemaComplexType oldSchemaType = (XmlSchemaComplexType) getSchemaType();
  XmlSchemaComplexType newSchemaType = new XmlSchemaComplexType(schema, true);
  newSchemaType.setName(newScope.toString());
  newSchemaType.setParticle(oldSchemaType.getParticle());
  return newSchemaType;
}
org.apache.ws.commons.schemaXmlSchemaComplexTypegetParticle

Popular methods of XmlSchemaComplexType

  • getAttributes
  • 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

  • Reactive rest calls using spring rest template
  • compareTo (BigDecimal)
  • getExternalFilesDir (Context)
  • putExtra (Intent)
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • URLConnection (java.net)
    The abstract class URLConnection is the superclass of all classes that represent a communications li
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • LinkedHashMap (java.util)
    Hash table and linked list implementation of the Map interface, with predictable iteration order. Th
  • Locale (java.util)
    A Locale object represents a specific geographical, political, or cultural region. An operation that
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
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