eu.larkc.jactr.modules.declarative.rdf
Class DefaultDeclarativeModuleRdf
java.lang.Object
org.jactr.core.utils.DefaultAdaptable
org.jactr.core.module.AbstractModule
org.jactr.core.module.declarative.basic.AbstractDeclarativeModule
org.jactr.core.module.declarative.basic.DefaultDeclarativeModule
org.jactr.core.module.declarative.six.DefaultDeclarativeModule6
eu.larkc.jactr.modules.declarative.rdf.DefaultDeclarativeModuleRdf
- All Implemented Interfaces:
- IDeclarativeModuleRdf, IDeclarativeModule5, IDeclarativeModule4, IDeclarativeModule, IModule, IAdaptable, IInitializable, IInstallable, IParameterized
public class DefaultDeclarativeModuleRdf
- extends DefaultDeclarativeModule6
- implements IDeclarativeModuleRdf
Default Declarative Module using an OpenRDF Sesame Repository.
- Author:
- Martijn Brakenhoff
Methods inherited from class org.jactr.core.module.declarative.six.DefaultDeclarativeModule6 |
getActivationNoise, getBaseLevelConstant, getMaximumDifference, getMaximumSimilarity, getMismatchPenalty, getPermanentActivationNoise, getSimilarity, setActivationNoise, setBaseLevelConstant, setMaximumDifference, setMaximumSimilarity, setMismatchPenalty, setPartialMatchingEnabled, setPermanentActivationNoise, setSimilarity |
Methods inherited from class org.jactr.core.module.declarative.basic.DefaultDeclarativeModule |
dispose, findExactMatches, findPartialMatches, getAssociativeLinkageSystem, getNumberOfChunks, getPossibleParameters, isDisposalSuspended, reset, setAssociativeLinkageSystem, setDisposalSuspended, willEncode |
Methods inherited from class org.jactr.core.module.declarative.basic.AbstractDeclarativeModule |
addChunk, addChunkType, addListener, copyChunk, createChunk, createChunkType, getBusyChunk, getChunk, getChunks, getChunkType, getChunkTypes, getEmptyChunk, getErrorChunk, getFreeChunk, getFullChunk, getNewChunk, getRequestedChunk, getUnrequestedChunk, removeListener |
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 |
DefaultDeclarativeModuleRdf
public DefaultDeclarativeModuleRdf()
dispose
public void dispose()
- Specified by:
dispose
in interface IModule
- Overrides:
dispose
in class DefaultDeclarativeModule6
initialize
public void initialize()
- Specified by:
initialize
in interface IModule
- Specified by:
initialize
in interface IInitializable
- Overrides:
initialize
in class DefaultDeclarativeModule
getNamespaces
public Map<String,String> getNamespaces()
- Description copied from interface:
IDeclarativeModuleRdf
- Returns the namespaces that are used in this module's
knowledgebase.
- Specified by:
getNamespaces
in interface IDeclarativeModuleRdf
- Returns:
- the namespaces.
getSPARQLPrefixes
public String getSPARQLPrefixes()
- Description copied from interface:
IDeclarativeModuleRdf
- Returns the namespaces (see getNamespaces()), but formats
them like
the PREFIX part of a sparql query.
- Specified by:
getSPARQLPrefixes
in interface IDeclarativeModuleRdf
- Returns:
- the prefix part of a sparql query.
addPrefix
public String addPrefix(String resource)
- Description copied from interface:
IDeclarativeModuleRdf
- Returns the resource, but with the namespace replaced by
the matching prefix.
- Specified by:
addPrefix
in interface IDeclarativeModuleRdf
- Parameters:
resource
- the rdf resource URI.
- Returns:
- if the namespace is known, the resource with a
prefix, otherwise the given resource.
findSPARQLMatches
public Future<Collection<IChunk>> findSPARQLMatches(SPARQLQuery sparqlQuery)
- Description copied from interface:
IDeclarativeModuleRdf
- Returns (the promise of) a collection of all the chunks
that match the given SPARQL Query.
- Specified by:
findSPARQLMatches
in interface IDeclarativeModuleRdf
- Parameters:
sparqlQuery
- the SPARQL-Query object.
- Returns:
- all the chunks that match the given SPARQL Query.
createRdfStoreConnection
public RdfStoreConnection createRdfStoreConnection()
- Description copied from interface:
IDeclarativeModuleRdf
- Returns the RdfStoreConnection to the internal repository.
- Specified by:
createRdfStoreConnection
in interface IDeclarativeModuleRdf
- Returns:
- the RdfStoreConnection
isPartialMatchingEnabled
public boolean isPartialMatchingEnabled()
- Specified by:
isPartialMatchingEnabled
in interface IDeclarativeModule4
- Overrides:
isPartialMatchingEnabled
in class DefaultDeclarativeModule6
getRdfSourceURL
public String getRdfSourceURL()
- Description copied from interface:
IDeclarativeModuleRdf
- Returns the URL that was set as the Source of RDF in the model.
- Specified by:
getRdfSourceURL
in interface IDeclarativeModuleRdf
- Returns:
- the RDF source URL.
getRdfFormat
public String getRdfFormat()
- Description copied from interface:
IDeclarativeModuleRdf
- Returns the RDF format that was set in the model. (Possible
values: String equivalent of org.openrdf.rio.RDFFormat).
- Specified by:
getRdfFormat
in interface IDeclarativeModuleRdf
- Returns:
- the RDF format.
getBaseURI
public String getBaseURI()
- Description copied from interface:
IDeclarativeModuleRdf
- Returns the Base URI that was set for the knowledge base in
the model.
- Specified by:
getBaseURI
in interface IDeclarativeModuleRdf
- Returns:
- the Base URI for the knowledge base
getParameter
public String getParameter(String key)
- Specified by:
getParameter
in interface IParameterized
- Overrides:
getParameter
in class DefaultDeclarativeModule6
getSetableParameters
public Collection<String> getSetableParameters()
- Specified by:
getSetableParameters
in interface IParameterized
- Overrides:
getSetableParameters
in class DefaultDeclarativeModule6
setParameter
public void setParameter(String key,
String value)
- Specified by:
setParameter
in interface IParameterized
- Overrides:
setParameter
in class DefaultDeclarativeModule6