本文整理了Java中javax.xml.bind.annotation.XmlType.namespace()
方法的一些代码示例,展示了XmlType.namespace()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlType.namespace()
方法的具体详情如下:
包路径:javax.xml.bind.annotation.XmlType
类名称:XmlType
方法名:namespace
暂无
代码示例来源:origin: com.sun.xml.bind/jaxb-impl
public String namespace() {
return core.namespace();
}
代码示例来源:origin: spring-projects/spring-framework
XmlType annotation = outputClass.getAnnotation(XmlType.class);
localPart = annotation.name();
namespaceUri = annotation.namespace();
代码示例来源:origin: org.springframework/spring-web
XmlType annotation = outputClass.getAnnotation(XmlType.class);
localPart = annotation.name();
namespaceUri = annotation.namespace();
代码示例来源:origin: com.sun.xml.bind/jaxb-impl
String local="##default";
if(t!=null) {
nsUri = t.namespace();
local = t.name();
代码示例来源:origin: org.glassfish.jaxb/jaxb-runtime
public String namespace() {
return core.namespace();
}
代码示例来源:origin: org.glassfish.jaxb/jaxb-runtime
String local="##default";
if(t!=null) {
nsUri = t.namespace();
local = t.name();
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-impl
public String namespace() {
return core.namespace();
}
代码示例来源:origin: apache/servicemix-bundles
public String namespace() {
return core.namespace();
}
代码示例来源:origin: net.stickycode/sticky-resource
/**
* TODO This is not sufficient it needs to check package annotations etc as well
*/
private String namespace(XmlType annotation) {
if (annotation.namespace().equals("##default"))
return "";
return annotation.namespace();
}
代码示例来源:origin: org.wso2.staxon/staxon
protected String getNamespaceURI(XmlType xmlType, XmlSchema xmlSchema) {
if ("##default".equals(xmlType.namespace())) {
return xmlSchema == null ? XMLConstants.NULL_NS_URI : xmlSchema.namespace();
} else {
return xmlType.namespace();
}
}
代码示例来源:origin: wso2/wso2-synapse
protected String getNamespaceURI(XmlType xmlType, XmlSchema xmlSchema) {
if ("##default".equals(xmlType.namespace())) {
return xmlSchema == null ? XMLConstants.NULL_NS_URI : xmlSchema.namespace();
} else {
return xmlType.namespace();
}
}
代码示例来源:origin: beckchr/staxon
protected String getNamespaceURI(XmlType xmlType, XmlSchema xmlSchema) {
if ("##default".equals(xmlType.namespace())) {
return xmlSchema == null ? XMLConstants.NULL_NS_URI : xmlSchema.namespace();
} else {
return xmlType.namespace();
}
}
代码示例来源:origin: stoicflame/enunciate
/**
* The namespace of the xml type element.
*
* @return The namespace of the xml type element.
*/
public String getNamespace() {
String namespace = getPackage().getNamespace();
if ((xmlType != null) && (!"##default".equals(xmlType.namespace()))) {
namespace = xmlType.namespace();
}
return namespace;
}
代码示例来源:origin: org.codehaus.enunciate/enunciate-core
/**
* The namespace of the xml type element.
*
* @return The namespace of the xml type element.
*/
public String getNamespace() {
String namespace = getPackage().getNamespace();
if ((xmlType != null) && (!"##default".equals(xmlType.namespace()))) {
namespace = xmlType.namespace();
}
return namespace;
}
代码示例来源:origin: org.codehaus.enunciate/enunciate-full
/**
* The namespace of the xml type element.
*
* @return The namespace of the xml type element.
*/
public String getNamespace() {
String namespace = getPackage().getNamespace();
if ((xmlType != null) && (!"##default".equals(xmlType.namespace()))) {
namespace = xmlType.namespace();
}
return namespace;
}
代码示例来源:origin: com.webcohesion.enunciate/enunciate-jaxb
/**
* The namespace of the xml type element.
*
* @return The namespace of the xml type element.
*/
public String getNamespace() {
String namespace = getPackage().getNamespace();
if ((xmlType != null) && (!"##default".equals(xmlType.namespace()))) {
namespace = xmlType.namespace();
}
return namespace;
}
代码示例来源:origin: mklemm/jaxb2-rich-contract-plugin
private static String getNamespaceUri(final Class<?> boundClass) {
final XmlRootElement elementAnnotation = boundClass.getAnnotation(XmlRootElement.class);
if (elementAnnotation != null && !"##default".equals(elementAnnotation.namespace())) {
return elementAnnotation.namespace();
} else {
final XmlType xmlTypeAnnotation = boundClass.getAnnotation(XmlType.class);
if (xmlTypeAnnotation != null && !"##default".equals(xmlTypeAnnotation.namespace())) {
return xmlTypeAnnotation.namespace();
} else {
return getNamespaceUri(boundClass.getPackage());
}
}
}
代码示例来源:origin: Evolveum/midpoint
private String determineNamespaceUncached(Class<?> beanClass) {
XmlType xmlType = beanClass.getAnnotation(XmlType.class);
if (xmlType == null) {
return null;
}
String namespace = xmlType.namespace();
if (BeanMarshaller.DEFAULT_PLACEHOLDER.equals(namespace)) {
XmlSchema xmlSchema = beanClass.getPackage().getAnnotation(XmlSchema.class);
namespace = xmlSchema.namespace();
}
if (StringUtils.isBlank(namespace) || BeanMarshaller.DEFAULT_PLACEHOLDER.equals(namespace)) {
return null;
}
return namespace;
}
代码示例来源:origin: apache/cxf
protected QName getJaxbQName(Class<?> cls, Type type, Object object, boolean pluralName)
throws Exception {
if (cls == JAXBElement.class) {
return object != null ? ((JAXBElement<?>)object).getName() : null;
}
XmlRootElement root = cls.getAnnotation(XmlRootElement.class);
if (root != null) {
return getQNameFromNamespaceAndName(root.namespace(), root.name(), cls, pluralName);
} else if (isXmlType(cls)) {
XmlType xmlType = cls.getAnnotation(XmlType.class);
return getQNameFromNamespaceAndName(xmlType.namespace(), xmlType.name(), cls, pluralName);
} else {
return new QName(getPackageNamespace(cls), cls.getSimpleName());
}
}
代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs
protected QName getJaxbQName(Class<?> cls, Type type, Object object, boolean pluralName)
throws Exception {
if (cls == JAXBElement.class) {
return object != null ? ((JAXBElement<?>)object).getName() : null;
}
XmlRootElement root = cls.getAnnotation(XmlRootElement.class);
if (root != null) {
return getQNameFromNamespaceAndName(root.namespace(), root.name(), cls, pluralName);
} else if (isXmlType(cls)) {
XmlType xmlType = cls.getAnnotation(XmlType.class);
return getQNameFromNamespaceAndName(xmlType.namespace(), xmlType.name(), cls, pluralName);
} else {
return new QName(getPackageNamespace(cls), cls.getSimpleName());
}
}
内容来源于网络,如有侵权,请联系作者删除!