public String getLabelString() { return blankNodeId.getLabelString() ; }
@Override public String toString() { return blankNodeId.toString() ; }
/** Creates new BlankNodeId with a fresh internal id */ public static BlankNodeId create() { return new BlankNodeId(); }
/** Create a new AnonId from the string argument supplied * @param idStr A string representation of the id to be created. */ public AnonId( String idStr ) { blankNodeId = BlankNodeId.create(idStr) ; }
@Override public boolean equals(Object obj) { if ( this == obj ) return true ; if ( obj == null ) return false ; if ( !(obj instanceof AnonId) ) return false ; AnonId other = (AnonId)obj ; if ( blankNodeId == null ) { if ( other.blankNodeId != null ) return false ; } else if ( !blankNodeId.equals(other.blankNodeId) ) return false ; return true ; } }
/** Create a new AnonId from the string argument supplied * @param idStr A string representation of the id to be created. */ public AnonId( String idStr ) { blankNodeId = BlankNodeId.create(idStr) ; }
@Override public boolean equals(Object obj) { if ( this == obj ) return true ; if ( obj == null ) return false ; if ( !(obj instanceof AnonId) ) return false ; AnonId other = (AnonId)obj ; if ( blankNodeId == null ) { if ( other.blankNodeId != null ) return false ; } else if ( !blankNodeId.equals(other.blankNodeId) ) return false ; return true ; } }
protected BlankNodeId( BlankNodeId id ) { this.id = id.getLabelString(); }
@Override public String toString() { return blankNodeId.toString() ; }
/** Creates new BlankNodeId with a fresh internal id */ public static BlankNodeId create() { return new BlankNodeId(); }
public AnonId() { blankNodeId = BlankNodeId.create() ; }
protected BlankNodeId( BlankNodeId id ) { this.id = id.getLabelString(); }
@Override public SecuredRDFNode getRDFNode(final Node n) throws ReadDeniedException, UpdateDeniedException, AuthenticationRequiredException { RDFNode rdfNode = null; if (n.isLiteral()) { rdfNode = ResourceFactory.createTypedLiteral(n.getLiteralLexicalForm(), n.getLiteralDatatype()); } else if (n.isURI()) { rdfNode = ResourceFactory.createProperty(n.getURI()); } else if (n.isBlank()) { rdfNode = ResourceFactory.createResource(n.getBlankNodeId().toString()); } else { throw new IllegalArgumentException("Illegal Node type: " + n.getClass()); } if (holder.getBaseItem().containsResource(rdfNode)) { checkRead(); } else { checkUpdate(); } if (n.isLiteral()) { return SecuredLiteralImpl.getInstance(holder.getSecuredItem(), holder.getBaseItem().getRDFNode(n).asLiteral()); } else { return SecuredResourceImpl.getInstance(holder.getSecuredItem(), holder.getBaseItem().getRDFNode(n).asResource()); } }
/** Creates new BlankNodeId with the given id */ public static BlankNodeId create(String id) { return new BlankNodeId(id); }
public AnonId() { blankNodeId = BlankNodeId.create() ; }
public String getLabelString() { return blankNodeId.getLabelString() ; }