entrySet = new LinkedHashSet<MapEntry>(); final ComplexType featureType = feature.getType(); PropertyDescriptor attributeDescr = featureType.getDescriptor(attributeName); Property property = feature.getProperty(attributeName);
public PropertyDescriptor getDescriptor(String name) { return ((ComplexType) getSubject()).getDescriptor(name); }
public PropertyDescriptor getDescriptor(Name name) { return ((ComplexType) getSubject()).getDescriptor(name); }
/** * Return true if name is the name of a descriptor of the type or of an ancestor type. * * @param type type to test * @param name name of descriptor * @return true if the type or an ancestor has a descriptor of this name */ private boolean isValidDescriptor(ComplexType type, Name name) { if (type.getDescriptor(name) != null) { return true; } else if (type.getSuper() instanceof ComplexType) { return isValidDescriptor((ComplexType) type.getSuper(), name); } else { return false; } }
public Object getImmediateNode() { // first try regular way PropertyType pt = descriptor.getType(); if (pt instanceof ComplexType) { ComplexType ct = (ComplexType) pt; PropertyDescriptor ad = ct.getDescriptor("@" + name.getLocalPart()); if (ad != null) { return ad; } } XSDElementDeclaration decl = (XSDElementDeclaration) descriptor.getUserData().get(XSDElementDeclaration.class); Iterator it = Schemas.getAttributeDeclarations(decl).iterator(); while (it.hasNext()) { XSDAttributeDeclaration attDecl = ((XSDAttributeDeclaration) it.next()); if (attDecl.getURI() .equals( (name.getNamespaceURI() == null ? "" : name.getNamespaceURI()) + "#" + name.getLocalPart())) { return name; } } return null; }
PropertyDescriptor descriptor = complexType.getDescriptor(currentTagName); if (descriptor != null) {
public PropertyDescriptor getDescriptor(String name) { return ((ComplexType) getSubject()).getDescriptor(name); }
public PropertyDescriptor getDescriptor(Name name) { return ((ComplexType) getSubject()).getDescriptor(name); }
public PropertyDescriptor getDescriptor(Name name) { return ((ComplexType) getSubject()).getDescriptor(name); }
public PropertyDescriptor getDescriptor(String name) { return ((ComplexType) getSubject()).getDescriptor(name); }
ComplexType complexAttType = (ComplexType) complexDesc.getType(); AttributeDescriptor rootDesc = (AttributeDescriptor) complexAttType.getDescriptor(ROOT_ATTRIBUTE); ComplexType rootAttType = (ComplexType) rootDesc.getType(); (AttributeDescriptor) rootAttType.getDescriptor(MULTI_LEAF_ATTRIBUTE); (AttributeDescriptor) rootAttType.getDescriptor(SINGLE_LEAF_ATTRIBUTE); AttributeImpl singleLeaf = new AttributeImpl("single leaf value", singleLeafDesc, null); rootPropertiesOne.add(singleLeaf);
public Object getImmediateNode() { // first try regular way PropertyType pt = descriptor.getType(); if (pt instanceof ComplexType) { ComplexType ct = (ComplexType) pt; PropertyDescriptor ad = ct.getDescriptor("@" + name.getLocalPart()); if (ad != null) { return ad; } } XSDElementDeclaration decl = (XSDElementDeclaration) descriptor.getUserData().get(XSDElementDeclaration.class); Iterator it = Schemas.getAttributeDeclarations(decl).iterator(); while (it.hasNext()) { XSDAttributeDeclaration attDecl = ((XSDAttributeDeclaration) it.next()); if (attDecl.getURI() .equals( (name.getNamespaceURI() == null ? "" : name.getNamespaceURI()) + "#" + name.getLocalPart())) { return name; } } return null; }
PropertyDescriptor descriptor = complexType.getDescriptor(currentTagName); if (descriptor != null) {
AttributeDescriptor rootDesc = (AttributeDescriptor) complexAttType.getDescriptor(ROOT_ATTRIBUTE) ; ComplexType rootAttType = (ComplexType) rootDesc.getType(); AttributeDescriptor multiLeafDesc = (AttributeDescriptor) rootAttType.getDescriptor(MULTI_LEAF_ATTRIBUTE); rootPropertiesOne.add(leafTwo); AttributeDescriptor singleLeafDesc = (AttributeDescriptor) rootAttType.getDescriptor(SINGLE_LEAF_ATTRIBUTE); AttributeImpl singleLeaf = new AttributeImpl("single leaf value", singleLeafDesc, null); rootPropertiesOne.add(singleLeaf);
ComplexType complexAttType = (ComplexType) complexDesc.getType(); AttributeDescriptor rootDesc = (AttributeDescriptor) complexAttType.getDescriptor(ROOT_ATTRIBUTE); ComplexType rootAttType = (ComplexType) rootDesc.getType(); (AttributeDescriptor) rootAttType.getDescriptor(MULTI_LEAF_ATTRIBUTE); (AttributeDescriptor) rootAttType.getDescriptor(SINGLE_LEAF_ATTRIBUTE); AttributeImpl singleLeaf = new AttributeImpl("single leaf value", singleLeafDesc, null); rootPropertiesOne.add(singleLeaf);