private DatabaseMapping buildXMLChoiceCollectionMapping(String mappingUri) { XMLChoiceCollectionMapping mapping = new XMLChoiceCollectionMapping(); mapping.setAttributeName(getName()); mapping.useCollectionClass(ListWrapper.class); //First add XPath for this property String xPath = getQualifiedXPath(mappingUri, getType().isDataType()); mapping.addChoiceElement(xPath, getType().getImplClass()); //For each substitutable property, create the xpath and add it. Iterator<SDOProperty> properties = this.getSubstitutableElements().iterator(); while(properties.hasNext()) { SDOProperty nextProp = properties.next(); xPath = nextProp.getQualifiedXPath(mappingUri, nextProp.getType().isDataType(), getContainingType()); mapping.addChoiceElement(xPath, nextProp.getType().getImplClass()); } return mapping; }
private DatabaseMapping buildXMLChoiceCollectionMapping(String mappingUri) { XMLChoiceCollectionMapping mapping = new XMLChoiceCollectionMapping(); mapping.setAttributeName(getName()); mapping.useCollectionClass(ListWrapper.class); //First add XPath for this property String xPath = getQualifiedXPath(mappingUri, getType().isDataType()); mapping.addChoiceElement(xPath, getType().getImplClass()); //For each substitutable property, create the xpath and add it. Iterator<SDOProperty> properties = this.getSubstitutableElements().iterator(); while(properties.hasNext()) { SDOProperty nextProp = properties.next(); xPath = nextProp.getQualifiedXPath(mappingUri, nextProp.getType().isDataType(), getContainingType()); mapping.addChoiceElement(xPath, nextProp.getType().getImplClass()); } return mapping; }
descriptor.addMapping(sessionFile); XMLChoiceCollectionMapping operationsMapping = new XMLChoiceCollectionMapping(); operationsMapping.setAttributeName("operations"); operationsMapping.setAttributeAccessor(new AttributeAccessor() {
public ChoiceCollectionMapping generateChoiceCollectionMapping(Property property, Descriptor descriptor, NamespaceInfo namespace) { ChoiceCollectionMapping mapping = new XMLChoiceCollectionMapping(); initializeXMLContainerMapping(mapping, property.getType().isArray()); initializeXMLMapping((XMLChoiceCollectionMapping)mapping, property);
descriptor.addMapping(sessionFile); XMLChoiceCollectionMapping operationsMapping = new XMLChoiceCollectionMapping(); operationsMapping.setAttributeName("operations"); operationsMapping.setAttributeAccessor(new AttributeAccessor() {
public ChoiceCollectionMapping generateChoiceCollectionMapping(Property property, Descriptor descriptor, NamespaceInfo namespace) { ChoiceCollectionMapping mapping = new XMLChoiceCollectionMapping(); initializeXMLContainerMapping(mapping, property.getType().isArray()); initializeXMLMapping((XMLChoiceCollectionMapping)mapping, property);
mapping = new XMLChoiceCollectionMapping(); initializeXMLContainerMapping((ChoiceCollectionMapping) mapping, property.getType().isArray()); JavaClass collectionType = property.getType();
mapping = new XMLChoiceCollectionMapping(); initializeXMLContainerMapping((ChoiceCollectionMapping) mapping, property.getType().isArray()); JavaClass collectionType = property.getType();
XMLChoiceCollectionMapping xmlChoiceMapping = new XMLChoiceCollectionMapping(); xmlChoiceMapping.setAttributeName(attributeName); copyAccessorToMapping(jaxbMapping, xmlChoiceMapping);
XMLChoiceCollectionMapping xmlChoiceMapping = new XMLChoiceCollectionMapping(); xmlChoiceMapping.setAttributeName(attributeName); copyAccessorToMapping(jaxbMapping, xmlChoiceMapping);