org.apache.ws.commons.schema.XmlSchemaAnnotation.getItems()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(3.0k)|赞(0)|评价(0)|浏览(88)

本文整理了Java中org.apache.ws.commons.schema.XmlSchemaAnnotation.getItems()方法的一些代码示例,展示了XmlSchemaAnnotation.getItems()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlSchemaAnnotation.getItems()方法的具体详情如下:
包路径:org.apache.ws.commons.schema.XmlSchemaAnnotation
类名称:XmlSchemaAnnotation
方法名:getItems

XmlSchemaAnnotation.getItems介绍

暂无

代码示例

代码示例来源:origin: com.legsem.legstar/legstar-xsd2cob

/**
 * Extracts the cobol annotation from an XML schema element.
 * 
 * @param xsdElement the XML schema element
 * @return the COBOL annotation or bull if none found
 */
protected Element getCobolAnnotation(XmlSchemaElement xsdElement) {
  XmlSchemaAnnotation annotation = xsdElement.getAnnotation();
  if (annotation != null && annotation.getItems().getCount() > 0) {
    XmlSchemaAppInfo appinfo = (XmlSchemaAppInfo) annotation.getItems()
        .getItem(0);
    if (appinfo.getMarkup() != null) {
      for (int i = 0; i < appinfo.getMarkup().getLength(); i++) {
        Node node = appinfo.getMarkup().item(i);
        if (node instanceof Element
            && node.getLocalName().equals(CobolMarkup.ELEMENT)
            && node.getNamespaceURI().equals(CobolMarkup.NS)) {
          return (Element) node;
        }
      }
    }
  }
  return null;
}

代码示例来源:origin: com.legsem.legstar/legstar-xsd2cob

/** {@inheritDoc} */
public void processElement(final XmlSchema schema,
    final XmlSchemaElement xsdElement, final int level)
    throws XsdMappingException {
  XmlSchemaAnnotation annotation = xsdElement.getAnnotation();
  if (annotation != null && annotation.getItems().getCount() > 0) {
    XmlSchemaAppInfo appinfo = (XmlSchemaAppInfo) annotation.getItems()
        .getItem(0);
    if (appinfo.getMarkup() != null) {
      for (int i = 0; i < appinfo.getMarkup().getLength(); i++) {
        Node node = appinfo.getMarkup().item(i);
        if (node instanceof Element
            && node.getLocalName().equals(CobolMarkup.ELEMENT)
            && node.getNamespaceURI().equals(CobolMarkup.NS)) {
          writeElement(schema, xsdElement, _writer,
              (Element) node, level);
        }
      }
    }
  }
}

代码示例来源:origin: apache/cxf

private boolean isObjectReference(SchemaCollection schemaList, QName name) {
  for (XmlSchema schema : schemaList.getXmlSchemas()) {
    XmlSchemaElement element = schema.getElementByName(name);
    if (element != null) {
      XmlSchemaAnnotation annotation = element.getAnnotation();
      if (annotation != null) {
        List<XmlSchemaAnnotationItem> annotationColl = annotation.getItems();
        for (XmlSchemaAnnotationItem item : annotationColl) {
          if (item instanceof XmlSchemaAppInfo) {
            return true;
          }
        }
      }
    }
  }
  return false;
}

代码示例来源:origin: com.legsem.legstar/legstar-jaxbgen

for (Iterator < XmlSchemaObject > i = annotation.getItems()
    .getIterator(); i.hasNext();) {
  XmlSchemaObject subAnnotation = i.next();
  annotation.getItems().add(appInfo);

代码示例来源:origin: com.legsem.legstar/legstar-xsd2cob

for (Iterator < XmlSchemaObject > i = annotation.getItems()
    .getIterator(); i.hasNext();) {
  XmlSchemaObject subAnnotation = i.next();
  annotation.getItems().add(appInfo);

代码示例来源:origin: apache/cxf

for (XmlSchemaAnnotationItem item : annotation.getItems()) {
  XmlSchemaAppInfo appInfo = (XmlSchemaAppInfo)item;
  if (appInfo != null) {

代码示例来源:origin: apache/cxf

annotation.getItems().add(appInfo);

代码示例来源:origin: apache/cxf

for (XmlSchemaAnnotationItem ann : annotation.getItems()) {
  if (ann instanceof XmlSchemaAppInfo) {
    appInfo = (XmlSchemaAppInfo)ann;

相关文章