@Override public boolean isTerminus() { return getDeclaring().equals( getTarget() ); }
@Override public String toString() { return String.format( "ParentRelationship [%s => %s]", getDeclaring(), getTarget() ); }
@Override public ParentRelationship selectTarget( final ProjectVersionRef ref ) { final ProjectVersionRef d = getDeclaring(); return new SimpleParentRelationship( getSources(), d, ref ); }
@Override public ParentRelationship addSource( final URI source ) { Set<URI> srcs = getSources(); srcs.add( source ); return new SimpleParentRelationship( srcs, getDeclaring(), getTarget() ); }
@Override public ParentRelationship addSources( final Collection<URI> sources ) { Set<URI> srcs = getSources(); srcs.addAll( sources ); return new SimpleParentRelationship( srcs, getDeclaring(), getTarget() ); } }