|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jrdf.graph.local.AbstractResource
public abstract class AbstractResource
Constructor Summary | |
---|---|
protected |
AbstractResource()
|
|
AbstractResource(Graph newGraph,
LocalizedNode newNode)
|
Method Summary | |
---|---|
void |
addValue(PredicateNode predicate,
ObjectNode object)
Add a new triple with this as the subject, the given predicate and object. |
void |
addValue(URI predicate,
Object object)
|
void |
addValue(URI predicate,
Resource object)
|
void |
addValue(URI predicate,
String lexicalValue)
|
void |
addValue(URI predicate,
String lexicalValue,
String language)
|
void |
addValue(URI predicate,
String lexicalValue,
URI dataType)
|
void |
addValue(URI predicate,
URI object)
|
Long |
getId()
Retrieves an internal identifier for a node. |
ClosableIterator<ObjectNode> |
getObjects(PredicateNode predicate)
With this as the subject and using the given predicate return all the objects. |
ClosableIterator<ObjectNode> |
getObjects(URI predicate)
|
ClosableIterator<SubjectNode> |
getSubjects(PredicateNode predicate)
With this as the object and using the given predicate return all the subjects. |
ClosableIterator<SubjectNode> |
getSubjects(URI predicate)
|
void |
removeSubject(SubjectNode subject,
PredicateNode predicate)
Remove the triple with this as the object, the given subject and predicate. |
void |
removeSubject(URI subject,
URI predicate)
|
void |
removeValue(PredicateNode predicate,
ObjectNode object)
Remove the triple with this as the subject, the given predicate and object. |
void |
removeValue(URI predicate,
Object object)
|
void |
removeValue(URI predicate,
Resource object)
|
void |
removeValue(URI predicate,
String lexicalValue)
|
void |
removeValue(URI predicate,
String lexicalValue,
String language)
|
void |
removeValue(URI predicate,
String lexicalValue,
URI dataType)
|
void |
removeValue(URI predicate,
URI object)
|
void |
removeValues(PredicateNode predicate)
Remove all the triples with this as the subject and the given predicate. |
void |
removeValues(URI predicate)
|
void |
setValue(PredicateNode predicate,
ObjectNode object)
Remove any other triples with this as the subject, the given predicate and any object and add a new triple with this as the subject and the given predicate and object. |
void |
setValue(URI predicate,
Object object)
|
void |
setValue(URI predicate,
Resource object)
|
void |
setValue(URI predicate,
String lexicalValue)
|
void |
setValue(URI predicate,
String lexicalValue,
String language)
|
void |
setValue(URI predicate,
String lexicalValue,
URI dataType)
|
void |
setValue(URI predicate,
URI object)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jrdf.graph.Resource |
---|
getUnderlyingNode, isURIReference |
Methods inherited from interface org.jrdf.graph.URIReference |
---|
equals, getURI, hashCode |
Methods inherited from interface org.jrdf.graph.TypedNodeVisitable |
---|
accept |
Methods inherited from interface org.jrdf.graph.TypedNodeVisitable |
---|
accept |
Methods inherited from interface org.jrdf.graph.TypedNodeVisitable |
---|
accept |
Methods inherited from interface org.jrdf.graph.BlankNode |
---|
equals, hashCode |
Methods inherited from interface org.jrdf.graph.TypedNodeVisitable |
---|
accept |
Methods inherited from interface org.jrdf.graph.TypedNodeVisitable |
---|
accept |
Constructor Detail |
---|
protected AbstractResource()
public AbstractResource(Graph newGraph, LocalizedNode newNode)
Method Detail |
---|
public Long getId()
LocalizedNode
getId
in interface LocalizedNode
public void addValue(PredicateNode predicate, ObjectNode object) throws GraphException
Resource
addValue
in interface Resource
predicate
- the existing predicate in the graph to create the triple with.object
- the existing object in the graph to create the triple with.
GraphException
- if the predicate or object do not exist in the graph.public void addValue(URI predicate, URI object) throws GraphException
addValue
in interface Resource
GraphException
public void addValue(URI predicate, String lexicalValue) throws GraphException
addValue
in interface Resource
GraphException
public void addValue(URI predicate, Resource object) throws GraphException
addValue
in interface Resource
GraphException
public void addValue(URI predicate, Object object) throws GraphException
addValue
in interface Resource
GraphException
public void addValue(URI predicate, String lexicalValue, String language) throws GraphException
addValue
in interface Resource
GraphException
public void addValue(URI predicate, String lexicalValue, URI dataType) throws GraphException
addValue
in interface Resource
GraphException
public void setValue(PredicateNode predicate, ObjectNode object) throws GraphException
Resource
setValue
in interface Resource
predicate
- the existing predicate in the graph to set.object
- the existing object in the graph to set.
GraphException
- if the predicate or object do not exist in the graph.public void setValue(URI predicate, URI object) throws GraphException
setValue
in interface Resource
GraphException
public void setValue(URI predicate, String lexicalValue) throws GraphException
setValue
in interface Resource
GraphException
public void setValue(URI predicate, Resource object) throws GraphException
setValue
in interface Resource
GraphException
public void setValue(URI predicate, Object object) throws GraphException
setValue
in interface Resource
GraphException
public void setValue(URI predicate, String lexicalValue, String language) throws GraphException
setValue
in interface Resource
GraphException
public void setValue(URI predicate, String lexicalValue, URI dataType) throws GraphException
setValue
in interface Resource
GraphException
public void removeValue(PredicateNode predicate, ObjectNode object) throws GraphException
Resource
removeValue
in interface Resource
predicate
- the existing predicate in the graph to remove.object
- the existing object in the graph to remove.
GraphException
- if the predicate or object does not exist in the graph.public void removeValue(URI predicate, URI object) throws GraphException
removeValue
in interface Resource
GraphException
public void removeValue(URI predicate, String lexicalValue) throws GraphException
removeValue
in interface Resource
GraphException
public void removeValue(URI predicate, Resource object) throws GraphException
removeValue
in interface Resource
GraphException
public void removeValue(URI predicate, Object object) throws GraphException
removeValue
in interface Resource
GraphException
public void removeValue(URI predicate, String lexicalValue, String language) throws GraphException
removeValue
in interface Resource
GraphException
public void removeValue(URI predicate, String lexicalValue, URI dataType) throws GraphException
removeValue
in interface Resource
GraphException
public void removeValues(PredicateNode predicate) throws GraphException
Resource
removeValues
in interface Resource
predicate
- the existing predicate in the graph.
GraphException
- if the predicate does not exist in the graph.public void removeValues(URI predicate) throws GraphException
removeValues
in interface Resource
GraphException
public void removeSubject(SubjectNode subject, PredicateNode predicate) throws GraphException
Resource
removeSubject
in interface Resource
subject
- the existing subject in the graph to remove.predicate
- the existing predicate in the graph to remove.
GraphException
- if the subject or predicate do not exist in the graph.public void removeSubject(URI subject, URI predicate) throws GraphException
removeSubject
in interface Resource
GraphException
public ClosableIterator<ObjectNode> getObjects(PredicateNode predicate) throws GraphException
Resource
getObjects
in interface Resource
predicate
- the existing predicate in the graph to use to find the objects.
GraphException
- if the subject or predicate do not exist in the graph.public ClosableIterator<ObjectNode> getObjects(URI predicate) throws GraphException
getObjects
in interface Resource
GraphException
public ClosableIterator<SubjectNode> getSubjects(PredicateNode predicate) throws GraphException
Resource
getSubjects
in interface Resource
predicate
- the existing predicate in the graph to use to find the subjects.
GraphException
- if the subject or predicate do not exist in the graph.public ClosableIterator<SubjectNode> getSubjects(URI predicate) throws GraphException
getSubjects
in interface Resource
GraphException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |