public Object evaluate(Object obj) { if (obj instanceof Attribute) { Attribute att = (Attribute) obj; return att.getIdentifier(); } return null; } }
public Identifier getIdentifier() { return delegate.getIdentifier(); }
public Object get(Object object, String xpath, Class target) { Attribute feature = (Attribute) object; return feature.getIdentifier().toString(); }
@Override public Object evaluate(Object obj) { if (obj instanceof SimpleFeature) { SimpleFeature feature = (SimpleFeature) obj; return feature.getID(); } if (obj instanceof Attribute) { Attribute attribute = (Attribute) obj; return attribute.getIdentifier().getID(); } return ""; // no ID } }
/** * Override of equals. * * @param other the object to be tested for equality. * @return whether other is equal to this attribute Type. */ public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof Attribute)) { return false; } if (!super.equals(obj)) { return false; } Attribute att = (Attribute) obj; return Utilities.equals(id, att.getIdentifier()); }
protected void setGeometryUserData(Attribute target, Map<Name, Object> targetAttributes) { && (targetAttributes.size() > 0 || target.getIdentifier() != null)) { Geometry geom; if (target.getValue() == null) { if (target.getIdentifier() != null) { newUserData.put("gml:id", target.getIdentifier().toString());
@SuppressWarnings("unchecked") public Object getImmediateNode() { // first try regular way if (feature instanceof ComplexAttribute) { ComplexAttribute ca = (ComplexAttribute) feature; Property p = ca.getProperty("@" + name.getLocalPart()); if (p != null) { return p; } } // FIXME - better id checking if (name.getLocalPart().equals("id")) { Identifier id = feature.getIdentifier(); if (id != null) { return id.getID(); } } Map<Name, Object> map = (Map<Name, Object>) feature.getUserData().get(Attributes.class); if (map != null) { return map.get(name); } else { return null; } }
Attribute nestedAtt = new ComplexAttributeImpl( contents, attribute.getDescriptor(), attribute.getIdentifier()); nestedAttContents.add(nestedAtt); attribute.setValue(nestedAttContents);
if (type.isIdentified() && attribute.getIdentifier() == null) { throw new NullPointerException(type.getName() + " is identified, null id not accepted"); throw new IllegalAttributeException( "Attribute instance (" + attribute.getIdentifier() + ")" + "fails to pass filter: "
Attribute att = (Attribute) property; add( att.getIdentifier() == null ? null : att.getIdentifier().toString(), att.getValue(), att.getName());
public Object evaluate(Object obj) { if (obj instanceof Attribute) { Attribute att = (Attribute) obj; return att.getIdentifier(); } return null; } }
public Identifier getIdentifier() { return delegate.getIdentifier(); }
public Object get(Object object, String xpath, Class target) { Attribute feature = (Attribute) object; return feature.getIdentifier().toString(); }
public Object get(Object object, String xpath, Class target) { Attribute feature = (Attribute) object; return feature.getIdentifier().toString(); }
@Override public Object evaluate(Object obj) { if( obj instanceof SimpleFeature){ SimpleFeature feature = (SimpleFeature) obj; return feature.getID(); } if( obj instanceof Attribute){ Attribute attribute = (Attribute) obj; return attribute.getIdentifier().getID(); } return ""; // no ID }
@SuppressWarnings("unchecked") public Object getImmediateNode() { //FIXME - better id checking if (name.getLocalPart().equals("id")) { return feature.getIdentifier().getID(); } else { Map<Name, Object> map = (Map<Name, Object>) feature.getUserData().get(Attributes.class); if (map != null) { return map.get(name); } else { return null; } } }
/** * Override of equals. * * @param other * the object to be tested for equality. * * @return whether other is equal to this attribute Type. */ public boolean equals(Object obj) { if ( this == obj ) { return true; } if (!(obj instanceof Attribute)) { return false; } if (!super.equals(obj)) { return false; } Attribute att = (Attribute) obj; return Utilities.equals( id, att.getIdentifier() ); }
protected void setGeometryUserData(Attribute target, Map<Name, Object> targetAttributes) { && (targetAttributes.size() > 0 || target.getIdentifier() != null)) { Geometry geom; if (target.getValue() == null) { if (target.getIdentifier() != null) { newUserData.put("gml:id", target.getIdentifier().toString());
@SuppressWarnings("unchecked") public Object getImmediateNode() { // first try regular way if (feature instanceof ComplexAttribute) { ComplexAttribute ca = (ComplexAttribute) feature; Property p = ca.getProperty("@" + name.getLocalPart()); if (p != null) { return p; } } // FIXME - better id checking if (name.getLocalPart().equals("id")) { Identifier id = feature.getIdentifier(); if (id != null) { return id.getID(); } } Map<Name, Object> map = (Map<Name, Object>) feature.getUserData().get(Attributes.class); if (map != null) { return map.get(name); } else { return null; } }
if (property instanceof Attribute) { Attribute att = (Attribute) property; add(att.getIdentifier() == null ? null : att.getIdentifier().toString(), att .getValue(), att.getName()); } else if (property instanceof Association) {