本文整理了Java中org.eclipse.persistence.oxm.schema.XMLSchemaReference.setSchemaContext()
方法的一些代码示例,展示了XMLSchemaReference.setSchemaContext()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLSchemaReference.setSchemaContext()
方法的具体详情如下:
包路径:org.eclipse.persistence.oxm.schema.XMLSchemaReference
类名称:XMLSchemaReference
方法名:setSchemaContext
[英]Set the path to the simple/complex type definition, element, or group to be referenced in the schema
[中]设置要在架构中引用的简单/复杂类型定义、元素或组的路径
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.sdo
schemaRef.setSchemaContext(schemaContextWithSlash);
schemaRef.setType(XMLSchemaReference.COMPLEX_TYPE);
getXmlDescriptor().setSchemaReference(schemaRef);
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
schemaRef.setSchemaContext(schemaContextWithSlash);
schemaRef.setType(XMLSchemaReference.COMPLEX_TYPE);
getXmlDescriptor().setSchemaReference(schemaRef);
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
protected ClassDescriptor buildDatabaseFieldDescriptor() {
XMLDescriptor descriptor = new XMLDescriptor();
descriptor.setJavaClass(DatabaseField.class);
descriptor.setDefaultRootElement("field");
descriptor.getInheritancePolicy().setClassIndicatorField(new XMLField("@xsi:type"));
descriptor.getInheritancePolicy().addClassIndicator(DatabaseField.class, getSecondaryNamespaceXPath() + "column");
descriptor.getInheritancePolicy().addClassIndicator(XMLField.class, getPrimaryNamespaceXPath() + "node");
descriptor.getInheritancePolicy().addClassIndicator(XMLUnionField.class, getPrimaryNamespaceXPath() + "union-node");
XMLSchemaReference reference = new XMLSchemaClassPathReference();
reference.setSchemaContext("/"+ getSecondaryNamespaceXPath() + "column");
descriptor.setSchemaReference(reference);
XMLDirectMapping tableMapping = new XMLDirectMapping();
tableMapping.setAttributeName("table");
tableMapping.setGetMethodName("getTableName");
tableMapping.setSetMethodName("setTableName");
tableMapping.setXPath("@table");
tableMapping.setNullValue("");
descriptor.addMapping(tableMapping);
XMLDirectMapping nameMapping = new XMLDirectMapping();
nameMapping.setAttributeName("name");
nameMapping.setGetMethodName("getName");
nameMapping.setSetMethodName("setName");
nameMapping.setXPath("@name");
nameMapping.getNullPolicy().setNullRepresentedByEmptyNode(false);
descriptor.addMapping(nameMapping);
return descriptor;
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
protected ClassDescriptor buildDatabaseFieldDescriptor() {
XMLDescriptor descriptor = new XMLDescriptor();
descriptor.setJavaClass(DatabaseField.class);
descriptor.setDefaultRootElement("field");
descriptor.getInheritancePolicy().setClassIndicatorField(new XMLField("@xsi:type"));
descriptor.getInheritancePolicy().addClassIndicator(DatabaseField.class, getSecondaryNamespaceXPath() + "column");
descriptor.getInheritancePolicy().addClassIndicator(XMLField.class, getPrimaryNamespaceXPath() + "node");
descriptor.getInheritancePolicy().addClassIndicator(XMLUnionField.class, getPrimaryNamespaceXPath() + "union-node");
XMLSchemaReference reference = new XMLSchemaClassPathReference();
reference.setSchemaContext("/"+ getSecondaryNamespaceXPath() + "column");
descriptor.setSchemaReference(reference);
XMLDirectMapping tableMapping = new XMLDirectMapping();
tableMapping.setAttributeName("table");
tableMapping.setGetMethodName("getTableName");
tableMapping.setSetMethodName("setTableName");
tableMapping.setXPath("@table");
tableMapping.setNullValue("");
descriptor.addMapping(tableMapping);
XMLDirectMapping nameMapping = new XMLDirectMapping();
nameMapping.setAttributeName("name");
nameMapping.setGetMethodName("getName");
nameMapping.setSetMethodName("setName");
nameMapping.setXPath("@name");
nameMapping.getNullPolicy().setNullRepresentedByEmptyNode(false);
descriptor.addMapping(nameMapping);
return descriptor;
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
schemaReference.setSchemaContext("/sdo:Property");
xmlDescriptor.setSchemaReference(schemaReference);
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.sdo
schemaReference.setSchemaContext("/sdo:Property");
xmlDescriptor.setSchemaReference(schemaReference);
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
schemaReference.setSchemaContext("/sdo:Type");
xmlDescriptor.setSchemaReference(schemaReference);
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.sdo
schemaReference.setSchemaContext("/sdo:Type");
xmlDescriptor.setSchemaReference(schemaReference);
内容来源于网络,如有侵权,请联系作者删除!