@Override public boolean equals( java.lang.Object obj ) { if ( this == obj ) return true; if ( obj == null ) return false; T referencedObject = getReferencedObject(); try { if ( referencedObject != null ) { return referencedObject.equals( obj ); } } catch ( ReferenceResolvingException e ) { LOG.debug( "CRSResource reference could not be resolved: {}", e.getLocalizedMessage() ); } if ( obj instanceof Reference<?> ) { Reference<?> other = (Reference<?>) obj; if ( getURI() == null ) { if ( other.getURI() != null ) return false; } else if ( !getURI().equals( other.getURI() ) ) return false; } return getURI().equals( obj ); }
private void exportPointsAsProperties( final Points points ) throws XMLStreamException, UnknownCRSException, TransformationException { for ( final Point point : points ) { writer.writeStartElement( "gml", "pointProperty", gmlNs ); if ( point instanceof Reference<?> && !( (Reference<?>) point ).isLocal() ) { final Reference<?> ref = (Reference<?>) point; writeAttributeWithNS( XLNNS, "href", ref.getURI() ); } else if ( point.getId() != null && referenceExportStrategy.isObjectExported( point.getId() ) ) { writeAttributeWithNS( XLNNS, "href", "#" + point.getId() ); } else { export( point ); } writer.writeEndElement(); } }
return; } catch ( ReferenceResolvingException e ) { LOG.warn( "Unable to resolve external reference '" + ref.getURI() + ". Ignoring." ); return;