schemaRef.setSchemaContext(schemaContextWithSlash); schemaRef.setType(XMLSchemaReference.COMPLEX_TYPE); getXmlDescriptor().setSchemaReference(schemaRef);
schemaRef.setSchemaContext(schemaContextWithSlash); schemaRef.setType(XMLSchemaReference.COMPLEX_TYPE); getXmlDescriptor().setSchemaReference(schemaRef);
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; }
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; }
schemaReference.setSchemaContext("/sdo:Property"); xmlDescriptor.setSchemaReference(schemaReference);
schemaReference.setSchemaContext("/sdo:Property"); xmlDescriptor.setSchemaReference(schemaReference);
schemaReference.setSchemaContext("/sdo:Type"); xmlDescriptor.setSchemaReference(schemaReference);
schemaReference.setSchemaContext("/sdo:Type"); xmlDescriptor.setSchemaReference(schemaReference);