本文整理了Java中com.sun.xml.bind.v2.schemagen.XmlSchemaGenerator.getNamespace()
方法的一些代码示例,展示了XmlSchemaGenerator.getNamespace()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlSchemaGenerator.getNamespace()
方法的具体详情如下:
包路径:com.sun.xml.bind.v2.schemagen.XmlSchemaGenerator
类名称:XmlSchemaGenerator
方法名:getNamespace
暂无
代码示例来源:origin: com.sun.xml.bind/jaxb-impl
public void add( ArrayInfo<T,C> a ) {
assert a!=null;
final String namespaceURI = a.getTypeName().getNamespaceURI();
Namespace n = getNamespace(namespaceURI);
n.arrays.add(a);
// search for foreign namespace references
n.addDependencyTo(a.getItemType().getTypeName());
}
代码示例来源:origin: com.sun.xml.bind/jaxb-impl
public void add( EnumLeafInfo<T,C> envm ) {
assert envm!=null;
String nsUri = null;
if(envm.isElement()) {
// put element -> type reference
nsUri = envm.getElementName().getNamespaceURI();
Namespace ns = getNamespace(nsUri);
ns.enums.add(envm);
ns.addDependencyTo(envm.getTypeName());
// schedule writing this global element
add(envm.getElementName(),false,envm);
}
final QName typeName = envm.getTypeName();
if (typeName != null) {
nsUri = typeName.getNamespaceURI();
} else {
if(nsUri==null)
return; // anonymous type
}
Namespace n = getNamespace(nsUri);
n.enums.add(envm);
// search for foreign namespace references
n.addDependencyTo(envm.getBaseType().getTypeName());
}
代码示例来源:origin: com.sun.xml.bind/jaxb-impl
/**
* Adds an additional element declaration.
*
* @param tagName
* The name of the element declaration to be added.
* @param type
* The type this element refers to.
* Can be null, in which case the element refers to an empty anonymous complex type.
*/
public void add( QName tagName, boolean isNillable, NonElement<T,C> type ) {
if(type!=null && type.getType()==navigator.ref(CompositeStructure.class))
return; // this is a special class we introduced for JAX-WS that we *don't* want in the schema
Namespace n = getNamespace(tagName.getNamespaceURI());
n.elementDecls.put(tagName.getLocalPart(), n.new ElementWithType(isNillable,type));
// search for foreign namespace references
if(type!=null)
n.addDependencyTo(type.getTypeName());
}
代码示例来源:origin: com.sun.xml.bind/jaxb-impl
Namespace ns = getNamespace(nsUri);
ns.classes.add(clazz);
ns.addDependencyTo(clazz.getTypeName());
Namespace n = getNamespace(nsUri);
n.classes.add(clazz);
if(aUri.length()>0) {
getNamespace(aUri).addGlobalAttribute(ap);
n.addDependencyTo(ap.getXmlName());
String eUri = tref.getTagName().getNamespaceURI();
if(eUri.length()>0 && !eUri.equals(n.uri)) {
getNamespace(eUri).addGlobalElement(tref);
n.addDependencyTo(tref.getTagName());
代码示例来源:origin: com.sun.xml.bind/jaxb-impl
/**
* Adds a new element to the list of elements to be written.
*/
public void add( ElementInfo<T,C> elem ) {
assert elem!=null;
@SuppressWarnings("UnusedAssignment")
boolean nillable = false; // default value
QName name = elem.getElementName();
Namespace n = getNamespace(name.getNamespaceURI());
ElementInfo ei;
if (elem.getScope() != null) { // (probably) never happens
ei = this.types.getElementInfo(elem.getScope().getClazz(), name);
} else {
ei = this.types.getElementInfo(null, name);
}
XmlElement xmlElem = ei.getProperty().readAnnotation(XmlElement.class);
if (xmlElem == null) {
nillable = false;
} else {
nillable = xmlElem.nillable();
}
n.elementDecls.put(name.getLocalPart(),n.new ElementWithType(nillable, elem.getContentType()));
// search for foreign namespace references
n.processForeignNamespaces(elem.getProperty(), 1);
}
代码示例来源:origin: org.glassfish.jaxb/jaxb-runtime
public void add( ArrayInfo<T,C> a ) {
assert a!=null;
final String namespaceURI = a.getTypeName().getNamespaceURI();
Namespace n = getNamespace(namespaceURI);
n.arrays.add(a);
// search for foreign namespace references
n.addDependencyTo(a.getItemType().getTypeName());
}
代码示例来源:origin: org.glassfish.jaxb/jaxb-runtime
public void add( EnumLeafInfo<T,C> envm ) {
assert envm!=null;
String nsUri = null;
if(envm.isElement()) {
// put element -> type reference
nsUri = envm.getElementName().getNamespaceURI();
Namespace ns = getNamespace(nsUri);
ns.enums.add(envm);
ns.addDependencyTo(envm.getTypeName());
// schedule writing this global element
add(envm.getElementName(),false,envm);
}
final QName typeName = envm.getTypeName();
if (typeName != null) {
nsUri = typeName.getNamespaceURI();
} else {
if(nsUri==null)
return; // anonymous type
}
Namespace n = getNamespace(nsUri);
n.enums.add(envm);
// search for foreign namespace references
n.addDependencyTo(envm.getBaseType().getTypeName());
}
代码示例来源:origin: org.glassfish.jaxb/jaxb-runtime
/**
* Adds an additional element declaration.
*
* @param tagName
* The name of the element declaration to be added.
* @param type
* The type this element refers to.
* Can be null, in which case the element refers to an empty anonymous complex type.
*/
public void add( QName tagName, boolean isNillable, NonElement<T,C> type ) {
if(type!=null && type.getType()==navigator.ref(CompositeStructure.class))
return; // this is a special class we introduced for JAX-WS that we *don't* want in the schema
Namespace n = getNamespace(tagName.getNamespaceURI());
n.elementDecls.put(tagName.getLocalPart(), n.new ElementWithType(isNillable,type));
// search for foreign namespace references
if(type!=null)
n.addDependencyTo(type.getTypeName());
}
代码示例来源:origin: org.glassfish.jaxb/jaxb-runtime
Namespace ns = getNamespace(nsUri);
ns.classes.add(clazz);
ns.addDependencyTo(clazz.getTypeName());
Namespace n = getNamespace(nsUri);
n.classes.add(clazz);
if(aUri.length()>0) {
getNamespace(aUri).addGlobalAttribute(ap);
n.addDependencyTo(ap.getXmlName());
String eUri = tref.getTagName().getNamespaceURI();
if(eUri.length()>0 && !eUri.equals(n.uri)) {
getNamespace(eUri).addGlobalElement(tref);
n.addDependencyTo(tref.getTagName());
代码示例来源:origin: org.glassfish.jaxb/jaxb-runtime
/**
* Adds a new element to the list of elements to be written.
*/
public void add( ElementInfo<T,C> elem ) {
assert elem!=null;
@SuppressWarnings("UnusedAssignment")
boolean nillable = false; // default value
QName name = elem.getElementName();
Namespace n = getNamespace(name.getNamespaceURI());
ElementInfo ei;
if (elem.getScope() != null) { // (probably) never happens
ei = this.types.getElementInfo(elem.getScope().getClazz(), name);
} else {
ei = this.types.getElementInfo(null, name);
}
XmlElement xmlElem = ei.getProperty().readAnnotation(XmlElement.class);
if (xmlElem == null) {
nillable = false;
} else {
nillable = xmlElem.nillable();
}
n.elementDecls.put(name.getLocalPart(),n.new ElementWithType(nillable, elem.getContentType()));
// search for foreign namespace references
n.processForeignNamespaces(elem.getProperty(), 1);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-impl
public void add( ArrayInfo<T,C> a ) {
assert a!=null;
final String namespaceURI = a.getTypeName().getNamespaceURI();
Namespace n = getNamespace(namespaceURI);
n.arrays.add(a);
// search for foreign namespace references
n.addDependencyTo(a.getItemType().getTypeName());
}
代码示例来源:origin: apache/servicemix-bundles
public void add( ArrayInfo<T,C> a ) {
assert a!=null;
final String namespaceURI = a.getTypeName().getNamespaceURI();
Namespace n = getNamespace(namespaceURI);
n.arrays.add(a);
// search for foreign namespace references
n.addDependencyTo(a.getItemType().getTypeName());
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-impl
/**
* Adds an additional element declaration.
*
* @param tagName
* The name of the element declaration to be added.
* @param type
* The type this element refers to.
* Can be null, in which case the element refers to an empty anonymous complex type.
*/
public void add( QName tagName, boolean isNillable, NonElement<T,C> type ) {
if(type!=null && type.getType()==navigator.ref(CompositeStructure.class))
return; // this is a special class we introduced for JAX-WS that we *don't* want in the schema
Namespace n = getNamespace(tagName.getNamespaceURI());
n.elementDecls.put(tagName.getLocalPart(), n.new ElementWithType(isNillable,type));
// search for foreign namespace references
if(type!=null)
n.addDependencyTo(type.getTypeName());
}
代码示例来源:origin: apache/servicemix-bundles
public void add( EnumLeafInfo<T,C> envm ) {
assert envm!=null;
String nsUri = null;
if(envm.isElement()) {
// put element -> type reference
nsUri = envm.getElementName().getNamespaceURI();
Namespace ns = getNamespace(nsUri);
ns.enums.add(envm);
ns.addDependencyTo(envm.getTypeName());
// schedule writing this global element
add(envm.getElementName(),false,envm);
}
final QName typeName = envm.getTypeName();
if (typeName != null) {
nsUri = typeName.getNamespaceURI();
} else {
if(nsUri==null)
return; // anonymous type
}
Namespace n = getNamespace(nsUri);
n.enums.add(envm);
// search for foreign namespace references
n.addDependencyTo(envm.getBaseType().getTypeName());
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-impl
public void add( EnumLeafInfo<T,C> envm ) {
assert envm!=null;
String nsUri = null;
if(envm.isElement()) {
// put element -> type reference
nsUri = envm.getElementName().getNamespaceURI();
Namespace ns = getNamespace(nsUri);
ns.enums.add(envm);
ns.addDependencyTo(envm.getTypeName());
// schedule writing this global element
add(envm.getElementName(),false,envm);
}
final QName typeName = envm.getTypeName();
if (typeName != null) {
nsUri = typeName.getNamespaceURI();
} else {
if(nsUri==null)
return; // anonymous type
}
Namespace n = getNamespace(nsUri);
n.enums.add(envm);
// search for foreign namespace references
n.addDependencyTo(envm.getBaseType().getTypeName());
}
代码示例来源:origin: apache/servicemix-bundles
/**
* Adds an additional element declaration.
*
* @param tagName
* The name of the element declaration to be added.
* @param type
* The type this element refers to.
* Can be null, in which case the element refers to an empty anonymous complex type.
*/
public void add( QName tagName, boolean isNillable, NonElement<T,C> type ) {
if(type!=null && type.getType()==navigator.ref(CompositeStructure.class))
return; // this is a special class we introduced for JAX-WS that we *don't* want in the schema
Namespace n = getNamespace(tagName.getNamespaceURI());
n.elementDecls.put(tagName.getLocalPart(), n.new ElementWithType(isNillable,type));
// search for foreign namespace references
if(type!=null)
n.addDependencyTo(type.getTypeName());
}
代码示例来源:origin: apache/servicemix-bundles
Namespace ns = getNamespace(nsUri);
ns.classes.add(clazz);
ns.addDependencyTo(clazz.getTypeName());
Namespace n = getNamespace(nsUri);
n.classes.add(clazz);
if(aUri.length()>0) {
getNamespace(aUri).addGlobalAttribute(ap);
n.addDependencyTo(ap.getXmlName());
String eUri = tref.getTagName().getNamespaceURI();
if(eUri.length()>0 && !eUri.equals(n.uri)) {
getNamespace(eUri).addGlobalElement(tref);
n.addDependencyTo(tref.getTagName());
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-impl
Namespace ns = getNamespace(nsUri);
ns.classes.add(clazz);
ns.addDependencyTo(clazz.getTypeName());
Namespace n = getNamespace(nsUri);
n.classes.add(clazz);
if(aUri.length()>0) {
getNamespace(aUri).addGlobalAttribute(ap);
n.addDependencyTo(ap.getXmlName());
String eUri = tref.getTagName().getNamespaceURI();
if(eUri.length()>0 && !eUri.equals(n.uri)) {
getNamespace(eUri).addGlobalElement(tref);
n.addDependencyTo(tref.getTagName());
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-impl
/**
* Adds a new element to the list of elements to be written.
*/
public void add( ElementInfo<T,C> elem ) {
assert elem!=null;
@SuppressWarnings("UnusedAssignment")
boolean nillable = false; // default value
QName name = elem.getElementName();
Namespace n = getNamespace(name.getNamespaceURI());
ElementInfo ei;
if (elem.getScope() != null) { // (probably) never happens
ei = this.types.getElementInfo(elem.getScope().getClazz(), name);
} else {
ei = this.types.getElementInfo(null, name);
}
XmlElement xmlElem = ei.getProperty().readAnnotation(XmlElement.class);
if (xmlElem == null) {
nillable = false;
} else {
nillable = xmlElem.nillable();
}
n.elementDecls.put(name.getLocalPart(),n.new ElementWithType(nillable, elem.getContentType()));
// search for foreign namespace references
n.processForeignNamespaces(elem.getProperty(), 1);
}
代码示例来源:origin: apache/servicemix-bundles
/**
* Adds a new element to the list of elements to be written.
*/
public void add( ElementInfo<T,C> elem ) {
assert elem!=null;
@SuppressWarnings("UnusedAssignment")
boolean nillable = false; // default value
QName name = elem.getElementName();
Namespace n = getNamespace(name.getNamespaceURI());
ElementInfo ei;
if (elem.getScope() != null) { // (probably) never happens
ei = this.types.getElementInfo(elem.getScope().getClazz(), name);
} else {
ei = this.types.getElementInfo(null, name);
}
XmlElement xmlElem = ei.getProperty().readAnnotation(XmlElement.class);
if (xmlElem == null) {
nillable = false;
} else {
nillable = xmlElem.nillable();
}
n.elementDecls.put(name.getLocalPart(),n.new ElementWithType(nillable, elem.getContentType()));
// search for foreign namespace references
n.processForeignNamespaces(elem.getProperty(), 1);
}
内容来源于网络,如有侵权,请联系作者删除!