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 TypeMethodDescriptionvoidaddOntologyImportFromLocalFile(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.voidaddOntologyImportFromLocalProject(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 projectvoidaddOntologyImportFromMirror(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 mirrorvoidaddOntologyImportFromWeb(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 webvoidaddOntologyImportFromWebToMirror(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 mirrorvoidClear the managed ontologystatic org.eclipse.rdf4j.model.IRIcomputeCanonicalURI(org.eclipse.rdf4j.model.IRI iri) computeURIVariants(String baseURI) static List<org.eclipse.rdf4j.model.IRI>computeURIVariants(org.eclipse.rdf4j.model.IRI baseURI) voiddeclareApplicationOntology(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.voiddeclareSupportOntology(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.voiddisconnectImportedOntologyFromProject(org.eclipse.rdf4j.repository.RepositoryConnection managedConnection, String baseURI) Disconnects an imported ontology from the source projectvoiddownloadImportedOntologyFromWeb(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 webvoiddownloadImportedOntologyFromWebToMirror(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 ontologyvoidgetImportedOntologyFromLocalFile(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 mirrorvoidgetImportedOntologyFromLocalProject(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 projectvoidgetImportedOntologyFromMirror(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.retrieves mapping persistencegetNSPrefixMappings(boolean explicit) Returns the prefixed defined in the managed ontology.getRDFHandlerForLoadData(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI, org.eclipse.rdf4j.model.Resource graph, boolean flattenGraphs, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) Returns anRDFHandlerthat adds the data to the ontology being edited (i.e.org.eclipse.rdf4j.repository.RepositoryReturns the underlyingRepositorygetUserOntologyImportTree(org.eclipse.rdf4j.repository.RepositoryConnection conn) Returns a hierarchical representation of user ontology Imports.voidinitializeMappingsPersistence(NSPrefixMappings nsPrefixMappingsPersistence) Initializes mapping persistencebooleanChecks whethernsis an application ontologybooleanChecks whethernsis a support ontologyvoidloadOntologyData(org.eclipse.rdf4j.repository.RepositoryConnection conn, File inputFile, String baseURI, org.eclipse.rdf4j.rio.RDFFormat format, org.eclipse.rdf4j.model.Resource graph, boolean flattenGraphs, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) Adds RDF data directly to the ontology being edited (i.e.voidmirrorOntology(String baseURI, String toLocalFile) Copies an ontology to the ontology mirror.voidremoveNSPrefixMapping(String namespace, boolean checkOnlyExplicit) Removes all prefix declarations for the suppliednamespacevoidremoveOntologyImport(org.eclipse.rdf4j.repository.RepositoryConnection conn, String uriToBeRemoved) Removes an ontology importvoidsetBaseURI(String baseURI) Sets the base URI of the managed ontologyvoidsetNSPrefixMapping(String prefix, String namespace) Defines a namespace prefix.voidstartOntModel(String baseURI, File repoDir, org.eclipse.rdf4j.repository.config.RepositoryConfig repoConfig) Starts the ontology managervoidupdateImportedOntologyFromLocalFile(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 mirrorvoidupdateImportedOntologyFromLocalProject(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 projectvoidupdateImportedOntologyFromMirror(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) Updates an ontology import from the ontology mirrorvoidupdateImportedOntologyFromWeb(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 webvoidupdateImportedOntologyFromWebToMirror(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 returnedMapis indexed by the prefixes. If the parameterexplicitis set totrue, then the returnedMapcontains 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:
MalformedURLExceptionorg.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:
MalformedURLExceptionorg.eclipse.rdf4j.common.exception.RDF4JExceptionOntologyManagerException
-
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:
MalformedURLExceptionorg.eclipse.rdf4j.common.exception.RDF4JExceptionOntologyManagerException
-
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:
MalformedURLExceptionorg.eclipse.rdf4j.common.exception.RDF4JExceptionOntologyManagerException
-
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:
MalformedURLExceptionorg.eclipse.rdf4j.common.exception.RDF4JExceptionOntologyManagerException
-
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:
MalformedURLExceptionImportManagementExceptionorg.eclipse.rdf4j.common.exception.RDF4JExceptionIOException
-
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:
ImportManagementExceptionorg.eclipse.rdf4j.common.exception.RDF4JExceptionMalformedURLExceptionIOException
-
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:
MalformedURLExceptionImportManagementExceptionorg.eclipse.rdf4j.common.exception.RDF4JExceptionIOException
-
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:
MalformedURLExceptionImportManagementExceptionorg.eclipse.rdf4j.common.exception.RDF4JExceptionIOException
-
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.RDF4JExceptionMalformedURLExceptionOntologyManagerExceptionImportManagementExceptionIOException
-
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:
MalformedURLExceptionImportManagementExceptionorg.eclipse.rdf4j.common.exception.RDF4JExceptionIOException
-
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:
ImportManagementExceptionorg.eclipse.rdf4j.common.exception.RDF4JExceptionMalformedURLExceptionIOException
-
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:
MalformedURLExceptionImportManagementExceptionorg.eclipse.rdf4j.common.exception.RDF4JExceptionIOException
-
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:
ImportManagementExceptionorg.eclipse.rdf4j.common.exception.RDF4JExceptionIOException
-
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:
MalformedURLExceptionImportManagementExceptionorg.eclipse.rdf4j.common.exception.RDF4JExceptionIOException
-
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 inusermode)ns- if true, this prevents triples having a predicate with namespace matching the name of ontologyontto be shown (again, when ST is inusermode)ont-ng-ns-
-
isApplicationOntNamespace
Checks whethernsis 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 inusermode)ns- if true, this prevents triples having a predicate with namespace matching the name of ontologyontto be shown (again, when ST is inusermode)ont-ng-ns-
-
isSupportOntNamespace
Checks whethernsis 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, boolean flattenGraphs, 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-flattenGraphs- iftrue, all statements wil be written intograph(IllegalArgumentExceptionis thrown is the latter is null)transitiveImportAllowance-failedImports-- Throws:
FileNotFoundExceptionIOExceptionorg.eclipse.rdf4j.common.exception.RDF4JException
-
getRDFHandlerForLoadData
LoadDataRDFHandler getRDFHandlerForLoadData(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI, @Nullable org.eclipse.rdf4j.model.Resource graph, boolean flattenGraphs, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) Returns anRDFHandlerthat 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- optionally, the graph where statements without an explicit context will be written intoflattenGraphs- iftrue, all statements wil be written intograph(IllegalArgumentExceptionis thrown is the latter is null)transitiveImportAllowance-failedImports-- Throws:
FileNotFoundExceptionIOExceptionorg.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:
ImportManagementExceptionorg.eclipse.rdf4j.common.exception.RDF4JExceptionOntologyManagerException
-
initializeMappingsPersistence
Initializes mapping persistence- Parameters:
nsPrefixMappingsPersistence-
-
getMappingsPersistence
NSPrefixMappings getMappingsPersistence()retrieves mapping persistence- Returns:
- 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
-