@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (!(obj instanceof NodeID)) { return false; } NodeID other = (NodeID) obj; return id.equals(other.getID()); }
@Nonnull private IRI resolveFromDelegate(@Nonnull IRI iri, @Nonnull String value) { checkNotNull(iri, "iri cannot be null"); checkNotNull(value, "value cannot be null"); if (NodeID.isAnonymousNodeIRI(value)) { return IRI.create(value, null); } // cache the delegate URI if not there already if (!baseURICache.containsKey(getBaseIRI())) { baseURICache.put(getBaseIRI(), getBaseIRI().toURI()); } // get hold of the delegate URI URI delegateURI = baseURICache.get(getBaseIRI()); assert delegateURI != null; // resolve against delegate URI resolve = delegateURI.resolve(value.replace(" ", "%20")); assert resolve != null; return IRI.create(resolve); }
@Override public int compareTo(NodeID o) { return id.compareTo(o.toString()); }