List<AttributeDescriptor> substitutionGroup = (List<AttributeDescriptor>) attributeDescr.getUserData().get("substitutionGroup"); if (substitutionGroup != null) { Iterator<AttributeDescriptor> it = substitutionGroup.iterator();
private boolean getEncodeIfEmpty(Property p) { Object o = ((p.getDescriptor()).getUserData().get("encodeIfEmpty")); if (o == null) { return false; } return (Boolean) o; }
/** * Return true if an attribute from a type is an element. * * @param type The type to search in. * @param att The attribute name. * @return True if the attribute exists in the type and is an element. */ public static boolean isElement(ComplexType type, Name att) { PropertyDescriptor descriptor = Types.descriptor(type, att); if (descriptor == null) { return false; } Map<Object, Object> userData = descriptor.getUserData(); if (userData.isEmpty()) { return false; } return userData.get(XSDElementDeclaration.class) != null; }
(List<AttributeDescriptor>) it.next().getUserData().get("substitutionGroup"); if (substitutionGroup != null) { for (Iterator<AttributeDescriptor> it2 = substitutionGroup.iterator();
(List<AttributeDescriptor>) it.next().getUserData().get("substitutionGroup"); if (substitutionGroup != null) { for (Iterator<AttributeDescriptor> it2 = substitutionGroup.iterator();
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; }
CoordinateReferenceSystem crs) { if (descriptor.getUserData().get("substitutionGroup") != null) { descriptor.getUserData().put("substitutionGroup", substitutionGroup);
if (complex instanceof ComplexAttribute) { PropertyDescriptor descriptor = ((Attribute) complex).getDescriptor(); if (descriptor.getUserData() != null) { Object propertyElement = descriptor.getUserData().get(XSDElementDeclaration.class); if (propertyElement != null && propertyElement instanceof XSDElementDeclaration) { ComplexAttribute newComplexAtt = (ComplexAttribute) complex; PropertyDescriptor descriptor = newComplexAtt.getDescriptor(); if (descriptor.getUserData() != null) { Object propertyElement = descriptor.getUserData().get(XSDElementDeclaration.class); if (propertyElement != null && propertyElement instanceof XSDElementDeclaration) { ComplexAttribute newComplexAtt = (ComplexAttribute) complex; PropertyDescriptor descriptor = ((Attribute) complex).getDescriptor(); if (descriptor.getUserData() != null) { Object propertyElement = descriptor.getUserData().get(XSDElementDeclaration.class); if (propertyElement != null && propertyElement instanceof XSDElementDeclaration) {
private boolean getEncodeIfEmpty(Property p) { Object o = ((p.getDescriptor()).getUserData().get("encodeIfEmpty")); if (o == null) { return false; } return (Boolean) o; } }
String getSourceName(String name) { PropertyDescriptor pd = getDescriptor(name); if (pd == null) { return null; } else { return (String) pd.getUserData().get(JDBCOpenSearchAccess.SOURCE_ATTRIBUTE); } } }
/** * Return true if an attribute from a type is an element. * * @param type The type to search in. * @param att The attribute name. * @return True if the attribute exists in the type and is an element. */ public static boolean isElement(ComplexType type, Name att) { PropertyDescriptor descriptor = Types.descriptor(type, att); if (descriptor == null) { return false; } Map<Object, Object> userData = descriptor.getUserData(); if (userData.isEmpty()) { return false; } return userData.get(XSDElementDeclaration.class) != null; }
/** * Return true if an attribute from a type is an element. * * @param type * The type to search in. * @param att * The attribute name. * @return True if the attribute exists in the type and is an element. */ public static boolean isElement(ComplexType type, Name att) { PropertyDescriptor descriptor = Types.descriptor(type, att); if (descriptor == null) { return false; } Map<Object, Object> userData = descriptor.getUserData(); if (userData.isEmpty()) { return false; } return userData.get(XSDElementDeclaration.class) != null; }
public Object getImmediateNode() { 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; }
List<AttributeDescriptor> substitutionGroup = (List<AttributeDescriptor>) it.next().getUserData().get("substitutionGroup"); if (substitutionGroup != null){ for (Iterator<AttributeDescriptor> it2 = substitutionGroup.iterator(); it2.hasNext();) {
List<AttributeDescriptor> substitutionGroup = (List<AttributeDescriptor>) it.next().getUserData().get("substitutionGroup"); if (substitutionGroup != null){ for (Iterator<AttributeDescriptor> it2 = substitutionGroup.iterator(); it2.hasNext();) {
/** * Start Generic Record Builder based on the Record Descriptor * * @param recordDescriptor The Record Descriptor */ public GenericRecordBuilder(RecordDescriptor recordDescriptor) { this.recordDescriptor = recordDescriptor; fb = new ComplexFeatureBuilder(recordDescriptor.getFeatureDescriptor()); for (PropertyDescriptor descriptor : recordDescriptor.getFeatureType().getDescriptors()) { @SuppressWarnings("unchecked") List<AttributeDescriptor> substitutionGroup = (List<AttributeDescriptor>) descriptor.getUserData().get("substitutionGroup"); if (substitutionGroup != null) { for (Iterator<AttributeDescriptor> it = substitutionGroup.iterator(); it.hasNext(); ) { substitutionMap.put(it.next().getName(), descriptor.getName()); } } substitutionMap.put(descriptor.getName(), descriptor.getName()); } }
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; }
CoordinateReferenceSystem crs) { if (descriptor.getUserData().get("substitutionGroup") != null) { descriptor.getUserData().put("substitutionGroup", substitutionGroup);
continue; String localName = (String) pd.getUserData().get(JDBCOpenSearchAccess.SOURCE_ATTRIBUTE); if (localName == null) { continue;
continue; String localName = (String) pd.getUserData().get(JDBCOpenSearchAccess.SOURCE_ATTRIBUTE); if (localName == null) { continue;