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; }
operationsMapping.setAttributeName("operations"); operationsMapping.setAttributeAccessor(new AttributeAccessor() { public Object getAttributeValueFromObject(Object object) {
operationsMapping.setAttributeName("operations"); operationsMapping.setAttributeAccessor(new AttributeAccessor() { @Override
xmlChoiceMapping.setAttributeName(attributeName); copyAccessorToMapping(jaxbMapping, xmlChoiceMapping); xmlChoiceMapping.setProperties(jaxbMapping.getProperties());
xmlChoiceMapping.setAttributeName(attributeName); copyAccessorToMapping(jaxbMapping, xmlChoiceMapping); xmlChoiceMapping.setProperties(jaxbMapping.getProperties());