org.openanzo.model
Interface INamedGraph

All Known Subinterfaces:
INamedGraphWithMetaData, IProxyGraph, ITransactionGraph
All Known Implementing Classes:
BasicGraph, ContainerNamedGraph, DeltaGraph, LocalGraph, MetadataProxyGraph, NamedGraph, NamedGraphBase, NamedGraphProxy, NamedGraphWithMetaData, NotificationNamedGraphProxy, ProxyGraph, RemoteGraph, RemoteGraphBase, ReplicaGraph, TransactionNamedGraphProxy

public interface INamedGraph

Graph representation of data

Author:
Matthew Roy ( mroy@cambridgesemantics.com )

Method Summary
 void add(info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> statements)
          Add a set of statements from graph
 void add(org.openrdf.model.Resource subj, org.openrdf.model.URI pred, org.openrdf.model.Value obj)
          Add a new statement with given subj,pred,obj
 void add(org.openrdf.model.Statement... statements)
          Add one or more statements to graph
 void clear()
          Delete all statements in graph
 void close()
          Close the graph.
 boolean contains(org.openrdf.model.Resource subj, org.openrdf.model.URI prop, org.openrdf.model.Value obj)
          Return true if the graph contains at least 1 statement that matches the pattern of subj,prop,obj
 boolean contains(org.openrdf.model.Statement statement)
          Return true if the graph contains at least 1 statement that matches the statement provided
 void delete(info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> statements)
          Delete a set of statements from graph
 void delete(org.openrdf.model.Resource subj, org.openrdf.model.URI pred, org.openrdf.model.Value obj)
          Delete a statement from graph
 void delete(org.openrdf.model.Statement... statements)
          Delete a set of statements from graph
 info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> find(org.openrdf.model.Resource subj, org.openrdf.model.URI prop, org.openrdf.model.Value obj)
          Return an iterator of all statements that match the pattern of subj,prop,obj
 INamedGraphEventManager getEventManager()
          Return INamedGraphEventManager for this graph
 org.openrdf.model.URI getNamedGraphUri()
          Get NamedGraph's URI
 info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> getStatements()
          Get an iterator of all statements within this graph
 ITransactionManager getTransactionManager()
          Return ITransactionManager for this graph
 boolean isClosed()
          Return if graph is closed
 boolean isEmpty()
          Return if graph is empty
 void setNamedGraphUri(org.openrdf.model.URI namedGraphUri)
          Set NamedGraph's URI
 int size()
          Return number of statements in graph
 

Method Detail

getNamedGraphUri

org.openrdf.model.URI getNamedGraphUri()
Get NamedGraph's URI

Returns:
URI for this grpah

setNamedGraphUri

void setNamedGraphUri(org.openrdf.model.URI namedGraphUri)
Set NamedGraph's URI

Parameters:
namedGraphUri -

getStatements

info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> getStatements()
Get an iterator of all statements within this graph

Returns:
CloseableIterator of all statements within this graph

find

info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> find(org.openrdf.model.Resource subj,
                                                                                     org.openrdf.model.URI prop,
                                                                                     org.openrdf.model.Value obj)
Return an iterator of all statements that match the pattern of subj,prop,obj

Parameters:
subj - Subject resource to match, or wildcard if null
prop - Predicate uri to match, or wildcard if null
obj - Object value to match, or wildcard if null
Returns:
an iterator of all statements that match the pattern of subj,prop,obj

contains

boolean contains(org.openrdf.model.Resource subj,
                 org.openrdf.model.URI prop,
                 org.openrdf.model.Value obj)
Return true if the graph contains at least 1 statement that matches the pattern of subj,prop,obj

Parameters:
subj - Subject resource to match, or wildcard if null
prop - Predicate uri to match, or wildcard if null
obj - Object value to match, or wildcard if null
Returns:
true if the graph contains at least 1 statement that matches the pattern of subj,prop,obj

contains

boolean contains(org.openrdf.model.Statement statement)
Return true if the graph contains at least 1 statement that matches the statement provided

Parameters:
statement - Statement to check for existence in graph
Returns:
true if the graph contains at least 1 statement that matches the statement provided

add

void add(org.openrdf.model.Resource subj,
         org.openrdf.model.URI pred,
         org.openrdf.model.Value obj)
Add a new statement with given subj,pred,obj

Parameters:
subj - Subject of statement
pred - Predicate of statement
obj - Object of statement

add

void add(info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> statements)
Add a set of statements from graph

Parameters:
statements - statements to delete from graph

add

void add(org.openrdf.model.Statement... statements)
Add one or more statements to graph

Parameters:
statements - statements to add to graph

delete

void delete(org.openrdf.model.Resource subj,
            org.openrdf.model.URI pred,
            org.openrdf.model.Value obj)
Delete a statement from graph

Parameters:
subj - Subject of statement
pred - Predicate of statement
obj - Object of statement

delete

void delete(org.openrdf.model.Statement... statements)
Delete a set of statements from graph

Parameters:
statements - statements to delete from graph

delete

void delete(info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> statements)
Delete a set of statements from graph

Parameters:
statements - statements to delete from graph

clear

void clear()
Delete all statements in graph


size

int size()
Return number of statements in graph

Returns:
number of statements in graph

isEmpty

boolean isEmpty()
Return if graph is empty

Returns:
true if graph is empty

close

void close()
Close the graph.


isClosed

boolean isClosed()
Return if graph is closed

Returns:
true if graph is closed

getEventManager

INamedGraphEventManager getEventManager()
Return INamedGraphEventManager for this graph

Returns:
INamedGraphEventManager for this graph

getTransactionManager

ITransactionManager getTransactionManager()
Return ITransactionManager for this graph

Returns:
ITransactionManager for this graph


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