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


public interface AResource

Author:
Jeremy Carroll

Method Summary
 java.lang.String getAnonymousID()
          A string distinguishing this anonymous resource, from other anonymous resources.
 java.lang.String getURI()
          If the input file specifies a URI reference for this resource, return it.
 java.lang.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(java.lang.Object d)
          The user data allows the RDF application to store one Object with each blank node during parsing.
 

Method Detail

getAnonymousID

public java.lang.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

public java.lang.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

public java.lang.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

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

isAnonymous

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

Returns:
True if this resource is anonymous.

setUserData

public void setUserData(java.lang.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-2003 Hewlett-Packard. All Rights Reserved.