de.fuberlin.wiwiss.ng4j
Class NamedGraphStatement

java.lang.Object
  extended by com.hp.hpl.jena.rdf.model.impl.StatementBase
      extended by com.hp.hpl.jena.rdf.model.impl.StatementImpl
          extended by de.fuberlin.wiwiss.ng4j.NamedGraphStatement
All Implemented Interfaces:
FrontsTriple, Statement

public class NamedGraphStatement
extends com.hp.hpl.jena.rdf.model.impl.StatementImpl

A Statement which can provide provenance information about the NamedGraphs in which it is contained. NamedGraphStatements are used in NamedGraphModels. Those are backed by a NamedGraphSet. The NamedGraphStatement knows in which graphs from that set it is contained.

TODO: Write tests for NamedGraphStatement

Author:
Chris Bizer, Richard Cyganiak (richard@cyganiak.de)

Field Summary
 
Fields inherited from class com.hp.hpl.jena.rdf.model.impl.StatementImpl
empty, object, predicate, subject
 
Fields inherited from class com.hp.hpl.jena.rdf.model.impl.StatementBase
model
 
Constructor Summary
NamedGraphStatement(Resource s, Property p, RDFNode o, NamedGraphModel m)
           
 
Method Summary
 NamedGraph getGraph()
          Returns a NamedGraph that contains the statement.
 Resource getGraphName()
          Returns a NamedGraph that contains the statement.
 Iterator listGraphNames()
          Returns the names of NamedGraphs containing the statement as Jena Resources.
 Iterator listGraphs()
          Finds the NamedGraphs which contain the statement.
 Iterator listQuads()
          Finds all Quads which contain the subject, predicate and object of the statement.
 
Methods inherited from class com.hp.hpl.jena.rdf.model.impl.StatementImpl
asResource, asTriple, asTriples, createObject, createReifiedStatement, createReifiedStatement, equals, getAlt, getBag, getLiteral, getObject, getObject, getPredicate, getProperty, getResource, getResource, getSeq, getStatementProperty, getSubject, hashCode, isReified, listReifiedStatements, remove, removeReification, replace, toStatement
 
Methods inherited from class com.hp.hpl.jena.rdf.model.impl.StatementBase
changeObject, changeObject, changeObject, changeObject, changeObject, changeObject, changeObject, changeObject, changeObject, changeObject, changeObject, getBoolean, getByte, getChar, getDouble, getFloat, getInt, getLanguage, getLong, getModel, getShort, getString, getWellFormed, hasWellFormedXML, mustBeResource, objectString, stringReplace, stringReplace, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.hp.hpl.jena.rdf.model.Statement
changeObject, changeObject, changeObject, changeObject, changeObject, changeObject, changeObject, changeObject, changeObject, changeObject, changeObject, getBoolean, getByte, getChar, getDouble, getFloat, getInt, getLanguage, getLong, getModel, getShort, getString, getWellFormed, hasWellFormedXML
 

Constructor Detail

NamedGraphStatement

public NamedGraphStatement(Resource s,
                           Property p,
                           RDFNode o,
                           NamedGraphModel m)
Method Detail

getGraph

public NamedGraph getGraph()
Returns a NamedGraph that contains the statement. If several graphs contain the statement, one of them will be returned arbitrarily. null will be returned if no graph contains the statement.

Returns:
A NamedGraph containing the statement

getGraphName

public Resource getGraphName()
Returns a NamedGraph that contains the statement. If several graphs contain the statement, one of them will be returned arbitrarily. null will be returned if no graph contains the statement.

Returns:
The name of a NamedGraph containing the statement

listGraphs

public Iterator listGraphs()
Finds the NamedGraphs which contain the statement.

Returns:
An iterator over NamedGraphs.

listGraphNames

public Iterator listGraphNames()
Returns the names of NamedGraphs containing the statement as Jena Resources. They can be handy for creating Statements about the graphs.

Returns:
An iterator over Jena Resources.

listQuads

public Iterator listQuads()
Finds all Quads which contain the subject, predicate and object of the statement.

Returns:
an iterator over Quads.