org.apache.ws.commons.schema.XmlSchemaObject类的使用及代码示例

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

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

XmlSchemaObject介绍

暂无

代码示例

代码示例来源:origin: org.apache.cxf/cxf-api

public static String cleanedUpSchemaSource(XmlSchemaObject subject) {
    if (subject == null || subject.getSourceURI() == null) {
      return "";
    } else {
      return subject.getSourceURI() + ":" + subject.getLineNumber();
    }
  }
}

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

public void serialize(XmlSchemaObject schemaObject,
           @SuppressWarnings("rawtypes") Class classOfType, Node domNode) {
  Map<Object, Object> metaInfoMap = schemaObject.getMetaInfoMap();
  MimeAttribute mimeType = (MimeAttribute)metaInfoMap.get(MimeAttribute.MIME_QNAME);
  Element elt = (Element)domNode;
  Attr att1 = elt.getOwnerDocument().createAttributeNS(MimeAttribute.MIME_QNAME.getNamespaceURI(),
                             MimeAttribute.MIME_QNAME.getLocalPart());
  att1.setValue(mimeType.getValue());
  elt.setAttributeNodeNS(att1);
}

代码示例来源:origin: org.apache.ws.commons.schema/XmlSchema

Map metaInfoMap =  schemaObject.getMetaInfoMap();
if (metaInfoMap==null){
  metaInfoMap = new HashMap();
  Map metaInfoMapFromSchemaElement = schemaObject.getMetaInfoMap();
  if (metaInfoMapFromSchemaElement==null){
    schemaObject.setMetaInfoMap(metaInfoMap);
  }else{
    metaInfoMapFromSchemaElement.putAll(metaInfoMap);

代码示例来源:origin: org.apache.ws.commons.schema/XmlSchema

public String toString(String prefix, int tab) {
    String xml = new String();

    for (int i = 0; i < getCount(); i++) {
      xml += getItem(i).toString(prefix, tab);
    }

    return xml;

  }
}

代码示例来源:origin: org.apache.cxf/cxf-core

public void serialize(XmlSchemaObject schemaObject,
           @SuppressWarnings("rawtypes") Class classOfType, Node domNode) {
  Map<Object, Object> metaInfoMap = schemaObject.getMetaInfoMap();
  MimeAttribute mimeType = (MimeAttribute)metaInfoMap.get(MimeAttribute.MIME_QNAME);
  Element elt = (Element)domNode;
  Attr att1 = elt.getOwnerDocument().createAttributeNS(MimeAttribute.MIME_QNAME.getNamespaceURI(),
                             MimeAttribute.MIME_QNAME.getLocalPart());
  att1.setValue(mimeType.getValue());
  elt.setAttributeNodeNS(att1);
}

代码示例来源:origin: org.apache.ws.schema/XmlSchema

Map metaInfoMap =  schemaObject.getMetaInfoMap();
if (metaInfoMap==null){
  metaInfoMap = new HashMap();
  Map metaInfoMapFromSchemaElement = schemaObject.getMetaInfoMap();
  if (metaInfoMapFromSchemaElement==null){
    schemaObject.setMetaInfoMap(metaInfoMap);
  }else{
    metaInfoMapFromSchemaElement.putAll(metaInfoMap);

代码示例来源:origin: org.apache.ws/com.springsource.org.apache.ws.commons.schema

public String toString(String prefix, int tab) {
    String xml = new String();

    for (int i = 0; i < getCount(); i++) {
      xml += getItem(i).toString(prefix, tab);
    }

    return xml;

  }
}

代码示例来源:origin: org.apache.cxf/cxf-rt-core

public void serialize(XmlSchemaObject schemaObject, 
           @SuppressWarnings("rawtypes") Class classOfType, Node domNode) {
  Map<Object, Object> metaInfoMap = schemaObject.getMetaInfoMap();
  MimeAttribute mimeType = (MimeAttribute)metaInfoMap.get(MimeAttribute.MIME_QNAME);
  Element elt = (Element)domNode;
  Attr att1 = elt.getOwnerDocument().createAttributeNS(MimeAttribute.MIME_QNAME.getNamespaceURI(),
                             MimeAttribute.MIME_QNAME.getLocalPart());
  att1.setValue(mimeType.getValue());
  elt.setAttributeNodeNS(att1);
}

代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs

public static String cleanedUpSchemaSource(XmlSchemaObject subject) {
    if (subject == null || subject.getSourceURI() == null) {
      return "";
    } else {
      return subject.getSourceURI() + ":" + subject.getLineNumber();
    }
  }
}

代码示例来源:origin: org.apache.ws/com.springsource.org.apache.ws.commons.schema

Map metaInfoMapFromSchemaElement = schemaObject.getMetaInfoMap();
if (metaInfoMapFromSchemaElement==null){
  schemaObject.setMetaInfoMap(metaInfoMap);
}else{
  metaInfoMapFromSchemaElement.putAll(metaInfoMap);

代码示例来源:origin: org.apache.ws.schema/XmlSchema

public String toString(String prefix, int tab) {
    String xml = new String();

    for (int i = 0; i < getCount(); i++) {
      xml += getItem(i).toString(prefix, tab);
    }

    return xml;

  }
}

代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs

public void serialize(XmlSchemaObject schemaObject, 
           @SuppressWarnings("rawtypes") Class classOfType, Node domNode) {
  Map<Object, Object> metaInfoMap = schemaObject.getMetaInfoMap();
  MimeAttribute mimeType = (MimeAttribute)metaInfoMap.get(MimeAttribute.MIME_QNAME);
  Element elt = (Element)domNode;
  Attr att1 = elt.getOwnerDocument().createAttributeNS(MimeAttribute.MIME_QNAME.getNamespaceURI(),
                             MimeAttribute.MIME_QNAME.getLocalPart());
  att1.setValue(mimeType.getValue());
  elt.setAttributeNodeNS(att1);
}

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

static String cleanedUpSchemaSource(XmlSchemaObject subject) {
    if (subject == null || subject.getSourceURI() == null) {
      return "";
    }
    return subject.getSourceURI() + ":" + subject.getLineNumber();
  }
}

代码示例来源:origin: org.apache.ws.commons.schema/XmlSchema

public String toString(String prefix, int tab) {
    String xml = new String();
    for (int i = 0; i < tab; i++)
      xml += "\t";
    if (!prefix.equals("") && prefix.indexOf(":") == -1)
      prefix += ":";

    xml += "<" + prefix + "sequence>\n";
    for (int i = 0; i < items.getCount(); i++) {
      xml += items.getItem(i).toString(prefix, (tab + 1));
    }

    for (int i = 0; i < tab; i++)
      xml += "\t";

    xml += "</" + prefix + "sequence>\n";
    return xml;
  }
}

代码示例来源:origin: org.apache.ws.schema/XmlSchema

/**
 * A generic method to process the extra attributes and the extra
 * elements present within the schema.
 * What are considered extensions are child elements with non schema namespace
 * and child attributes with any namespace.
 * @param schemaObject
 * @param parentElement
 */
private void processExtensibilityComponents(XmlSchemaObject schemaObject, Element parentElement) {
  if (extReg!=null){
    Map metaInfoMap = schemaObject.getMetaInfoMap();
    if (metaInfoMap!=null && !metaInfoMap.isEmpty()) {
      //get the extra objects and call the respective deserializers
      Iterator keysIt = metaInfoMap.keySet().iterator();
      while (keysIt.hasNext()) {
        Object key =  keysIt.next();
        extReg.serializeExtension(schemaObject,metaInfoMap.get(key).getClass(),parentElement);
      }
    }
  }
}

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

public static String cleanedUpSchemaSource(XmlSchemaObject subject) {
  if (subject == null || subject.getSourceURI() == null) {
    return "";
  }
  return subject.getSourceURI() + ":" + subject.getLineNumber();
}

代码示例来源:origin: org.apache.ws/com.springsource.org.apache.ws.commons.schema

public String toString(String prefix, int tab) {
    String xml = new String();
    for (int i = 0; i < tab; i++)
      xml += "\t";
    if (!prefix.equals("") && prefix.indexOf(":") == -1)
      prefix += ":";

    xml += "<" + prefix + "sequence>\n";
    for (int i = 0; i < items.getCount(); i++) {
      xml += items.getItem(i).toString(prefix, (tab + 1));
    }

    for (int i = 0; i < tab; i++)
      xml += "\t";

    xml += "</" + prefix + "sequence>\n";
    return xml;
  }
}

代码示例来源:origin: org.apache.ws.commons.schema/XmlSchema

/**
 * A generic method to process the extra attributes and the extra
 * elements present within the schema.
 * What are considered extensions are child elements with non schema namespace
 * and child attributes with any namespace.
 * @param schemaObject
 * @param parentElement
 */
private void processExtensibilityComponents(XmlSchemaObject schemaObject, Element parentElement) {
  if (extReg!=null){
    Map metaInfoMap = schemaObject.getMetaInfoMap();
    if (metaInfoMap!=null && !metaInfoMap.isEmpty()) {
      //get the extra objects and call the respective deserializers
      Iterator keysIt = metaInfoMap.keySet().iterator();
      while (keysIt.hasNext()) {
        Object key =  keysIt.next();
        extReg.serializeExtension(schemaObject,metaInfoMap.get(key).getClass(),parentElement);
      }
    }
  }
}

代码示例来源:origin: org.apache.cxf/cxf-common-utilities

public static String cleanedUpSchemaSource(XmlSchemaObject subject) {
    if (subject == null || subject.getSourceURI() == null) {
      return "";
    } else {
      return subject.getSourceURI() + ":" + subject.getLineNumber();
    }
  }
}

代码示例来源:origin: org.apache.ws.schema/XmlSchema

public String toString(String prefix, int tab) {
    String xml = new String();
    for (int i = 0; i < tab; i++)
      xml += "\t";
    if (!prefix.equals("") && prefix.indexOf(":") == -1)
      prefix += ":";

    xml += "<" + prefix + "sequence>\n";
    for (int i = 0; i < items.getCount(); i++) {
      xml += items.getItem(i).toString(prefix, (tab + 1));
    }

    for (int i = 0; i < tab; i++)
      xml += "\t";

    xml += "</" + prefix + "sequence>\n";
    return xml;
  }
}

相关文章