- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.eclipse.persistence.oxm.schema.XMLSchemaReference.getSchemaContext()
方法的一些代码示例,展示了XMLSchemaReference.getSchemaContext()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLSchemaReference.getSchemaContext()
方法的具体详情如下:
包路径:org.eclipse.persistence.oxm.schema.XMLSchemaReference
类名称:XMLSchemaReference
方法名:getSchemaContext
[英]Get the path to the simple/complex type definition, element or group to be referenced in the schema
[中]获取架构中要引用的简单/复杂类型定义、元素或组的路径
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
protected void addTypeAttributeIfNeeded(XMLDescriptor descriptor, DatabaseMapping mapping, MarshalRecord marshalRecord) {
XMLSchemaReference xmlRef = descriptor.getSchemaReference();
if (xmlCompositeCollectionMapping.shouldAddXsiType(marshalRecord, descriptor) && (xmlRef != null)) {
addTypeAttribute(descriptor, marshalRecord, xmlRef.getSchemaContext());
}
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
private void writeTypeAttribute(MarshalRecord marshalRecord, XMLDescriptor descriptor, String xsiPrefix) {
//xsi:type=schemacontext
String typeValue = descriptor.getSchemaReference().getSchemaContext();
// handle case where the schema context is set as a QName
if (typeValue == null) {
QName contextAsQName = descriptor.getSchemaReference().getSchemaContextAsQName();
if (contextAsQName == null) {
return;
}
String uri = contextAsQName.getNamespaceURI();
String localPart = contextAsQName.getLocalPart();
String prefix = marshalRecord.getNamespaceResolver().resolveNamespaceURI(uri);
if (prefix == null) {
String defaultUri = marshalRecord.getNamespaceResolver().getDefaultNamespaceURI();
if (defaultUri != null && defaultUri.equals(uri)) {
typeValue = localPart;
} else {
prefix = marshalRecord.getNamespaceResolver().generatePrefix();
marshalRecord.attribute(XMLConstants.XMLNS_URL, prefix, XMLConstants.XMLNS + XMLConstants.COLON + prefix, uri);
typeValue = prefix + XMLConstants.COLON + localPart;
}
} else {
typeValue = prefix + XMLConstants.COLON + localPart;
}
} else {
typeValue = typeValue.substring(1);
}
marshalRecord.attribute(XMLConstants.SCHEMA_INSTANCE_URL, XMLConstants.SCHEMA_TYPE_ATTRIBUTE, xsiPrefix + XMLConstants.COLON + XMLConstants.SCHEMA_TYPE_ATTRIBUTE, typeValue);
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
String schemaContext = xmlSchemaReference.getSchemaContext();
if ((xmlSchemaReference.getType() == XMLSchemaReference.COMPLEX_TYPE) || (xmlSchemaReference.getType() == XMLSchemaReference.SIMPLE_TYPE)) {
if ((null != schemaContext) && (schemaContext.lastIndexOf('/') == 0)) {
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
protected void addTypeAttributeIfNeeded(XMLDescriptor descriptor, DatabaseMapping mapping, MarshalRecord marshalRecord) {
XMLSchemaReference xmlRef = descriptor.getSchemaReference();
if (xmlCompositeObjectMapping.shouldAddXsiType(marshalRecord, descriptor) && (xmlRef != null)) {
addTypeAttribute(descriptor, marshalRecord, xmlRef.getSchemaContext());
}
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
String schemaContext = xmlSchemaReference.getSchemaContext();
if ((xmlSchemaReference.getType() == XMLSchemaReference.COMPLEX_TYPE) || (xmlSchemaReference.getType() == XMLSchemaReference.SIMPLE_TYPE)) {
if ((null != schemaContext) && (schemaContext.lastIndexOf('/') == 0)) {
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* <p>INTERNAL:
*/
@SuppressWarnings("rawtypes")
public void buildDescriptorIndex() {
for (Iterator i = xrService.oxSession.getProject().getOrderedDescriptors().iterator();
i.hasNext();) {
XMLDescriptor xd = (XMLDescriptor)i.next();
XMLSchemaReference schemaReference = xd.getSchemaReference();
if (schemaReference != null && schemaReference.getType() == XMLSchemaReference.COMPLEX_TYPE) {
String context = schemaReference.getSchemaContext();
if (context != null && context.lastIndexOf(SLASH_CHAR) == 0) {
String elementNameNS = context.substring(1);
QName elementName = resolveName(elementNameNS, xd.getNamespaceResolver());
if (elementName == null) {
continue;
}
xrService.descriptorsByQName.put(elementName, xd);
}
}
}
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
String schemaContext = xmlSchemaReference.getSchemaContext();
if ((xmlSchemaReference.getType() == XMLSchemaReference.COMPLEX_TYPE) || (xmlSchemaReference.getType() == XMLSchemaReference.SIMPLE_TYPE)) {
if ((null != schemaContext) && (schemaContext.lastIndexOf('/') == 0)) {
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.dbws
/**
* <p>INTERNAL:
*/
@SuppressWarnings("rawtypes")
public void buildDescriptorIndex() {
for (Iterator i = xrService.oxSession.getProject().getOrderedDescriptors().iterator();
i.hasNext();) {
XMLDescriptor xd = (XMLDescriptor)i.next();
XMLSchemaReference schemaReference = xd.getSchemaReference();
if (schemaReference != null && schemaReference.getType() == XMLSchemaReference.COMPLEX_TYPE) {
String context = schemaReference.getSchemaContext();
if (context != null && context.lastIndexOf(SLASH_CHAR) == 0) {
String elementNameNS = context.substring(1);
QName elementName = resolveName(elementNameNS, xd.getNamespaceResolver());
if (elementName == null) {
continue;
}
xrService.descriptorsByQName.put(elementName, xd);
}
}
}
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
return true;
} else if (((xmlRef.getType() == XMLSchemaReference.COMPLEX_TYPE) || (xmlRef.getType() == XMLSchemaReference.SIMPLE_TYPE)) && xmlRef.getSchemaContext() != null && xmlRef.isGlobalDefinition()) {
QName ctxQName = xmlRef.getSchemaContextAsQName(descriptor.getNamespaceResolver());
if (!ctxQName.equals(leafType)) {
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
String value = xmlDescriptor.getSchemaReference().getSchemaContext();
String value = xmlDescriptor.getSchemaReference().getSchemaContext();
typeAttr.setValue(value);
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
return true;
} else if (((xmlRef.getType() == XMLSchemaReference.COMPLEX_TYPE) || (xmlRef.getType() == XMLSchemaReference.SIMPLE_TYPE)) && xmlRef.getSchemaContext() != null && xmlRef.isGlobalDefinition()) {
QName ctxQName = xmlRef.getSchemaContextAsQName(descriptor.getNamespaceResolver());
if (!ctxQName.equals(leafType)) {
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
String value = xmlDescriptor.getSchemaReference().getSchemaContext();
String value = xmlDescriptor.getSchemaReference().getSchemaContext();
typeAttr.setValue(value);
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
marshalRecord.put(xmlField, xmlRef.getSchemaContext().substring(1));
marshalRecord.closeStartGroupingElements(groupingFragment);
} else {
marshalRecord.closeStartGroupingElements(groupingFragment);
marshalRecord.put(xmlField, xmlRef.getSchemaContext().substring(1));
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
if (writeTypeAttribute && (descriptor.getSchemaReference() != null) && (descriptor.getSchemaReference().getSchemaContext() != null)) {
((Element) xmlRow.getDOM()).setAttributeNS(XMLConstants.XMLNS_URL, XMLConstants.XMLNS + XMLConstants.COLON + XMLConstants.SCHEMA_INSTANCE_PREFIX, XMLConstants.SCHEMA_INSTANCE_URL);
String typeValue = descriptor.getSchemaReference().getSchemaContext();
typeValue = typeValue.substring(1);
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.sdo
String schemaContext = ((SDOType)value.getType()).getXmlDescriptor().getSchemaReference().getSchemaContext();
QName schemaContextQName = ((SDOType)value.getType()).getXmlDescriptor().getSchemaReference().getSchemaContextAsQName(((SDOType)value.getType()).getXmlDescriptor().getNonNullNamespaceResolver());
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
String typeValue = descriptor.getSchemaReference().getSchemaContext();
addTypeAttribute(descriptor, marshalRecord, typeValue);
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
String schemaContext = ((SDOType)value.getType()).getXmlDescriptor().getSchemaReference().getSchemaContext();
QName schemaContextQName = ((SDOType)value.getType()).getXmlDescriptor().getSchemaReference().getSchemaContextAsQName(((SDOType)value.getType()).getXmlDescriptor().getNonNullNamespaceResolver());
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.moxy
if (superDescriptor != null) {
XMLSchemaReference sRef = descriptor.getSchemaReference();
if (sRef == null || sRef.getSchemaContext() == null) {
return;
} else {
XMLSchemaReference rootSRef = rootDescriptor.getSchemaReference();
if (rootSRef != null && rootSRef.getSchemaContext() != null) {
QName rootSCtx = rootSRef.getSchemaContextAsQName();
rootDescriptor.getInheritancePolicy().addClassNameIndicator(rootDescriptor.getJavaClassName(), rootSCtx);
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
writeXsiTypeAttribute(xmlDescriptor, (DOMRecord)record, xmlRef.getSchemaContext().substring(1));
writeXsiTypeAttribute(xmlDescriptor, (DOMRecord)record, xmlRef.getSchemaContext().substring(1));
} else {
writeXsiTypeAttribute(xmlDescriptor, (DOMRecord)record, xmlRef.getSchemaContext().substring(1));
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
if (!ctx.equals(xmlDescriptor.getDefaultRootElementType())) {
row.add(xmlDescriptor.getInheritancePolicy().getClassIndicatorField(), xmlRef.getSchemaContext().substring(1));
本文整理了Java中org.eclipse.persistence.oxm.schema.XMLSchemaReference.getSchemaContext()方法的一些代码示例,展示了XMLSc
本文整理了Java中org.opendaylight.yangtools.yang.parser.repo.YangTextSchemaContextResolver.getSchemaContext
我是一名优秀的程序员,十分优秀!