org.openanzo.model.impl
Class NamedGraph

java.lang.Object
  extended by org.openanzo.model.impl.BasicGraph
      extended by org.openanzo.model.impl.NamedGraph
All Implemented Interfaces:
INamedGraph

public class NamedGraph
extends BasicGraph

Extension of BasicGraph that adds in the concept of a graph being either a regular NamedGraph or a metadata graph

Author:
Matthew Roy ( mroy@cambridgesemantics.com )

Constructor Summary
NamedGraph(java.util.Collection<org.openrdf.model.Statement> statements, org.openrdf.model.URI namedGraphURI, boolean isMetadataGraph)
          Create a new NamedGraph with the given URI and pre-populate with given statements
NamedGraph(org.openrdf.model.URI namedGraphUri)
          Create a new NamedGraph with the given URI isMetadata will be false by default
NamedGraph(org.openrdf.model.URI namedGraphUri, boolean isMetadataGraph)
          Create a new NamedGraph with the given URI *
 
Method Summary
 void add(org.openrdf.model.Statement... statements)
          Add one or more statements to graph
 boolean isMetadataGraph()
          Determine if this is a metadataGraph
 
Methods inherited from class org.openanzo.model.impl.BasicGraph
add, add, clear, close, contains, contains, delete, delete, delete, find, getEventManager, getNamedGraphUri, getStatements, getTransactionManager, isClosed, isEmpty, setNamedGraphUri, size
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamedGraph

public NamedGraph(org.openrdf.model.URI namedGraphUri)
Create a new NamedGraph with the given URI isMetadata will be false by default

Parameters:
namedGraphUri - URI of this graph

NamedGraph

public NamedGraph(org.openrdf.model.URI namedGraphUri,
                  boolean isMetadataGraph)
Create a new NamedGraph with the given URI *

Parameters:
namedGraphUri - URI of this graph
isMetadataGraph - Set the type of this graph

NamedGraph

public NamedGraph(java.util.Collection<org.openrdf.model.Statement> statements,
                  org.openrdf.model.URI namedGraphURI,
                  boolean isMetadataGraph)
Create a new NamedGraph with the given URI and pre-populate with given statements

Parameters:
statements - pre-populated data for graph
namedGraphURI - URI of this graph
isMetadataGraph - Set the type of this graph
Method Detail

isMetadataGraph

public boolean isMetadataGraph()
Determine if this is a metadataGraph

Returns:
true if this is a metadataGraph

add

public void add(org.openrdf.model.Statement... statements)
Description copied from interface: INamedGraph
Add one or more statements to graph

Specified by:
add in interface INamedGraph
Overrides:
add in class BasicGraph
Parameters:
statements - statements to add to graph


Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.