org.openanzo.model.proxy
Class MetadataProxyGraph

java.lang.Object
  extended by org.openanzo.model.proxy.ProxyGraph
      extended by org.openanzo.model.proxy.NamedGraphProxy
          extended by org.openanzo.model.proxy.MetadataProxyGraph
All Implemented Interfaces:
INamedGraph, IProxyGraph

public class MetadataProxyGraph
extends NamedGraphProxy

MetaDataProxyGraph is a NamedGraphProxy that represents the Metadata about a NamedGraph The operations on the graph ensure only Metadata predicates are processed.

Author:
Matthew Roy ( mroy@cambridgesemantics.com )

Constructor Summary
MetadataProxyGraph(INamedGraph parentGraph)
          Create a new MetadataProxyGraph
MetadataProxyGraph(org.openrdf.model.URI namedGraphUri, INamedGraph parentGraph)
          Create a new MetadataProxyGraph
 
Method Summary
 void add(org.openrdf.model.Statement... statements)
          Add one or more statements to graph
 boolean contains(org.openrdf.model.Resource s, org.openrdf.model.URI p, org.openrdf.model.Value o)
          Return true if the graph contains at least 1 statement that matches the pattern of subj,prop,obj
 void delete(info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> statements)
          Delete a set of statements 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
 
Methods inherited from class org.openanzo.model.proxy.NamedGraphProxy
getNamedGraphUri, getParentGraph, getTransactionManager, isClosed, isMetadataGraph, setNamedGraphUri, toString
 
Methods inherited from class org.openanzo.model.proxy.ProxyGraph
add, add, clear, close, contains, delete, getEventManager, getStatements, isEmpty, size
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MetadataProxyGraph

public MetadataProxyGraph(org.openrdf.model.URI namedGraphUri,
                          INamedGraph parentGraph)
Create a new MetadataProxyGraph

Parameters:
namedGraphUri - uri of metadata graph
parentGraph - graph for which this is metadata

MetadataProxyGraph

public MetadataProxyGraph(INamedGraph parentGraph)
Create a new MetadataProxyGraph

Parameters:
parentGraph - graph for which this is metadata
Method Detail

find

public 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)
Description copied from interface: INamedGraph
Return an iterator of all statements that match the pattern of subj,prop,obj

Specified by:
find in interface INamedGraph
Overrides:
find in class ProxyGraph
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

public boolean contains(org.openrdf.model.Resource s,
                        org.openrdf.model.URI p,
                        org.openrdf.model.Value o)
Description copied from interface: INamedGraph
Return true if the graph contains at least 1 statement that matches the pattern of subj,prop,obj

Specified by:
contains in interface INamedGraph
Overrides:
contains in class ProxyGraph
Parameters:
s - Subject resource to match, or wildcard if null
p - Predicate uri to match, or wildcard if null
o - 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

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 ProxyGraph
Parameters:
statements - statements to add to graph

delete

public void delete(org.openrdf.model.Statement... statements)
Description copied from interface: INamedGraph
Delete a set of statements from graph

Specified by:
delete in interface INamedGraph
Overrides:
delete in class ProxyGraph
Parameters:
statements - statements to delete from graph

delete

public void delete(info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> statements)
Description copied from interface: INamedGraph
Delete a set of statements from graph

Specified by:
delete in interface INamedGraph
Overrides:
delete in class ProxyGraph
Parameters:
statements - statements to delete from graph


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