gpt4 book ai didi

org.eclipse.persistence.oxm.schema.XMLSchemaReference.setSchemaContext()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-18 23:24:40 26 4
gpt4 key购买 nike

本文整理了Java中org.eclipse.persistence.oxm.schema.XMLSchemaReference.setSchemaContext()方法的一些代码示例,展示了XMLSchemaReference.setSchemaContext()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLSchemaReference.setSchemaContext()方法的具体详情如下:
包路径:org.eclipse.persistence.oxm.schema.XMLSchemaReference
类名称:XMLSchemaReference
方法名:setSchemaContext

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);

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com