eu.larkc.core.data
Interface DataFactory

All Known Implementing Classes:
DataFactoryImpl

public interface DataFactory

DataFactory is responsible to abstract the construction of different implementation used by in the API.

Author:
vassil

Field Summary
static DataFactory INSTANCE
          To consider the implementation of DefaultFactory, which to automated the creation of the different factories.
static java.lang.String LARKC_NS
          LarKC NS
 
Method Summary
 AttributeValueMap createAttributeValueList(SetOfStatements rdf)
          TODO Describe the purpose of this method.
 AttributeValueMap createAttributeValueList(SetOfStatements rdf, org.openrdf.model.URI invocationID)
          TODO Describe the purpose of this method.
 RdfGraph createRdfGraph(java.lang.Iterable<org.openrdf.model.Statement> sts, org.openrdf.model.URI graph)
          Creates a RDF graph that will be passed by value.
 RdfGraph createRdfGraph(SetOfStatements rdf)
          Create RdfGraph from RDF data.
 RdfGraph createRdfGraph(SetOfStatements rdf, org.openrdf.model.URI invocationID)
          Create RdfGraph from RDF data.
 RdfStoreConnection createRdfStoreConnection()
          Creates a connection to local storage.
 RdfGraph createRemoteRdfGraph(org.openrdf.model.URI uri)
          Creates RDF graph from a remote location.
 SPARQLEndpoint createSPARQLEndpoint(org.openrdf.model.URI uri)
          Creates a connection to remote SPARQL endpoint.
 SPARQLQuery createSPARQLQuery(SetOfStatements rdf)
          Create SPARQLQuery from RDF data.
 SPARQLQuery createSPARQLQuery(SetOfStatements rdf, org.openrdf.model.URI invocationID)
          Create SPARQLQuery from RDF data.
 SPARQLQuery createSPARQLQuery(java.lang.String query)
          Create a SPARQL query from a string
 SPARQLQuery createSPARQLQuery(java.lang.String query, java.lang.String ns, org.openrdf.model.URI label)
          Creates a SPARQL query from a string to be executed against a specific labeled group.
 SPARQLQuery createSPARQLQuery(java.lang.String query, org.openrdf.model.URI label)
          Creates a SPARQL query from a string to be executed against a specific labeled group.
 VariableBinding createVariableBinding(SetOfStatements rdf)
          TODO Describe the purpose of this method.
 VariableBinding createVariableBinding(SetOfStatements rdf, org.openrdf.model.URI invocationID)
          TODO Describe the purpose of this method.
 SetOfStatements parseGraph(java.io.File file, java.lang.String nameSpace)
          TODO Describe the purpose of this method.
 RdfGraph setNamedGraph(SetOfStatements input, org.openrdf.model.URI newName)
          Sets the name of the graph for the given SetOfStatements.
 

Field Detail

LARKC_NS

static final java.lang.String LARKC_NS
LarKC NS

See Also:
Constant Field Values

INSTANCE

static final DataFactory INSTANCE
To consider the implementation of DefaultFactory, which to automated the creation of the different factories.

Method Detail

createRdfGraph

RdfGraph createRdfGraph(java.lang.Iterable<org.openrdf.model.Statement> sts,
                        org.openrdf.model.URI graph)
Creates a RDF graph that will be passed by value.

Parameters:
graph - name (may be null)
sts - collection of the statements
Returns:
the graph

createRemoteRdfGraph

RdfGraph createRemoteRdfGraph(org.openrdf.model.URI uri)
Creates RDF graph from a remote location. If the URI could not be resolved an exception will be generated during the construction of the graph.

Parameters:
uri - to be resolved
Returns:
the constructed rdf graph

createRdfStoreConnection

RdfStoreConnection createRdfStoreConnection()
Creates a connection to local storage.

Returns:
a connection to the local store

createSPARQLEndpoint

SPARQLEndpoint createSPARQLEndpoint(org.openrdf.model.URI uri)
Creates a connection to remote SPARQL endpoint. If the URI is not resolvable or SPARQL enabled service could not be found an exception will be generated after constructing the object.

Parameters:
uri -
Returns:
sparql endpoint object

createSPARQLQuery

SPARQLQuery createSPARQLQuery(java.lang.String query)
Create a SPARQL query from a string

Parameters:
query - to be parsed
Returns:
executable query by a SPARQL endpoint

createSPARQLQuery

SPARQLQuery createSPARQLQuery(java.lang.String query,
                              org.openrdf.model.URI label)
Creates a SPARQL query from a string to be executed against a specific labeled group. The labeled group for now could not be specified as part of the syntax like the dataset in FROM/FROM NAMED clauses.

Parameters:
query - to be parsed
label - labeled group to be used (may be null)
Returns:
executable query by a SPARQL endpoint

createSPARQLQuery

SPARQLQuery createSPARQLQuery(java.lang.String query,
                              java.lang.String ns,
                              org.openrdf.model.URI label)
Creates a SPARQL query from a string to be executed against a specific labeled group. The labeled group for now could not be specified as part of the syntax like the dataset in FROM/FROM NAMED clauses.

Parameters:
query - to be parsed
ns - default namespace to be used in the expansion of the short qname in query
label - labeled group to be used (may be null)
Returns:
executable query by a SPARQL endpoint

createRdfGraph

RdfGraph createRdfGraph(SetOfStatements rdf)
Create RdfGraph from RDF data.

Parameters:
rdf -
Returns:
null or the RdfGraph

createRdfGraph

RdfGraph createRdfGraph(SetOfStatements rdf,
                        org.openrdf.model.URI invocationID)
Create RdfGraph from RDF data.

Parameters:
rdf -
invocationID -
Returns:
null or the RdfGraph

createSPARQLQuery

SPARQLQuery createSPARQLQuery(SetOfStatements rdf)
Create SPARQLQuery from RDF data.

Parameters:
rdf -
Returns:
null or the SPARQLQuery

createSPARQLQuery

SPARQLQuery createSPARQLQuery(SetOfStatements rdf,
                              org.openrdf.model.URI invocationID)
Create SPARQLQuery from RDF data.

Parameters:
rdf -
invocationID -
Returns:
null or the SPARQLQuery

createAttributeValueList

AttributeValueMap createAttributeValueList(SetOfStatements rdf)
TODO Describe the purpose of this method.

Parameters:
rdf -
Returns:
null or AttributeValueMap

createAttributeValueList

AttributeValueMap createAttributeValueList(SetOfStatements rdf,
                                           org.openrdf.model.URI invocationID)
TODO Describe the purpose of this method.

Parameters:
rdf -
invocationID -
Returns:
null or AttributeValueMap

createVariableBinding

VariableBinding createVariableBinding(SetOfStatements rdf)
TODO Describe the purpose of this method.

Parameters:
rdf -
Returns:
null or variable binding

createVariableBinding

VariableBinding createVariableBinding(SetOfStatements rdf,
                                      org.openrdf.model.URI invocationID)
TODO Describe the purpose of this method.

Parameters:
rdf -
invocationID -
Returns:
null or variable binding

setNamedGraph

RdfGraph setNamedGraph(SetOfStatements input,
                       org.openrdf.model.URI newName)
Sets the name of the graph for the given SetOfStatements. Old values are overwritten

Parameters:
input -
newName -
Returns:
a graph with the given name and data

parseGraph

SetOfStatements parseGraph(java.io.File file,
                           java.lang.String nameSpace)
                           throws org.openrdf.rio.RDFParseException,
                                  org.openrdf.rio.RDFHandlerException,
                                  java.io.FileNotFoundException,
                                  java.io.IOException
TODO Describe the purpose of this method.

Parameters:
file -
nameSpace -
Returns:
Throws:
java.io.IOException
java.io.FileNotFoundException
org.openrdf.rio.RDFHandlerException
org.openrdf.rio.RDFParseException