Class OntologyManagerImpl
java.lang.Object
it.uniroma2.art.semanticturkey.ontology.impl.OntologyManagerImpl
- All Implemented Interfaces:
OntologyManager
Native implementation of
OntologyManager for RDF4J.- Author:
- Armando Stellato, Manuel Fiorelli
-
Constructor Summary
ConstructorsConstructorDescriptionOntologyManagerImpl(Project project, String repositoryName, boolean validationEnabled) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddOntologyImportFromLocalFile(String baseURI, String fromLocalFilePath, String toLocalFile, ImportModality modality, boolean updateImportStatement, org.eclipse.rdf4j.repository.RepositoryConnection conn, boolean validationCurrentlyEnabled, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports, Set<org.eclipse.rdf4j.model.IRI> importedOntologies) voidaddOntologyImportFromLocalFile(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(Project sourceProject, ImportModality modality, boolean updateImportStatement, org.eclipse.rdf4j.repository.RepositoryConnection conn, boolean validationCurrentlyEnabled, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports, Set<org.eclipse.rdf4j.model.IRI> importedOntologies) 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(String baseURI, String mirFileString, ImportModality modality, boolean updateImportStatement, org.eclipse.rdf4j.repository.RepositoryConnection conn, boolean validationCurrentlyEnabled, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports, Set<org.eclipse.rdf4j.model.IRI> importedOntologies) voidaddOntologyImportFromMirror(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(String baseURI, String sourceURL, org.eclipse.rdf4j.rio.RDFFormat rdfFormat, ImportModality modality, boolean updateImportStatement, org.eclipse.rdf4j.repository.RepositoryConnection conn, boolean validationCurrentlyEnabled, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports, Set<org.eclipse.rdf4j.model.IRI> importedOntologies) voidaddOntologyImportFromWeb(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI, ImportModality modality, String sourceURL, org.eclipse.rdf4j.rio.RDFFormat rdfFormat, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) Imports an ontology from the webvoidaddOntologyImportFromWebToMirror(String baseURI, String sourceURL, String toLocalFile, org.eclipse.rdf4j.rio.RDFFormat rdfFormat, ImportModality modality, boolean updateImportStatement, org.eclipse.rdf4j.repository.RepositoryConnection conn, boolean validationCurrentlyEnabled, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports, Set<org.eclipse.rdf4j.model.IRI> importedOntologies) voidaddOntologyImportFromWebToMirror(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 mirrorprotected booleanavailableNG(org.eclipse.rdf4j.repository.RepositoryConnection conn, org.eclipse.rdf4j.model.IRI ont) tells if named graphontis present in the current ontologyvoidClear the managed ontologyprotected IterationSpy<org.eclipse.rdf4j.model.Statement>createImportsSpyingIteration(String baseURI, InputStream in, org.eclipse.rdf4j.rio.RDFParser parser, org.eclipse.rdf4j.model.Model capturedImports) protected IterationSpy<org.eclipse.rdf4j.model.Statement>createImportsSpyingIteration(String baseURI, org.eclipse.rdf4j.common.iteration.CloseableIteration<org.eclipse.rdf4j.model.Statement> iter, org.eclipse.rdf4j.model.Model capturedImports) protected IterationSpy<org.eclipse.rdf4j.model.Statement>createURLImportsSpyingIteration(String baseURI, String sourceURL, org.eclipse.rdf4j.rio.RDFFormat rdfFormat, org.eclipse.rdf4j.model.Model capturedImports) 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 conn, String baseURI) Disconnects an imported ontology from the source projectprotected voiddoImport(org.eclipse.rdf4j.repository.RepositoryConnection conn, boolean validationCurrentlyEnabled, ImportModality mod, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports, Set<org.eclipse.rdf4j.model.IRI> importedOntologies, String baseURI, ImportMethod method) voiddownloadImportedOntologyFromWeb(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 ontologyCollection<org.eclipse.rdf4j.model.IRI>getDeclaredImports(org.eclipse.rdf4j.repository.RepositoryConnection conn, ImportModality mod, boolean excludeStagedRemovals) retrieves the list of imports for the givenImportModality
note that these are imports declared (it is not assured that they have been imported successfully)voidgetImportedOntologyFromLocalFile(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 conn, 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 persistenceprotected MirroredOntologyFilegetMirFile(String toLocalFile, org.eclipse.rdf4j.rio.RDFFormat rdfFormat) getNSPrefixMappings(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 nsPrefixMappings) 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 importvoidremoveOntologyImport(org.eclipse.rdf4j.repository.RepositoryConnection conn, String uriToBeRemoved, ImportModality mod) voidsetBaseURI(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 supportRepoConfig) 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 conn, 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
-
Constructor Details
-
OntologyManagerImpl
-
-
Method Details
-
getBaseURI
Description copied from interface:OntologyManagerReturns the base URI of the managed ontology- Specified by:
getBaseURIin interfaceOntologyManager- Returns:
-
getNSPrefixMappings
Description copied from interface:OntologyManagerReturns 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.- Specified by:
getNSPrefixMappingsin interfaceOntologyManager- Returns:
- Throws:
OntologyManagerException
-
addOntologyImportFromLocalFile
public void addOntologyImportFromLocalFile(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI, ImportModality modality, String fromLocalFilePath, String toLocalFile, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) throws org.eclipse.rdf4j.common.exception.RDF4JException, OntologyManagerException Description copied from interface:OntologyManagerImports an ontology from a local file, and optionally copies it to the ontology mirror.- Specified by:
addOntologyImportFromLocalFilein interfaceOntologyManager- Throws:
org.eclipse.rdf4j.common.exception.RDF4JExceptionOntologyManagerException
-
addOntologyImportFromLocalFile
public void addOntologyImportFromLocalFile(String baseURI, String fromLocalFilePath, String toLocalFile, ImportModality modality, boolean updateImportStatement, org.eclipse.rdf4j.repository.RepositoryConnection conn, boolean validationCurrentlyEnabled, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports, Set<org.eclipse.rdf4j.model.IRI> importedOntologies) throws OntologyManagerException - Throws:
OntologyManagerException
-
addOntologyImportFromMirror
public void addOntologyImportFromMirror(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI, ImportModality modality, String mirFileString, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) throws org.eclipse.rdf4j.common.exception.RDF4JException, OntologyManagerException Description copied from interface:OntologyManagerImports an ontology from the ontology mirror- Specified by:
addOntologyImportFromMirrorin interfaceOntologyManager- Throws:
org.eclipse.rdf4j.common.exception.RDF4JExceptionOntologyManagerException
-
addOntologyImportFromMirror
public void addOntologyImportFromMirror(String baseURI, String mirFileString, ImportModality modality, boolean updateImportStatement, org.eclipse.rdf4j.repository.RepositoryConnection conn, boolean validationCurrentlyEnabled, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports, Set<org.eclipse.rdf4j.model.IRI> importedOntologies) throws OntologyManagerException - Throws:
OntologyManagerException
-
addOntologyImportFromWeb
public void addOntologyImportFromWeb(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI, ImportModality modality, String sourceURL, org.eclipse.rdf4j.rio.RDFFormat rdfFormat, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) throws MalformedURLException, org.eclipse.rdf4j.common.exception.RDF4JException, OntologyManagerException Description copied from interface:OntologyManagerImports an ontology from the web- Specified by:
addOntologyImportFromWebin interfaceOntologyManager- Throws:
MalformedURLExceptionorg.eclipse.rdf4j.common.exception.RDF4JExceptionOntologyManagerException
-
addOntologyImportFromWeb
public void addOntologyImportFromWeb(String baseURI, String sourceURL, org.eclipse.rdf4j.rio.RDFFormat rdfFormat, ImportModality modality, boolean updateImportStatement, org.eclipse.rdf4j.repository.RepositoryConnection conn, boolean validationCurrentlyEnabled, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports, Set<org.eclipse.rdf4j.model.IRI> importedOntologies) throws OntologyManagerException - Throws:
OntologyManagerException
-
addOntologyImportFromWebToMirror
public 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 Description copied from interface:OntologyManagerImports an ontology from the web and copies it to the ontology mirror- Specified by:
addOntologyImportFromWebToMirrorin interfaceOntologyManagermodality- TODO- Throws:
MalformedURLExceptionorg.eclipse.rdf4j.common.exception.RDF4JExceptionOntologyManagerException
-
addOntologyImportFromLocalProject
public 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 Description copied from interface:OntologyManagerImports an ontology from a local project- Specified by:
addOntologyImportFromLocalProjectin interfaceOntologyManagermodality- TODO- Throws:
MalformedURLExceptionorg.eclipse.rdf4j.common.exception.RDF4JExceptionOntologyManagerException
-
disconnectImportedOntologyFromProject
public void disconnectImportedOntologyFromProject(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI) throws OntologyManagerException Description copied from interface:OntologyManagerDisconnects an imported ontology from the source project- Specified by:
disconnectImportedOntologyFromProjectin interfaceOntologyManager- Throws:
OntologyManagerException
-
addOntologyImportFromLocalProject
public void addOntologyImportFromLocalProject(Project sourceProject, ImportModality modality, boolean updateImportStatement, org.eclipse.rdf4j.repository.RepositoryConnection conn, boolean validationCurrentlyEnabled, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports, Set<org.eclipse.rdf4j.model.IRI> importedOntologies) throws OntologyManagerException - Throws:
OntologyManagerException
-
addOntologyImportFromWebToMirror
public void addOntologyImportFromWebToMirror(String baseURI, String sourceURL, String toLocalFile, org.eclipse.rdf4j.rio.RDFFormat rdfFormat, ImportModality modality, boolean updateImportStatement, org.eclipse.rdf4j.repository.RepositoryConnection conn, boolean validationCurrentlyEnabled, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports, Set<org.eclipse.rdf4j.model.IRI> importedOntologies) throws OntologyManagerException - Throws:
OntologyManagerException
-
getUserOntologyImportTree
public Collection<OntologyImport> getUserOntologyImportTree(org.eclipse.rdf4j.repository.RepositoryConnection conn) Description copied from interface:OntologyManagerReturns a hierarchical representation of user ontology Imports.- Specified by:
getUserOntologyImportTreein interfaceOntologyManager- Returns:
-
getMirFile
protected MirroredOntologyFile getMirFile(String toLocalFile, org.eclipse.rdf4j.rio.RDFFormat rdfFormat) -
createURLImportsSpyingIteration
protected IterationSpy<org.eclipse.rdf4j.model.Statement> createURLImportsSpyingIteration(String baseURI, String sourceURL, org.eclipse.rdf4j.rio.RDFFormat rdfFormat, org.eclipse.rdf4j.model.Model capturedImports) throws MalformedURLException, IOException, org.eclipse.rdf4j.rio.UnsupportedRDFormatException, OntologyManagerException - Throws:
MalformedURLExceptionIOExceptionorg.eclipse.rdf4j.rio.UnsupportedRDFormatExceptionOntologyManagerException
-
createImportsSpyingIteration
protected IterationSpy<org.eclipse.rdf4j.model.Statement> createImportsSpyingIteration(String baseURI, InputStream in, org.eclipse.rdf4j.rio.RDFParser parser, org.eclipse.rdf4j.model.Model capturedImports) -
createImportsSpyingIteration
protected IterationSpy<org.eclipse.rdf4j.model.Statement> createImportsSpyingIteration(String baseURI, org.eclipse.rdf4j.common.iteration.CloseableIteration<org.eclipse.rdf4j.model.Statement> iter, org.eclipse.rdf4j.model.Model capturedImports) -
doImport
protected void doImport(org.eclipse.rdf4j.repository.RepositoryConnection conn, boolean validationCurrentlyEnabled, ImportModality mod, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports, Set<org.eclipse.rdf4j.model.IRI> importedOntologies, String baseURI, ImportMethod method) throws OntologyManagerException - Throws:
OntologyManagerException
-
availableNG
protected boolean availableNG(org.eclipse.rdf4j.repository.RepositoryConnection conn, org.eclipse.rdf4j.model.IRI ont) throws org.eclipse.rdf4j.common.exception.RDF4JException tells if named graphontis present in the current ontology- Parameters:
ont-- Returns:
- Throws:
org.eclipse.rdf4j.common.exception.RDF4JException
-
removeOntologyImport
public void removeOntologyImport(org.eclipse.rdf4j.repository.RepositoryConnection conn, String uriToBeRemoved) throws IOException Description copied from interface:OntologyManagerRemoves an ontology import- Specified by:
removeOntologyImportin interfaceOntologyManager- Throws:
IOException
-
removeOntologyImport
public void removeOntologyImport(org.eclipse.rdf4j.repository.RepositoryConnection conn, String uriToBeRemoved, ImportModality mod) throws IOException - Throws:
IOException
-
getImportStatus
public ImportStatus getImportStatus(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI, boolean canonicalComparison) Description copied from interface:OntologyManagerReturns 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()- Specified by:
getImportStatusin interfaceOntologyManager- Returns:
-
getDeclaredImports
public Collection<org.eclipse.rdf4j.model.IRI> getDeclaredImports(org.eclipse.rdf4j.repository.RepositoryConnection conn, ImportModality mod, boolean excludeStagedRemovals) throws org.eclipse.rdf4j.common.exception.RDF4JException retrieves the list of imports for the given
ImportModality
note that these are imports declared (it is not assured that they have been imported successfully)for example,
getImportSet(ImportModality.USER)retrieves the set of all ontology imports set by the user- Parameters:
conn-mod-excludeStagedRemovals-- Returns:
- Throws:
org.eclipse.rdf4j.common.exception.RDF4JException
-
declareApplicationOntology
public void declareApplicationOntology(org.eclipse.rdf4j.model.IRI ont, boolean declareImport, boolean ng, boolean ns) Description copied from interface:OntologyManagerIt 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.- Specified by:
declareApplicationOntologyin interfaceOntologyManagerdeclareImport- 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)
-
declareSupportOntology
public void declareSupportOntology(org.eclipse.rdf4j.model.IRI ont, boolean declareImport, boolean ng, boolean ns) Description copied from interface:OntologyManagerIt 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.- Specified by:
declareSupportOntologyin interfaceOntologyManagerdeclareImport- 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)
-
downloadImportedOntologyFromWeb
public 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 ImportManagementException, org.eclipse.rdf4j.common.exception.RDF4JException, IOException Description copied from interface:OntologyManagerDownloads an ontology that is a failed import from the web- Specified by:
downloadImportedOntologyFromWebin interfaceOntologyManager- Throws:
ImportManagementExceptionorg.eclipse.rdf4j.common.exception.RDF4JExceptionMalformedURLExceptionIOException
-
downloadImportedOntologyFromWebToMirror
public 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 Description copied from interface:OntologyManagerDownloads an ontology that is a failed import from the web to the ontology mirror- Specified by:
downloadImportedOntologyFromWebToMirrorin interfaceOntologyManager- Throws:
ImportManagementExceptionorg.eclipse.rdf4j.common.exception.RDF4JExceptionMalformedURLExceptionIOException
-
getImportedOntologyFromLocalFile
public void getImportedOntologyFromLocalFile(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI, String fromLocalFilePath, String toLocalFile, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) throws ImportManagementException, org.eclipse.rdf4j.common.exception.RDF4JException, IOException Description copied from interface:OntologyManagerRetrieves an ontology that is a failed import from a local file and copies it to the ontology mirror- Specified by:
getImportedOntologyFromLocalFilein interfaceOntologyManager- Throws:
ImportManagementExceptionorg.eclipse.rdf4j.common.exception.RDF4JExceptionMalformedURLExceptionIOException
-
getImportedOntologyFromMirror
public void getImportedOntologyFromMirror(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) throws ImportManagementException, org.eclipse.rdf4j.common.exception.RDF4JException, IOException Description copied from interface:OntologyManagerRetrieves an ontology that is a failed import from the ontology mirror- Specified by:
getImportedOntologyFromMirrorin interfaceOntologyManager- Throws:
ImportManagementExceptionorg.eclipse.rdf4j.common.exception.RDF4JExceptionMalformedURLExceptionIOException
-
getImportedOntologyFromLocalProject
public void getImportedOntologyFromLocalProject(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI, Project sourceProject, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) throws ImportManagementException, org.eclipse.rdf4j.common.exception.RDF4JException, IOException Description copied from interface:OntologyManagerRetrieves an ontology that is a failed import from a local project- Specified by:
getImportedOntologyFromLocalProjectin interfaceOntologyManager- Throws:
org.eclipse.rdf4j.common.exception.RDF4JExceptionMalformedURLExceptionImportManagementExceptionIOException
-
updateImportedOntologyFromWeb
public 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 Description copied from interface:OntologyManagerUpdates an ontology import from the web- Specified by:
updateImportedOntologyFromWebin interfaceOntologyManager- Throws:
MalformedURLExceptionImportManagementExceptionorg.eclipse.rdf4j.common.exception.RDF4JExceptionIOException
-
updateImportedOntologyFromWebToMirror
public 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 Description copied from interface:OntologyManagerUpdates an ontology import from the web and stores it to the ontology mirror- Specified by:
updateImportedOntologyFromWebToMirrorin interfaceOntologyManager- Throws:
ImportManagementExceptionorg.eclipse.rdf4j.common.exception.RDF4JExceptionMalformedURLExceptionIOException
-
updateImportedOntologyFromLocalFile
public 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 Description copied from interface:OntologyManagerUpdates an ontology import from a local file and copies it to the ontology mirror- Specified by:
updateImportedOntologyFromLocalFilein interfaceOntologyManager- Throws:
MalformedURLExceptionImportManagementExceptionorg.eclipse.rdf4j.common.exception.RDF4JExceptionIOException
-
updateImportedOntologyFromLocalProject
public void updateImportedOntologyFromLocalProject(org.eclipse.rdf4j.repository.RepositoryConnection conn, String baseURI, String projectName, TransitiveImportMethodAllowance transitiveImportAllowance, Set<org.eclipse.rdf4j.model.IRI> failedImports) throws ImportManagementException, org.eclipse.rdf4j.common.exception.RDF4JException, IOException Description copied from interface:OntologyManagerUpdates an ontology import from a local project- Specified by:
updateImportedOntologyFromLocalProjectin interfaceOntologyManager- Throws:
ImportManagementExceptionorg.eclipse.rdf4j.common.exception.RDF4JExceptionIOException
-
updateImportedOntologyFromMirror
public 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 Description copied from interface:OntologyManagerUpdates an ontology import from the ontology mirror- Specified by:
updateImportedOntologyFromMirrorin interfaceOntologyManager- Throws:
MalformedURLExceptionImportManagementExceptionorg.eclipse.rdf4j.common.exception.RDF4JExceptionIOException
-
isApplicationOntNamespace
Description copied from interface:OntologyManagerChecks whethernsis an application ontology- Specified by:
isApplicationOntNamespacein interfaceOntologyManager- Returns:
-
isSupportOntNamespace
Description copied from interface:OntologyManagerChecks whethernsis a support ontology- Specified by:
isSupportOntNamespacein interfaceOntologyManager- Returns:
-
mirrorOntology
public void mirrorOntology(String baseURI, String toLocalFile) throws ImportManagementException, OntologyManagerException Description copied from interface:OntologyManagerCopies an ontology to the ontology mirror.- Specified by:
mirrorOntologyin interfaceOntologyManager- Throws:
ImportManagementExceptionOntologyManagerException
-
clearData
public void clearData() throws org.eclipse.rdf4j.common.exception.RDF4JExceptionDescription copied from interface:OntologyManagerClear the managed ontology- Specified by:
clearDatain interfaceOntologyManager- Throws:
org.eclipse.rdf4j.common.exception.RDF4JException
-
removeNSPrefixMapping
public void removeNSPrefixMapping(String namespace, boolean checkOnlyExplicit) throws NSPrefixMappingUpdateException Description copied from interface:OntologyManagerRemoves all prefix declarations for the suppliednamespace- Specified by:
removeNSPrefixMappingin interfaceOntologyManager- Throws:
NSPrefixMappingUpdateException
-
setBaseURI
Description copied from interface:OntologyManagerSets the base URI of the managed ontology- Specified by:
setBaseURIin interfaceOntologyManager
-
setNSPrefixMapping
public void setNSPrefixMapping(String prefix, String namespace) throws NSPrefixMappingUpdateException Description copied from interface:OntologyManagerDefines a namespace prefix. This method shouldn't be invoked explicitly by client code.- Specified by:
setNSPrefixMappingin interfaceOntologyManager- Throws:
NSPrefixMappingUpdateException
-
loadOntologyData
public 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 Description copied from interface:OntologyManagerAdds 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)- Specified by:
loadOntologyDatain interfaceOntologyManager- 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 dataflattenGraphs- iftrue, all statements wil be written intograph(IllegalArgumentExceptionis thrown is the latter is null)- Throws:
FileNotFoundExceptionIOExceptionorg.eclipse.rdf4j.common.exception.RDF4JException
-
getRDFHandlerForLoadData
public 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) Description copied from interface:OntologyManagerReturns 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)- Specified by:
getRDFHandlerForLoadDatain interfaceOntologyManager- 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)
-
initializeMappingsPersistence
Description copied from interface:OntologyManagerInitializes mapping persistence- Specified by:
initializeMappingsPersistencein interfaceOntologyManager
-
getMappingsPersistence
Description copied from interface:OntologyManagerretrieves mapping persistence- Specified by:
getMappingsPersistencein interfaceOntologyManager- Returns:
- nsPrefixMappingsPersistence
-
getRepository
public org.eclipse.rdf4j.repository.Repository getRepository()Description copied from interface:OntologyManagerReturns the underlyingRepository- Specified by:
getRepositoryin interfaceOntologyManager- Returns:
-
startOntModel
public void startOntModel(String baseURI, File repoDir, org.eclipse.rdf4j.repository.config.RepositoryConfig supportRepoConfig) throws OntologyManagerException Description copied from interface:OntologyManagerStarts the ontology manager- Specified by:
startOntModelin interfaceOntologyManager- Throws:
OntologyManagerException
-