当前位置: 首页>>代码示例>>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;未经允许,请勿转载。