info.aduna.infosource.crawl
Class GraphModel

java.lang.Object
  extended by org.ontoware.rdf2go.model.impl.AbstractModelWriter
      extended by org.ontoware.rdf2go.model.impl.AbstractModelAddRemove
          extended by org.ontoware.rdf2go.model.impl.AbstractModelRemovePatterns
              extended by org.ontoware.rdf2go.model.impl.AbstractModel
                  extended by info.aduna.infosource.crawl.GraphModel
All Implemented Interfaces:
Iterable<org.ontoware.rdf2go.model.Statement>, org.ontoware.aifbcommons.collection.ClosableIterable<org.ontoware.rdf2go.model.Statement>, org.ontoware.rdf2go.model.Commitable, org.ontoware.rdf2go.model.FindableModel, org.ontoware.rdf2go.model.Lockable, org.ontoware.rdf2go.model.Model, org.ontoware.rdf2go.model.ModelAddRemove, org.ontoware.rdf2go.model.ModelIO, org.ontoware.rdf2go.model.ModelRemovePatterns, org.ontoware.rdf2go.model.ModelValueFactory, org.ontoware.rdf2go.model.ModelWriter, org.ontoware.rdf2go.model.QueryableModel, org.ontoware.rdf2go.model.ReificationSupport, org.ontoware.rdf2go.model.Sparqlable

public class GraphModel
extends org.ontoware.rdf2go.model.impl.AbstractModel

GraphModel provides a Model implementation working on top of a OpenRDF Graph. Wrapping a Graph in a GraphModel allows wrapping it in a RDFContainer, which on its turn is used in Aperture. This way a single RepositoryConfig (a GraphImpl subclass) can be used to hold both the CrawlingRepository configuration as well as the Aperture DataSource configuration.

All methods in this class immediately affect the wrapped Graph. Furthermore, the GraphModel instance itself is stateless except for its reference to the Graph.

Currently only the methods required for DataSource configuration are supported.


Field Summary
 
Fields inherited from class org.ontoware.rdf2go.model.impl.AbstractModel
model
 
Constructor Summary
GraphModel(org.openrdf.model.Graph graph)
           
 
Method Summary
 void addStatement(org.ontoware.rdf2go.model.node.Resource subject, org.ontoware.rdf2go.model.node.URI predicate, org.ontoware.rdf2go.model.node.Node object)
           
 org.ontoware.rdf2go.model.node.BlankNode createBlankNode()
           
 org.ontoware.rdf2go.model.node.BlankNode createBlankNode(String bNodeId)
           
 void dump()
           
 org.ontoware.aifbcommons.collection.ClosableIterator<org.ontoware.rdf2go.model.Statement> findStatements(org.ontoware.rdf2go.model.node.ResourceOrVariable subject, org.ontoware.rdf2go.model.node.UriOrVariable predicate, org.ontoware.rdf2go.model.node.NodeOrVariable object)
           
 org.ontoware.rdf2go.model.node.URI getContextURI()
           
 org.openrdf.model.Graph getGraph()
           
 org.openrdf.model.ValueFactory getValueFactory()
           
 boolean isIsomorphicWith(org.ontoware.rdf2go.model.Model other)
           
 boolean isLocked()
           
 boolean isValidURI(String uriString)
           
 org.ontoware.aifbcommons.collection.ClosableIterator<org.ontoware.rdf2go.model.Statement> iterator()
           
 void lock()
           
 void readFrom(InputStream in)
           
 void readFrom(Reader in)
           
 void readFrom(Reader in, org.ontoware.rdf2go.model.Syntax syntax)
           
 void removeStatement(org.ontoware.rdf2go.model.node.Resource subject, org.ontoware.rdf2go.model.node.URI predicate, org.ontoware.rdf2go.model.node.Node object)
           
 boolean sparqlAsk(String query)
           
 org.ontoware.aifbcommons.collection.ClosableIterable<org.ontoware.rdf2go.model.Statement> sparqlConstruct(String query)
           
 org.ontoware.aifbcommons.collection.ClosableIterable<org.ontoware.rdf2go.model.Statement> sparqlDescribe(String query)
           
 org.ontoware.rdf2go.model.QueryResultTable sparqlSelect(String queryString)
           
 void unlock()
           
 void writeTo(OutputStream out)
           
 void writeTo(Writer out)
           
 void writeTo(Writer out, org.ontoware.rdf2go.model.Syntax syntax)
           
 
Methods inherited from class org.ontoware.rdf2go.model.impl.AbstractModel
addAll, addStatement, addStatement, addStatement, addStatement, addStatement, addStatement, addStatement, assertModel, close, commit, contains, contains, contains, countStatements, createDatatypeLiteral, createLanguageTagLiteral, createPlainLiteral, createReficationOf, createReficationOf, createStatement, createTriplePattern, createURI, deleteReification, findStatements, getAllReificationsOf, getDiff, getProperty, getUnderlyingModelImplementation, hasReifications, isEmpty, isOpen, newRandomUniqueURI, open, queryConstruct, querySelect, readFrom, removeAll, removeAll, removeStatement, removeStatement, removeStatement, removeStatement, removeStatement, removeStatement, removeStatement, removeStatements, removeStatements, serialize, setAutocommit, setProperty, size, update, writeTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphModel

public GraphModel(org.openrdf.model.Graph graph)
Method Detail

getGraph

public org.openrdf.model.Graph getGraph()

getValueFactory

public org.openrdf.model.ValueFactory getValueFactory()

createBlankNode

public org.ontoware.rdf2go.model.node.BlankNode createBlankNode()

createBlankNode

public org.ontoware.rdf2go.model.node.BlankNode createBlankNode(String bNodeId)

addStatement

public void addStatement(org.ontoware.rdf2go.model.node.Resource subject,
                         org.ontoware.rdf2go.model.node.URI predicate,
                         org.ontoware.rdf2go.model.node.Node object)
                  throws org.ontoware.rdf2go.exception.ModelRuntimeException
Specified by:
addStatement in interface org.ontoware.rdf2go.model.ModelWriter
Specified by:
addStatement in class org.ontoware.rdf2go.model.impl.AbstractModelAddRemove
Throws:
org.ontoware.rdf2go.exception.ModelRuntimeException

removeStatement

public void removeStatement(org.ontoware.rdf2go.model.node.Resource subject,
                            org.ontoware.rdf2go.model.node.URI predicate,
                            org.ontoware.rdf2go.model.node.Node object)
                     throws org.ontoware.rdf2go.exception.ModelRuntimeException
Specified by:
removeStatement in interface org.ontoware.rdf2go.model.ModelAddRemove
Specified by:
removeStatement in class org.ontoware.rdf2go.model.impl.AbstractModelAddRemove
Throws:
org.ontoware.rdf2go.exception.ModelRuntimeException

dump

public void dump()

getContextURI

public org.ontoware.rdf2go.model.node.URI getContextURI()

isIsomorphicWith

public boolean isIsomorphicWith(org.ontoware.rdf2go.model.Model other)

isValidURI

public boolean isValidURI(String uriString)

iterator

public org.ontoware.aifbcommons.collection.ClosableIterator<org.ontoware.rdf2go.model.Statement> iterator()

isLocked

public boolean isLocked()

lock

public void lock()
          throws org.ontoware.rdf2go.exception.LockException
Throws:
org.ontoware.rdf2go.exception.LockException

unlock

public void unlock()

findStatements

public org.ontoware.aifbcommons.collection.ClosableIterator<org.ontoware.rdf2go.model.Statement> findStatements(org.ontoware.rdf2go.model.node.ResourceOrVariable subject,
                                                                                                                org.ontoware.rdf2go.model.node.UriOrVariable predicate,
                                                                                                                org.ontoware.rdf2go.model.node.NodeOrVariable object)
                                                                                                         throws org.ontoware.rdf2go.exception.ModelRuntimeException
Throws:
org.ontoware.rdf2go.exception.ModelRuntimeException

sparqlAsk

public boolean sparqlAsk(String query)
                  throws org.ontoware.rdf2go.exception.ModelRuntimeException,
                         org.ontoware.rdf2go.exception.MalformedQueryException
Specified by:
sparqlAsk in interface org.ontoware.rdf2go.model.Sparqlable
Overrides:
sparqlAsk in class org.ontoware.rdf2go.model.impl.AbstractModel
Throws:
org.ontoware.rdf2go.exception.ModelRuntimeException
org.ontoware.rdf2go.exception.MalformedQueryException

sparqlConstruct

public org.ontoware.aifbcommons.collection.ClosableIterable<org.ontoware.rdf2go.model.Statement> sparqlConstruct(String query)
                                                                                                          throws org.ontoware.rdf2go.exception.ModelRuntimeException,
                                                                                                                 org.ontoware.rdf2go.exception.MalformedQueryException
Throws:
org.ontoware.rdf2go.exception.ModelRuntimeException
org.ontoware.rdf2go.exception.MalformedQueryException

sparqlDescribe

public org.ontoware.aifbcommons.collection.ClosableIterable<org.ontoware.rdf2go.model.Statement> sparqlDescribe(String query)
                                                                                                         throws org.ontoware.rdf2go.exception.ModelRuntimeException
Throws:
org.ontoware.rdf2go.exception.ModelRuntimeException

sparqlSelect

public org.ontoware.rdf2go.model.QueryResultTable sparqlSelect(String queryString)
                                                        throws org.ontoware.rdf2go.exception.MalformedQueryException,
                                                               org.ontoware.rdf2go.exception.ModelRuntimeException
Throws:
org.ontoware.rdf2go.exception.MalformedQueryException
org.ontoware.rdf2go.exception.ModelRuntimeException

readFrom

public void readFrom(Reader in)
              throws IOException,
                     org.ontoware.rdf2go.exception.ModelRuntimeException
Throws:
IOException
org.ontoware.rdf2go.exception.ModelRuntimeException

readFrom

public void readFrom(InputStream in)
              throws IOException,
                     org.ontoware.rdf2go.exception.ModelRuntimeException
Throws:
IOException
org.ontoware.rdf2go.exception.ModelRuntimeException

readFrom

public void readFrom(Reader in,
                     org.ontoware.rdf2go.model.Syntax syntax)
              throws IOException,
                     org.ontoware.rdf2go.exception.ModelRuntimeException
Throws:
IOException
org.ontoware.rdf2go.exception.ModelRuntimeException

writeTo

public void writeTo(Writer out)
             throws IOException,
                    org.ontoware.rdf2go.exception.ModelRuntimeException
Throws:
IOException
org.ontoware.rdf2go.exception.ModelRuntimeException

writeTo

public void writeTo(OutputStream out)
             throws IOException,
                    org.ontoware.rdf2go.exception.ModelRuntimeException
Throws:
IOException
org.ontoware.rdf2go.exception.ModelRuntimeException

writeTo

public void writeTo(Writer out,
                    org.ontoware.rdf2go.model.Syntax syntax)
             throws IOException,
                    org.ontoware.rdf2go.exception.ModelRuntimeException
Throws:
IOException
org.ontoware.rdf2go.exception.ModelRuntimeException


Copyright © 1997-2008 Aduna. All Rights Reserved.