Codota Logo
XmlSchemaSequence.getItems
Code IndexAdd Codota to your IDE (free)

How to use
getItems
method
in
org.apache.ws.commons.schema.XmlSchemaSequence

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

  • Common ways to obtain XmlSchemaSequence
private void myMethod () {
XmlSchemaSequence x =
  • Codota Iconnew XmlSchemaSequence()
  • Codota IconXmlSchemaComplexType xmlSchemaComplexType;(XmlSchemaSequence) xmlSchemaComplexType.getParticle()
  • Smart code suggestions by Codota
}
origin: apache/cxf

private void sort(final XmlSchemaSequence seq) {
  Collections.sort(seq.getItems(), new Comparator<XmlSchemaSequenceMember>() {
    public int compare(XmlSchemaSequenceMember o1, XmlSchemaSequenceMember o2) {
      XmlSchemaElement element1 = (XmlSchemaElement)o1;
      XmlSchemaElement element2 = (XmlSchemaElement)o2;
      return element1.getName().compareTo(element2.getName());
    }
  });
}
origin: apache/cxf

private void sortItems(final XmlSchemaSequence seq, final String[] propertyOrder) {
  final List<String> propList = Arrays.asList(propertyOrder);
  Collections.sort(seq.getItems(), new Comparator<XmlSchemaSequenceMember>() {
    public int compare(XmlSchemaSequenceMember o1, XmlSchemaSequenceMember o2) {
      XmlSchemaElement element1 = (XmlSchemaElement)o1;
      XmlSchemaElement element2 = (XmlSchemaElement)o2;
      int index1 = propList.indexOf(element1.getName());
      int index2 = propList.indexOf(element2.getName());
      return index1 - index2;
    }
  });
}
//sort to Alphabetical order
origin: apache/cxf

private void addCrossImports(XmlSchema schema, XmlSchemaSequence sequence) {
  for (XmlSchemaSequenceMember seqMember : sequence.getItems()) {
    if (seqMember instanceof XmlSchemaElement) {
      addElementCrossImportsElement(schema, (XmlSchemaElement)seqMember);
    }
  }
}
origin: org.apache.cxf/cxf-api

private void addCrossImports(XmlSchema schema, XmlSchemaSequence sequence) {
  for (XmlSchemaSequenceMember seqMember : sequence.getItems()) {
    if (seqMember instanceof XmlSchemaElement) {
      addElementCrossImportsElement(schema, (XmlSchemaElement)seqMember);
    }
  }
}
origin: org.apache.cxf/cxf-core

private void addCrossImports(XmlSchema schema, XmlSchemaSequence sequence) {
  for (XmlSchemaSequenceMember seqMember : sequence.getItems()) {
    if (seqMember instanceof XmlSchemaElement) {
      addElementCrossImportsElement(schema, (XmlSchemaElement)seqMember);
    }
  }
}
origin: org.apache.cxf/cxf-bundle-jaxrs

private void addCrossImports(XmlSchema schema, XmlSchemaSequence sequence) {
  for (XmlSchemaSequenceMember seqMember : sequence.getItems()) {
    if (seqMember instanceof XmlSchemaElement) {
      addElementCrossImportsElement(schema, (XmlSchemaElement)seqMember);
    }
  }
}
origin: org.apache.cxf/cxf-common-utilities

private void addCrossImports(XmlSchema schema, XmlSchemaSequence sequence) {
  for (XmlSchemaSequenceMember seqMember : sequence.getItems()) {
    if (seqMember instanceof XmlSchemaElement) {
      addElementCrossImportsElement(schema, (XmlSchemaElement)seqMember);
    }
  }
}
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 void buildGenericElements(XmlSchema schema, XmlSchemaSequence seq, Field f) {
  XmlSchemaComplexType generics = new XmlSchemaComplexType(schema, true);
  Type type = f.getGenericType();
  String rawType = ((ParameterizedType)type).getRawType().toString();
  String typeName = StringUtils.uncapitalize(rawType.substring(rawType.lastIndexOf(".") + 1));
  generics.setName(typeName);
  Class<?> genericsClass = f.getType();
  buildGenericSeq(schema, generics, genericsClass);
  String name = Character.toLowerCase(f.getName().charAt(0)) + f.getName().substring(1);
  XmlSchemaElement newel = new XmlSchemaElement(schema, false);
  newel.setName(name);
  newel.setSchemaTypeName(generics.getQName());
  newel.setMinOccurs(0);
  if (!seq.getItems().contains(newel)) {
    seq.getItems().add(newel);
  }
}
origin: org.apache.axis2/axis2-json

private void processSchemaType(XmlSchemaType xmlSchemaType , XmlNode parentNode , XmlSchema schema) throws AxisFault {
  if (xmlSchemaType instanceof XmlSchemaComplexType) {
    XmlSchemaComplexType complexType = (XmlSchemaComplexType)xmlSchemaType;
    XmlSchemaParticle particle = complexType.getParticle();
    if (particle instanceof XmlSchemaSequence) {
      XmlSchemaSequence sequence = (XmlSchemaSequence)particle;
      for (XmlSchemaSequenceMember member : sequence.getItems()) {
        if (member instanceof XmlSchemaElement) {
          processElement((XmlSchemaElement)member , parentNode , schema);
        }
      }
    }
  }else if (xmlSchemaType instanceof XmlSchemaSimpleType) {
    // nothing to do with simpleType
  }
}
origin: apache/axis2-java

private void processSchemaType(XmlSchemaType xmlSchemaType , XmlNode parentNode , XmlSchema schema) throws AxisFault {
  if (xmlSchemaType instanceof XmlSchemaComplexType) {
    XmlSchemaComplexType complexType = (XmlSchemaComplexType)xmlSchemaType;
    XmlSchemaParticle particle = complexType.getParticle();
    if (particle instanceof XmlSchemaSequence) {
      XmlSchemaSequence sequence = (XmlSchemaSequence)particle;
      for (XmlSchemaSequenceMember member : sequence.getItems()) {
        if (member instanceof XmlSchemaElement) {
          processElement((XmlSchemaElement)member , parentNode , schema);
        }
      }
    }
  }else if (xmlSchemaType instanceof XmlSchemaSimpleType) {
    // nothing to do with simpleType
  }
}
origin: apache/cxf

private void addExceptionMessage(Class<?> cls, XmlSchema schema, XmlSchemaSequence seq) {
  try {
    //a subclass could mark the message method as transient
    Method m = cls.getMethod("getMessage");
    if (!m.isAnnotationPresent(XmlTransient.class)
      && m.getDeclaringClass().equals(Throwable.class)) {
      JAXBBeanInfo beanInfo = getBeanInfo(java.lang.String.class);
      XmlSchemaElement exEle = new XmlSchemaElement(schema, false);
      exEle.setName("message");
      exEle.setSchemaTypeName(getTypeName(beanInfo));
      exEle.setMinOccurs(0);
      seq.getItems().add(exEle);
    }
  } catch (Exception e) {
    //ignore, just won't have the message element
  }
}
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: 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: apache/cxf

private static List<WrapperElement> createWrappedElements(XmlSchemaSequence seq) {
  List<WrapperElement> qnames = new ArrayList<>();
  if (seq != null) {
    List<XmlSchemaSequenceMember> items = seq.getItems();
    for (XmlSchemaSequenceMember seqMember : items) {
      XmlSchemaElement subElement = (XmlSchemaElement)seqMember;
      if (subElement.getQName() != null) {
        qnames.add(new WrapperElement(subElement.getWireName(), subElement.getSchemaTypeName()));
      } else {
        qnames.add(new WrapperElement(subElement.getRef().getTargetQName(),
                       subElement.getSchemaTypeName()));
      }
    }
  }
  return qnames;
}
origin: apache/cxf

/**
 * Creates a element in a sequence for the key type and the value type.
 */
private void createElement(XmlSchema schema, XmlSchemaSequence seq, QName name,
              AegisType type, boolean optional) {
  XmlSchemaElement element = new XmlSchemaElement(schema, false);
  seq.getItems().add(element);
  element.setName(name.getLocalPart());
  element.setSchemaTypeName(type.getSchemaType());
  if (optional) {
    element.setMinOccurs(0);
  } else {
    element.setMinOccurs(1);
  }
  element.setMaxOccurs(1);
}
origin: org.apache.cxf/cxf-rt-databinding-aegis

/**
 * Creates a element in a sequence for the key type and the value type.
 */
private void createElement(XmlSchema schema, XmlSchemaSequence seq, QName name,
              AegisType type, boolean optional) {
  XmlSchemaElement element = new XmlSchemaElement(schema, false);
  seq.getItems().add(element);
  element.setName(name.getLocalPart());
  element.setSchemaTypeName(type.getSchemaType());
  if (optional) {
    element.setMinOccurs(0);
  } else {
    element.setMinOccurs(1);
  }
  element.setMaxOccurs(1);
}
origin: apache/cxf

private XmlSchemaElement addElement(XmlSchemaSequence schemaSequence,
                  XmlSchemaType schemaType,
                  Scope fqName,
                  String name) {
  XmlSchemaElement element = new XmlSchemaElement(schema, false);
  element.setName(name);
  if (schemaType != null) {
    element.setSchemaTypeName(schemaType.getQName());
    if (schemaType.getQName().equals(ReferenceConstants.WSADDRESSING_TYPE)) {
      element.setNillable(true);
    }
  } else {
    wsdlVisitor.getDeferredActions().
      add(fqName, new OperationDeferredAction(element));
  }
  schemaSequence.getItems().add(element);
  return element;
}
origin: org.wso2.carbon.data/org.wso2.carbon.dataservices.core

/**
 * Creates the default data services response element, and stores it in the schema.
 * @param cparams The common parameters used in the schema generator
 */
private static void createAndStoreDataServiceResponseElement(CommonParams cparams) {
  XmlSchemaElement element = createElement(cparams, DBConstants.WSO2_DS_NAMESPACE,
      DBConstants.DATA_SERVICE_RESPONSE_WRAPPER_ELEMENT, true);
  XmlSchemaComplexType type = createComplexType(cparams, DBConstants.WSO2_DS_NAMESPACE, 
      DBConstants.DATA_SERVICE_RESPONSE_WRAPPER_ELEMENT, false);
  element.setType(type);
  XmlSchemaAny anyEl = new XmlSchemaAny();
  anyEl.setMinOccurs(0);
  XmlSchemaSequence seq = new XmlSchemaSequence();
  seq.getItems().add(anyEl);
  type.setParticle(seq);
}
   
org.apache.ws.commons.schemaXmlSchemaSequencegetItems

Javadoc

The elements contained within the compositor. Collection of XmlSchemaElement, XmlSchemaGroupRef, XmlSchemaChoice, XmlSchemaSequence, or XmlSchemaAny.

Popular methods of XmlSchemaSequence

  • <init>
    Creates new XmlSchemaSequence
  • getMaxOccurs
  • setAnnotation
  • getMinOccurs

Popular in Java

  • Updating database using SQL prepared statement
  • compareTo (BigDecimal)
  • getApplicationContext (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • URI (java.net)
    Represents a Uniform Resource Identifier (URI) reference. Aside from some minor deviations noted bel
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Path (java.nio.file)
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • JFileChooser (javax.swing)
  • Table (org.hibernate.mapping)
    A relational table
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