eu.larkc.jactr.modules.declarative.rdf
Interface IDeclarativeModuleRdf

All Superinterfaces:
IAdaptable, IDeclarativeModule, IInitializable, IInstallable, IModule
All Known Implementing Classes:
DefaultDeclarativeModuleRdf

public interface IDeclarativeModuleRdf
extends IDeclarativeModule

Declarative modules that implement this interface can be used by LarCT-R modules and productions.

Author:
Martijn Brakenhoff

Field Summary
static String BASE_URI
           
static String RDF_FORMAT
           
static String RDF_SOURCE
           
static String RDF_SOURCE_FILE
           
static String RDF_SOURCE_URL
           
 
Method Summary
 String addPrefix(String resource)
          Returns the resource, but with the namespace replaced by the matching prefix.
 RdfStoreConnection createRdfStoreConnection()
          Returns the RdfStoreConnection to the internal repository.
 Future<Collection<IChunk>> findSPARQLMatches(SPARQLQuery sparqlQuery)
          Returns (the promise of) a collection of all the chunks that match the given SPARQL Query.
 String getBaseURI()
          Returns the Base URI that was set for the knowledge base in the model.
 Map<String,String> getNamespaces()
          Returns the namespaces that are used in this module's knowledgebase.
 String getRdfFormat()
          Returns the RDF format that was set in the model.
 String getRdfSourceURL()
          Returns the URL that was set as the Source of RDF in the model.
 String getSPARQLPrefixes()
          Returns the namespaces (see getNamespaces()), but formats them like the PREFIX part of a sparql query.
 
Methods inherited from interface org.jactr.core.module.declarative.IDeclarativeModule
addChunk, addChunkType, addListener, copyChunk, createChunk, createChunkType, dispose, findExactMatches, findPartialMatches, getAssociativeLinkageSystem, getBusyChunk, getChunk, getChunks, getChunkType, getChunkTypes, getEmptyChunk, getErrorChunk, getFreeChunk, getFullChunk, getNewChunk, getNumberOfChunks, getRequestedChunk, getUnrequestedChunk, removeListener, setAssociativeLinkageSystem, willEncode
 
Methods inherited from interface org.jactr.core.module.IModule
dispose, getModel, getName, initialize, install, reset
 
Methods inherited from interface org.jactr.core.utils.IInstallable
uninstall
 
Methods inherited from interface org.jactr.core.utils.IAdaptable
getAdapter
 

Field Detail

RDF_SOURCE_FILE

static final String RDF_SOURCE_FILE
See Also:
Constant Field Values

RDF_SOURCE_URL

static final String RDF_SOURCE_URL
See Also:
Constant Field Values

RDF_SOURCE

static final String RDF_SOURCE
See Also:
Constant Field Values

BASE_URI

static final String BASE_URI
See Also:
Constant Field Values

RDF_FORMAT

static final String RDF_FORMAT
See Also:
Constant Field Values
Method Detail

getNamespaces

Map<String,String> getNamespaces()
Returns the namespaces that are used in this module's knowledgebase.

Returns:
the namespaces.

getSPARQLPrefixes

String getSPARQLPrefixes()
Returns the namespaces (see getNamespaces()), but formats them like the PREFIX part of a sparql query.

Returns:
the prefix part of a sparql query.

addPrefix

String addPrefix(String resource)
Returns the resource, but with the namespace replaced by the matching prefix.

Parameters:
resource - the rdf resource URI.
Returns:
if the namespace is known, the resource with a prefix, otherwise the given resource.

findSPARQLMatches

Future<Collection<IChunk>> findSPARQLMatches(SPARQLQuery sparqlQuery)
Returns (the promise of) a collection of all the chunks that match the given SPARQL Query.

Parameters:
sparqlQuery - the SPARQL-Query object.
Returns:
all the chunks that match the given SPARQL Query.

createRdfStoreConnection

RdfStoreConnection createRdfStoreConnection()
Returns the RdfStoreConnection to the internal repository.

Returns:
the RdfStoreConnection

getRdfSourceURL

String getRdfSourceURL()
Returns the URL that was set as the Source of RDF in the model.

Returns:
the RDF source URL.

getRdfFormat

String getRdfFormat()
Returns the RDF format that was set in the model. (Possible values: String equivalent of org.openrdf.rio.RDFFormat).

Returns:
the RDF format.

getBaseURI

String getBaseURI()
Returns the Base URI that was set for the knowledge base in the model.

Returns:
the Base URI for the knowledge base