當前位置: 首頁>>代碼示例>>Java>>正文


Java XmlNsForm類代碼示例

本文整理匯總了Java中javax.xml.bind.annotation.XmlNsForm的典型用法代碼示例。如果您正苦於以下問題:Java XmlNsForm類的具體用法?Java XmlNsForm怎麽用?Java XmlNsForm使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


XmlNsForm類屬於javax.xml.bind.annotation包,在下文中一共展示了XmlNsForm類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getEffectiveNamespaceFor

import javax.xml.bind.annotation.XmlNsForm; //導入依賴的package包/類
private String getEffectiveNamespaceFor(XmlElementRef r) {
    String nsUri = r.namespace();

    XmlSchema xs = reader().getPackageAnnotation( XmlSchema.class, parent.getClazz(), this );
    if(xs!=null && xs.attributeFormDefault()== XmlNsForm.QUALIFIED) {
        // JAX-RPC doesn't want the default namespace URI swapping to take effect to
        // local "unqualified" elements. UGLY.
        if(nsUri.length()==0)
            nsUri = parent.builder.defaultNsUri;
    }

    return nsUri;
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:14,代碼來源:ReferencePropertyInfoImpl.java

示例2: getElementFormDefault

import javax.xml.bind.annotation.XmlNsForm; //導入依賴的package包/類
public final XmlNsForm getElementFormDefault(String nsUri) {
    for (ClassInfoImpl<T, C, F, M> ci : beans().values()) {
        XmlSchema xs = reader.getPackageAnnotation( XmlSchema.class, ci.getClazz(), null );
        if(xs==null)
            continue;

        if(!xs.namespace().equals(nsUri))
            continue;

        XmlNsForm xnf = xs.elementFormDefault();
        if(xnf!=XmlNsForm.UNSET)
            return xnf;
    }
    return XmlNsForm.UNSET;
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:16,代碼來源:TypeInfoSetImpl.java

示例3: getAttributeFormDefault

import javax.xml.bind.annotation.XmlNsForm; //導入依賴的package包/類
public final XmlNsForm getAttributeFormDefault(String nsUri) {
    for (ClassInfoImpl<T,C,F,M> ci : beans().values()) {
        XmlSchema xs = reader.getPackageAnnotation( XmlSchema.class, ci.getClazz(), null );
        if(xs==null)
            continue;

        if(!xs.namespace().equals(nsUri))
            continue;

        XmlNsForm xnf = xs.attributeFormDefault();
        if(xnf!=XmlNsForm.UNSET)
            return xnf;
    }
    return XmlNsForm.UNSET;
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:16,代碼來源:TypeInfoSetImpl.java

示例4: generatePackageInfo

import javax.xml.bind.annotation.XmlNsForm; //導入依賴的package包/類
private void generatePackageInfo(String className, String ns, Class clz) {
ClassWriter cw = createClassWriter();
      String classFileName = periodToSlashes(className);
      cw.visit(Opcodes.V1_5, Opcodes.ACC_ABSTRACT + Opcodes.ACC_INTERFACE, classFileName, null,
               "java/lang/Object", null);
      
      boolean q = qualified;
      SchemaInfo si = interfaceInfo.getService().getSchema(ns);
      if (si != null) {
          q = si.isElementFormQualified();
      }
      AnnotationVisitor av0 = cw.visitAnnotation("Ljavax/xml/bind/annotation/XmlSchema;", true);
      av0.visit("namespace", ns);
      av0.visitEnum("elementFormDefault",
                    getClassCode(XmlNsForm.class),
                    q ? "QUALIFIED" : "UNQUALIFIED");
      av0.visitEnd();
      
      if (clz.getPackage() != null && clz.getPackage().getAnnotations() != null) {
          for (Annotation ann : clz.getPackage().getAnnotations()) {
              if (ann instanceof XmlJavaTypeAdapters) {
                  av0 = cw.visitAnnotation("Ljavax/xml/bind/annotation/adapters/XmlJavaTypeAdapters;",
                                           true);
                  generateXmlJavaTypeAdapters(av0, (XmlJavaTypeAdapters)ann);
                  av0.visitEnd();
              } else if (ann instanceof XmlJavaTypeAdapter) {
                  av0 = cw.visitAnnotation("Ljavax/xml/bind/annotation/adapters/XmlJavaTypeAdapter;",
                                           true);
                  generateXmlJavaTypeAdapter(av0, (XmlJavaTypeAdapter)ann);
                  av0.visitEnd();
              }
          }
      }
      cw.visitEnd();
      
      loadClass(className, clz, cw.toByteArray());
  }
 
開發者ID:GeeQuery,項目名稱:cxf-plus,代碼行數:38,代碼來源:PlusWrapperClassGenerator.java

示例5: elementFormDefault

import javax.xml.bind.annotation.XmlNsForm; //導入依賴的package包/類
public XmlNsForm elementFormDefault() {
    return core.elementFormDefault();
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:4,代碼來源:XmlSchemaQuick.java

示例6: attributeFormDefault

import javax.xml.bind.annotation.XmlNsForm; //導入依賴的package包/類
public XmlNsForm attributeFormDefault() {
    return core.attributeFormDefault();
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:4,代碼來源:XmlSchemaQuick.java

示例7: getElementFormDefault

import javax.xml.bind.annotation.XmlNsForm; //導入依賴的package包/類
public XmlNsForm getElementFormDefault(String nsUri) {
    throw new UnsupportedOperationException();
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:4,代碼來源:Model.java

示例8: getAttributeFormDefault

import javax.xml.bind.annotation.XmlNsForm; //導入依賴的package包/類
public XmlNsForm getAttributeFormDefault(String nsUri) {
    throw new UnsupportedOperationException();
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:4,代碼來源:Model.java


注:本文中的javax.xml.bind.annotation.XmlNsForm類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。