Interface OntologyManager
- All Known Implementing Classes:
OntologyManagerImpl
public interface OntologyManager
A class managing high level operations (such as recursive ontology import, gussing namespace-prefix
mappings etc..) which are usually not automated by a triple store.
The namespace-prefix mapping has a double management
- prefixes for imported ontologies are guessed by means of some heuristics and then directly added to the loaded triple store manager. These "guesses" will be typically shown with a lighter color on user interfaces, denoting their setting being chosen automatically
- the namespace-prefix mapping APIs in this class allow for the definition of custom mappings. These are persisted on the project associated to this OntologyManager and will be reloaded each time the project is open. These custom mappings will usually be evident in the UI as user-specified mappings
- Author:
- Armando Stellato, Manuel Fiorelli
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addOntologyImportFromLocalFile
(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI, ImportModality modality, String fromLocalFilePath, String toLocalFile, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) Imports an ontology from a local file, and optionally copies it to the ontology mirror.void
addOntologyImportFromLocalProject
(org.eclipse.rdf4j.repository.RepositoryConnection conn, ImportModality modality, Project sourceProject, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) Imports an ontology from a local projectvoid
addOntologyImportFromMirror
(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI, ImportModality modality, String mirFileString, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) Imports an ontology from the ontology mirrorvoid
addOntologyImportFromWeb
(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseUriToBeImported, ImportModality modality, String url, org.eclipse.rdf4j.rio.RDFFormat rdfFormat, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) Imports an ontology from the webvoid
addOntologyImportFromWebToMirror
(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI, ImportModality modality, String sourceURL, String toLocalFile, org.eclipse.rdf4j.rio.RDFFormat rdfFormat, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) Imports an ontology from the web and copies it to the ontology mirrorvoid
Clear the managed ontologystatic org.eclipse.rdf4j.model.IRI
computeCanonicalURI
(org.eclipse.rdf4j.model.IRI iri) computeURIVariants
(String baseURI) static List<org.eclipse.rdf4j.model.IRI>
computeURIVariants
(org.eclipse.rdf4j.model.IRI baseURI) void
declareApplicationOntology
(org.eclipse.rdf4j.model.IRI ont, boolean declareImport, boolean ng, boolean ns) It can be used by ST extensions to declare use of application ontologies for supporting their functionalities.void
declareSupportOntology
(org.eclipse.rdf4j.model.IRI ont, boolean declareImport, boolean ng, boolean ns) It can be used to declare use of an ontology, the presence of which is required by the system to work properly.void
disconnectImportedOntologyFromProject
(org.eclipse.rdf4j.repository.RepositoryConnection managedConnection, String baseURI) Disconnects an imported ontology from the source projectvoid
downloadImportedOntologyFromWeb
(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI, String altURL, org.eclipse.rdf4j.rio.RDFFormat rdfFormat, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) Downloads an ontology that is a failed import from the webvoid
downloadImportedOntologyFromWebToMirror
(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI, String altURL, String toLocalFile, org.eclipse.rdf4j.rio.RDFFormat rdfFormat, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) Downloads an ontology that is a failed import from the web to the ontology mirrorReturns the base URI of the managed ontologyvoid
getImportedOntologyFromLocalFile
(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI, String fromLocalFilePath, String toLocalFile, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) Retrieves an ontology that is a failed import from a local file and copies it to the ontology mirrorvoid
getImportedOntologyFromLocalProject
(org.eclipse.rdf4j.repository.RepositoryConnection managedConnection, String baseURI, Project sourceProject, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) Retrieves an ontology that is a failed import from a local projectvoid
getImportedOntologyFromMirror
(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) Retrieves an ontology that is a failed import from the ontology mirrorgetImportStatus
(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI, boolean canonicalComparison) Returns the status of an ontology import.getNSPrefixMappings
(boolean explicit) Returns the prefixed defined in the managed ontology.org.eclipse.rdf4j.rio.RDFHandler
getRDFHandlerForLoadData
(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI, org.eclipse.rdf4j.model.Resource graph, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) Returns anRDFHandler
that adds the data to the ontology being edited (i.e. it is not a read-only import of an external ontology that the working ontology depends on, but a mass add of RDF triples to the main graph of the working ontology)org.eclipse.rdf4j.repository.Repository
Returns the underlyingRepository
getUserOntologyImportTree
(org.eclipse.rdf4j.repository.RepositoryConnection conn) Returns a hierarchical representation of user ontology Imports.void
initializeMappingsPersistence
(NSPrefixMappings nsPrefixMappingsPersistence) Initializes mapping persistenceboolean
Checks whetherns
is an application ontologyboolean
Checks whetherns
is a support ontologyvoid
loadOntologyData
(org.eclipse.rdf4j.repository.RepositoryConnection conn, File inputFile, String baseURI, org.eclipse.rdf4j.rio.RDFFormat format, org.eclipse.rdf4j.model.Resource graph, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) Adds RDF data directly to the ontology being edited (i.e. it is not a read-only import of an external ontology that the working ontology depends on, but a mass add of RDF triples to the main graph of the working ontology)void
mirrorOntology
(String baseURI, String toLocalFile) Copies an ontology to the ontology mirror.void
removeNSPrefixMapping
(String namespace, boolean checkOnlyExplicit) Removes all prefix declarations for the suppliednamespace
void
removeOntologyImport
(org.eclipse.rdf4j.repository.RepositoryConnection conn, String uriToBeRemoved) Removes an ontology importvoid
setBaseURI
(String baseURI) Sets the base URI of the managed ontologyvoid
setNSPrefixMapping
(String prefix, String namespace) Defines a namespace prefix.void
startOntModel
(String baseURI, File repoDir, org.eclipse.rdf4j.repository.config.RepositoryConfig repoConfig) Starts the ontology managervoid
updateImportedOntologyFromLocalFile
(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI, String fromLocalFilePath, String toLocalFile, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) Updates an ontology import from a local file and copies it to the ontology mirrorvoid
updateImportedOntologyFromLocalProject
(org.eclipse.rdf4j.repository.RepositoryConnection managedConnection, String baseURI, String projectName, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) Updates an ontology import from a local projectvoid
updateImportedOntologyFromMirror
(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) Updates an ontology import from the ontology mirrorvoid
updateImportedOntologyFromWeb
(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI, String altURL, org.eclipse.rdf4j.rio.RDFFormat rdfFormat, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) Updates an ontology import from the webvoid
updateImportedOntologyFromWebToMirror
(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI, String altURL, String toLocalFile, org.eclipse.rdf4j.rio.RDFFormat rdfFormat, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) Updates an ontology import from the web and stores it to the ontology mirror
-
Method Details
-
getBaseURI
String getBaseURI()Returns the base URI of the managed ontology- Returns:
-
setBaseURI
Sets the base URI of the managed ontology- Parameters:
baseURI
-
-
getNSPrefixMappings
Returns the prefixed defined in the managed ontology. The returnedMap
is indexed by the prefixes. If the parameterexplicit
is set totrue
, then the returnedMap
contains only prefixed explicitly set through theOntologyManager
.- Parameters:
explicit
-- Returns:
- Throws:
OntologyManagerException
-
setNSPrefixMapping
Defines a namespace prefix. This method shouldn't be invoked explicitly by client code.- Parameters:
prefix
-namespace
-- Throws:
NSPrefixMappingUpdateException
-
removeNSPrefixMapping
void removeNSPrefixMapping(String namespace, boolean checkOnlyExplicit) throws NSPrefixMappingUpdateException Removes all prefix declarations for the suppliednamespace
- Parameters:
namespace
-checkOnlyExplicit
-- Throws:
NSPrefixMappingUpdateException
-
addOntologyImportFromLocalFile
void addOntologyImportFromLocalFile(org.eclipse.rdf4j.repository.RepositoryConnection conn, @Nullable String baseURI, ImportModality modality, String fromLocalFilePath, @Nullable String toLocalFile, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) throws MalformedURLException, org.eclipse.rdf4j.common.exception.RDF4JException Imports an ontology from a local file, and optionally copies it to the ontology mirror.- Parameters:
conn
-baseURI
-modality
-fromLocalFilePath
-toLocalFile
-transitiveImportAllowance
-failedImports
-- Throws:
MalformedURLException
org.eclipse.rdf4j.common.exception.RDF4JException
-
addOntologyImportFromMirror
void addOntologyImportFromMirror(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI, ImportModality modality, String mirFileString, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) throws MalformedURLException, org.eclipse.rdf4j.common.exception.RDF4JException, OntologyManagerException Imports an ontology from the ontology mirror- Parameters:
conn
-baseURI
-modality
-mirFileString
-transitiveImportAllowance
-failedImports
-- Throws:
MalformedURLException
org.eclipse.rdf4j.common.exception.RDF4JException
OntologyManagerException
-
addOntologyImportFromWeb
void addOntologyImportFromWeb(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseUriToBeImported, ImportModality modality, String url, @Nullable org.eclipse.rdf4j.rio.RDFFormat rdfFormat, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) throws MalformedURLException, org.eclipse.rdf4j.common.exception.RDF4JException, OntologyManagerException Imports an ontology from the web- Parameters:
conn
-baseUriToBeImported
-modality
-url
-rdfFormat
-transitiveImportAllowance
-failedImports
-- Throws:
MalformedURLException
org.eclipse.rdf4j.common.exception.RDF4JException
OntologyManagerException
-
addOntologyImportFromWebToMirror
void addOntologyImportFromWebToMirror(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI, ImportModality modality, String sourceURL, String toLocalFile, org.eclipse.rdf4j.rio.RDFFormat rdfFormat, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) throws MalformedURLException, org.eclipse.rdf4j.common.exception.RDF4JException, OntologyManagerException Imports an ontology from the web and copies it to the ontology mirror- Parameters:
conn
-baseURI
-modality
- TODOsourceURL
-toLocalFile
-rdfFormat
-transitiveImportAllowance
-failedImports
-- Throws:
MalformedURLException
org.eclipse.rdf4j.common.exception.RDF4JException
OntologyManagerException
-
addOntologyImportFromLocalProject
void addOntologyImportFromLocalProject(org.eclipse.rdf4j.repository.RepositoryConnection conn, ImportModality modality, Project sourceProject, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) throws MalformedURLException, org.eclipse.rdf4j.common.exception.RDF4JException, OntologyManagerException Imports an ontology from a local project- Parameters:
conn
-modality
- TODOsourceProject
-transitiveImportAllowance
-failedImports
-- Throws:
MalformedURLException
org.eclipse.rdf4j.common.exception.RDF4JException
OntologyManagerException
-
disconnectImportedOntologyFromProject
void disconnectImportedOntologyFromProject(org.eclipse.rdf4j.repository.RepositoryConnection managedConnection, String baseURI) throws STPropertyAccessException Disconnects an imported ontology from the source project- Parameters:
managedConnection
-baseURI
-- Throws:
STPropertyAccessException
-
getUserOntologyImportTree
Collection<OntologyImport> getUserOntologyImportTree(org.eclipse.rdf4j.repository.RepositoryConnection conn) Returns a hierarchical representation of user ontology Imports.- Parameters:
conn
-- Returns:
-
removeOntologyImport
void removeOntologyImport(org.eclipse.rdf4j.repository.RepositoryConnection conn, String uriToBeRemoved) throws IOException Removes an ontology import- Parameters:
conn
-uriToBeRemoved
-- Throws:
IOException
-
getImportStatus
ImportStatus getImportStatus(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI, boolean canonicalComparison) Returns the status of an ontology import. It is possible to indicate whether comparisons should be based on canonical names (i.e. stripping terminating #).The only relevant information isImportStatus.getValue()
- Parameters:
baseURI
-canonicalComparison
-- Returns:
-
downloadImportedOntologyFromWeb
void downloadImportedOntologyFromWeb(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI, String altURL, org.eclipse.rdf4j.rio.RDFFormat rdfFormat, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) throws MalformedURLException, ImportManagementException, org.eclipse.rdf4j.common.exception.RDF4JException, IOException Downloads an ontology that is a failed import from the web- Parameters:
conn
-baseURI
-altURL
-rdfFormat
-transitiveImportAllowance
-failedImports
-- Throws:
MalformedURLException
ImportManagementException
org.eclipse.rdf4j.common.exception.RDF4JException
IOException
-
downloadImportedOntologyFromWebToMirror
void downloadImportedOntologyFromWebToMirror(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI, String altURL, String toLocalFile, org.eclipse.rdf4j.rio.RDFFormat rdfFormat, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) throws ImportManagementException, org.eclipse.rdf4j.common.exception.RDF4JException, MalformedURLException, IOException Downloads an ontology that is a failed import from the web to the ontology mirror- Parameters:
conn
-baseURI
-altURL
-toLocalFile
-rdfFormat
-transitiveImportAllowance
-failedImports
-- Throws:
ImportManagementException
org.eclipse.rdf4j.common.exception.RDF4JException
MalformedURLException
IOException
-
getImportedOntologyFromLocalFile
void getImportedOntologyFromLocalFile(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI, @Nullable String fromLocalFilePath, String toLocalFile, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) throws MalformedURLException, ImportManagementException, org.eclipse.rdf4j.common.exception.RDF4JException, IOException Retrieves an ontology that is a failed import from a local file and copies it to the ontology mirror- Parameters:
conn
-baseURI
-fromLocalFilePath
-toLocalFile
-transitiveImportAllowance
-failedImports
-- Throws:
MalformedURLException
ImportManagementException
org.eclipse.rdf4j.common.exception.RDF4JException
IOException
-
getImportedOntologyFromMirror
void getImportedOntologyFromMirror(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) throws MalformedURLException, ImportManagementException, org.eclipse.rdf4j.common.exception.RDF4JException, IOException Retrieves an ontology that is a failed import from the ontology mirror- Parameters:
conn
-baseURI
-transitiveImportAllowance
-failedImports
-- Throws:
MalformedURLException
ImportManagementException
org.eclipse.rdf4j.common.exception.RDF4JException
IOException
-
getImportedOntologyFromLocalProject
void getImportedOntologyFromLocalProject(org.eclipse.rdf4j.repository.RepositoryConnection managedConnection, String baseURI, Project sourceProject, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) throws ImportManagementException, org.eclipse.rdf4j.common.exception.RDF4JException, IOException Retrieves an ontology that is a failed import from a local project- Parameters:
sourceProject
-transitiveImportAllowance
-- Throws:
org.eclipse.rdf4j.common.exception.RDF4JException
MalformedURLException
OntologyManagerException
ImportManagementException
IOException
-
updateImportedOntologyFromWeb
void updateImportedOntologyFromWeb(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI, String altURL, org.eclipse.rdf4j.rio.RDFFormat rdfFormat, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) throws MalformedURLException, ImportManagementException, org.eclipse.rdf4j.common.exception.RDF4JException, IOException Updates an ontology import from the web- Parameters:
conn
-baseURI
-altURL
-rdfFormat
-transitiveImportAllowance
-failedImports
-- Throws:
MalformedURLException
ImportManagementException
org.eclipse.rdf4j.common.exception.RDF4JException
IOException
-
updateImportedOntologyFromWebToMirror
void updateImportedOntologyFromWebToMirror(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI, String altURL, String toLocalFile, org.eclipse.rdf4j.rio.RDFFormat rdfFormat, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) throws ImportManagementException, org.eclipse.rdf4j.common.exception.RDF4JException, MalformedURLException, IOException Updates an ontology import from the web and stores it to the ontology mirror- Parameters:
conn
-baseURI
-altURL
-toLocalFile
-rdfFormat
-transitiveImportAllowance
-failedImports
-- Throws:
ImportManagementException
org.eclipse.rdf4j.common.exception.RDF4JException
MalformedURLException
IOException
-
updateImportedOntologyFromLocalFile
void updateImportedOntologyFromLocalFile(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI, @Nullable String fromLocalFilePath, String toLocalFile, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) throws MalformedURLException, ImportManagementException, org.eclipse.rdf4j.common.exception.RDF4JException, IOException Updates an ontology import from a local file and copies it to the ontology mirror- Parameters:
conn
-baseURI
-fromLocalFilePath
-toLocalFile
-transitiveImportAllowance
-failedImports
-- Throws:
MalformedURLException
ImportManagementException
org.eclipse.rdf4j.common.exception.RDF4JException
IOException
-
updateImportedOntologyFromLocalProject
void updateImportedOntologyFromLocalProject(org.eclipse.rdf4j.repository.RepositoryConnection managedConnection, String baseURI, String projectName, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) throws ImportManagementException, org.eclipse.rdf4j.common.exception.RDF4JException, IOException Updates an ontology import from a local project- Parameters:
managedConnection
-baseURI
-projectName
-transitiveImportAllowance
-failedImports
-- Throws:
ImportManagementException
org.eclipse.rdf4j.common.exception.RDF4JException
IOException
-
updateImportedOntologyFromMirror
void updateImportedOntologyFromMirror(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) throws MalformedURLException, ImportManagementException, org.eclipse.rdf4j.common.exception.RDF4JException, IOException Updates an ontology import from the ontology mirror- Parameters:
conn
-baseURI
-transitiveImportAllowance
-failedImports
-- Throws:
MalformedURLException
ImportManagementException
org.eclipse.rdf4j.common.exception.RDF4JException
IOException
-
declareApplicationOntology
void declareApplicationOntology(org.eclipse.rdf4j.model.IRI ont, boolean declareImport, boolean ng, boolean ns) It can be used by ST extensions to declare use of application ontologies for supporting their functionalities. The boolean parameters can be used to declare different facets of an application ontology. If no parameter is set to, this declaration has no effect.
- Parameters:
declareImport
- iftrue
, declares an import with modalityImportModality.APPLICATION
.ng
- if true, this prevents triples in the namedgraph of this ontology to be shown (when ST is inuser
mode)ns
- if true, this prevents triples having a predicate with namespace matching the name of ontologyont
to be shown (again, when ST is inuser
mode)ont
-ng
-ns
-
-
isApplicationOntNamespace
Checks whetherns
is an application ontology- Parameters:
ns
-- Returns:
-
declareSupportOntology
void declareSupportOntology(org.eclipse.rdf4j.model.IRI ont, boolean declareImport, boolean ng, boolean ns) It can be used to declare use of an ontology, the presence of which is required by the system to work properly. As an example, core modeling vocabularies are usually declared as such. The boolean parameters can be used to declare different facets of a support ontology. If no parameter is set to, this declaration has no effect.
- Parameters:
declareImport
- iftrue
, declares an import with modalityImportModality.SUPPORT
.ng
- if true, this prevents triples in the namedgraph of this ontology to be shown (when ST is inuser
mode)ns
- if true, this prevents triples having a predicate with namespace matching the name of ontologyont
to be shown (again, when ST is inuser
mode)ont
-ng
-ns
-
-
isSupportOntNamespace
Checks whetherns
is a support ontology- Parameters:
ns
-- Returns:
-
loadOntologyData
void loadOntologyData(org.eclipse.rdf4j.repository.RepositoryConnection conn, File inputFile, String baseURI, org.eclipse.rdf4j.rio.RDFFormat format, org.eclipse.rdf4j.model.Resource graph, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) throws FileNotFoundException, IOException, org.eclipse.rdf4j.common.exception.RDF4JException Adds RDF data directly to the ontology being edited (i.e. it is not a read-only import of an external ontology that the working ontology depends on, but a mass add of RDF triples to the main graph of the working ontology)- Parameters:
conn
- a connection to the managed ontologyinputFile
- the RDF file from which RDF data is being loadedbaseURI
- the baseURI to be used when importing relative names from loaded RDF dataformat
-graph
-transitiveImportAllowance
-failedImports
-- Throws:
FileNotFoundException
IOException
org.eclipse.rdf4j.common.exception.RDF4JException
-
getRDFHandlerForLoadData
org.eclipse.rdf4j.rio.RDFHandler getRDFHandlerForLoadData(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI, org.eclipse.rdf4j.model.Resource graph, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) Returns anRDFHandler
that adds the data to the ontology being edited (i.e. it is not a read-only import of an external ontology that the working ontology depends on, but a mass add of RDF triples to the main graph of the working ontology)- Parameters:
conn
- a connection to the managed ontologybaseURI
- the baseURI to be used when importing relative names from loaded RDF datagraph
-transitiveImportAllowance
-failedImports
-- Throws:
FileNotFoundException
IOException
org.eclipse.rdf4j.common.exception.RDF4JException
-
clearData
void clearData() throws org.eclipse.rdf4j.common.exception.RDF4JExceptionClear the managed ontology- Throws:
org.eclipse.rdf4j.common.exception.RDF4JException
-
mirrorOntology
void mirrorOntology(String baseURI, String toLocalFile) throws ImportManagementException, org.eclipse.rdf4j.common.exception.RDF4JException, OntologyManagerException Copies an ontology to the ontology mirror.- Parameters:
baseURI
-toLocalFile
-- Throws:
ImportManagementException
org.eclipse.rdf4j.common.exception.RDF4JException
OntologyManagerException
-
initializeMappingsPersistence
Initializes mapping persistence- Parameters:
nsPrefixMappingsPersistence
-
-
getRepository
org.eclipse.rdf4j.repository.Repository getRepository()Returns the underlyingRepository
- Returns:
-
startOntModel
void startOntModel(String baseURI, File repoDir, org.eclipse.rdf4j.repository.config.RepositoryConfig repoConfig) throws org.eclipse.rdf4j.common.exception.RDF4JException Starts the ontology manager- Parameters:
baseURI
-repoDir
-repoConfig
-- Throws:
org.eclipse.rdf4j.common.exception.RDF4JException
-
computeCanonicalURI
static org.eclipse.rdf4j.model.IRI computeCanonicalURI(org.eclipse.rdf4j.model.IRI iri) -
computeURIVariants
-
computeURIVariants
-