| Constructor and Description |
|---|
Store(File file) |
Store(Iterable<File> files,
String baseURI) |
Store(Iterable<URL> urls) |
Store(List<File> files,
String baseURI,
String scheme)
Initialise the SKOS ontology with the specified files.
|
Store(Map<String,String> conf)
Plugin constructor which accepts configuration parameters.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected void |
forEachObject(org.openrdf.model.Resource subject,
org.openrdf.model.URI predicate,
Consumer<org.openrdf.model.Value> consumer) |
void |
forEachRDFListItem(org.openrdf.model.Resource rdfList,
Consumer<org.openrdf.model.Value> consumer) |
protected void |
forEachStatement(org.openrdf.model.Resource subject,
org.openrdf.model.URI predicate,
Consumer<org.openrdf.model.Statement> consumer) |
Concept |
getConceptById(String id) |
ConceptImpl |
getConceptByNotation(String id) |
ConceptImpl |
getConceptByNotation(String notation,
org.openrdf.model.URI conceptScheme)
Find a concept by notation and concept scheme.
|
TransformationRules |
getConceptTransformations(String notation,
String schemaURI)
Retrieve transformation rules for the concept identified by the given notation (restricted to a schema)
TODO move method to ConceptImpl
|
org.openrdf.repository.RepositoryConnection |
getConnection() |
Concept[] |
getTopConcepts() |
Concept[] |
getTopConcepts(String scheme) |
protected int |
inferInverseRelations(org.openrdf.model.URI predicate,
org.openrdf.model.URI inversePredicate)
Infer inverse relations.
|
long |
lastModified() |
void |
printConceptHierarchy() |
void |
printTopConcepts() |
void |
setConceptScheme(String schemeURI) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnewInstancepublic Store(Map<String,String> conf) throws org.openrdf.repository.RepositoryException, IOException
Configuration keys have the form rdf.baseURI, rdf.file.1, rdf.format.1.
rdf.file is mandatory, other parameters are optional.
rdf.baseURI specifies a URI to resolve any relative URIs that are in the data against. See Store(Iterable, String).
rdf.skosScheme can specify the skos:ConceptScheme to find top concepts and unique notations
conf - configuration parametersFileNotFoundException - if one of the specified files can not be foundIOException - for i/o exceptions while reading the filesorg.openrdf.repository.RepositoryException - for any other exceptions during ontology initialisationpublic Store(List<File> files, String baseURI, String scheme) throws org.openrdf.repository.RepositoryException, IOException
files - TURTLE RDF filesbaseURI - base URI to resolve relative URIs within the RDF files. can be null.scheme - SKOS scheme URI to find top concepts and unique notations. Can be null.org.openrdf.repository.RepositoryException - repository errorsIOException - failure to read the specified filespublic Store(Iterable<File> files, String baseURI) throws org.openrdf.repository.RepositoryException, IOException
org.openrdf.repository.RepositoryExceptionIOExceptionpublic Store(Iterable<URL> urls) throws org.openrdf.repository.RepositoryException, IOException
org.openrdf.repository.RepositoryExceptionIOExceptionpublic Store(File file) throws org.openrdf.repository.RepositoryException, IOException
org.openrdf.repository.RepositoryExceptionIOExceptionprotected int inferInverseRelations(org.openrdf.model.URI predicate,
org.openrdf.model.URI inversePredicate)
throws org.openrdf.repository.RepositoryException
predicate - predicate to search (use the less common one)inversePredicate - inverse predicate to addorg.openrdf.repository.RepositoryException - errorpublic void setConceptScheme(String schemeURI)
public org.openrdf.repository.RepositoryConnection getConnection()
public Concept[] getTopConcepts() throws OntologyException
getTopConcepts in interface OntologyOntologyExceptionpublic Concept[] getTopConcepts(String scheme) throws OntologyException
getTopConcepts in interface OntologyOntologyExceptionpublic void printTopConcepts()
throws OntologyException
OntologyExceptionpublic void printConceptHierarchy()
throws OntologyException
OntologyExceptionpublic ConceptImpl getConceptByNotation(String id) throws OntologyException
getConceptByNotation in interface OntologyOntologyExceptionpublic ConceptImpl getConceptByNotation(String notation, org.openrdf.model.URI conceptScheme) throws org.openrdf.repository.RepositoryException
If null is specified for the scheme, any concept with the specified notation
is returned - regardless of scheme.
notation - notation to findconceptScheme - scheme for the concept or nullorg.openrdf.repository.RepositoryException - for repository errorspublic void close()
throws IOException
close in interface Pluginclose in interface Closeableclose in interface AutoCloseableIOExceptionpublic long lastModified()
lastModified in interface Ontologyprotected void forEachStatement(org.openrdf.model.Resource subject,
org.openrdf.model.URI predicate,
Consumer<org.openrdf.model.Statement> consumer)
throws org.openrdf.repository.RepositoryException
org.openrdf.repository.RepositoryExceptionprotected void forEachObject(org.openrdf.model.Resource subject,
org.openrdf.model.URI predicate,
Consumer<org.openrdf.model.Value> consumer)
throws org.openrdf.repository.RepositoryException
org.openrdf.repository.RepositoryExceptionpublic TransformationRules getConceptTransformations(String notation, String schemaURI) throws OntologyException
notation - notation for the conceptschemaURI - schema in which to search for the notation. can be nullnull if there are no rulesOntologyException - for ontology errorspublic void forEachRDFListItem(org.openrdf.model.Resource rdfList,
Consumer<org.openrdf.model.Value> consumer)
throws org.openrdf.repository.RepositoryException
org.openrdf.repository.RepositoryExceptionpublic Concept getConceptById(String id) throws OntologyException
getConceptById in interface OntologyOntologyExceptionCopyright © 2013–2016 R.W.Majeed. All rights reserved.