com.hp.hpl.jena.rdf.arp
Interface AResource


public interface AResource

A URI or blank node reported to a StatementHandler. Note: equality (.equals) rather than identity (==) must be used to compare AResources.

Author:
Jeremy Carroll

Method Summary
 String getAnonymousID()
          A string distinguishing this anonymous resource, from other anonymous resources.
 String getURI()
          If the input file specifies a URI reference for this resource, return it.
 Object getUserData()
          The user data allows the RDF application to store one Object with each blank node during parsing.
 boolean hasNodeID()
           
 boolean isAnonymous()
          Was this resource not given a URI in the file.
 void setUserData(Object d)
          The user data allows the RDF application to store one Object with each blank node during parsing.
 

Method Detail

getAnonymousID

String getAnonymousID()
A string distinguishing this anonymous resource, from other anonymous resources. Undefined if isAnonymous() returns false.

Returns:
A gensym String starting "A", or "U" concatenated with the value of rdf:nodeID.

getURI

String getURI()
If the input file specifies a URI reference for this resource, return it. Not defined if isAnonymous() returns true.

Returns:
The URI reference of this resource.

getUserData

Object getUserData()
The user data allows the RDF application to store one Object with each blank node during parsing. This may help with garbage collect strategies when parsing huge files. No references to the user data are maintained after a blank node goes out of scope.

Jena 2.1 note: earlier versions had a bug, which permitted user data on some URIref nodes and not on others. The documentation did not indicate that it was supported only on blank nodes. The documentation has been fixed to match the code which now uniformly no longer supports URIref nodes.

Returns:
A user data object previously stored with setUserData; or null if none.

hasNodeID

boolean hasNodeID()
Returns:
True, if this is an anonymous resource with an explicit rdf:nodeID

isAnonymous

boolean isAnonymous()
Was this resource not given a URI in the file.

Returns:
True if this resource is anonymous.

setUserData

void setUserData(Object d)
The user data allows the RDF application to store one Object with each blank node during parsing. This may help with garbage collect strategies when parsing huge files. No references to the user data are maintained after a blank node goes out of scope.

See note about large files in class documentation for ARP.

Jena 2.1 note: earlier versions had a bug, which permitted user data on some URIref nodes and not on others. The documentation did not indicate that it was supported only on blank nodes. The documentation has been fixed to match the code which now uniformly no longer supports URIref nodes.

Parameters:
d - A user data object which may be retrieved later with getUserData.


Copyright © 2000, 2001, 2002, 2003, 2004 Hewlett-Packard Development Company, LP