Class OntConfig
- All Implemented Interfaces:
AxiomsSettings,CacheSettings,LoadSettings,Serializable
- Direct Known Subclasses:
OntConfig.Concurrent
OntologyConfigurator and provides access to the new (ONT-API) settings.
Note: this configuration is mutable, while load and write configs are not.
Additional (new) ONT-API methods:
getManagerIRIsCacheSize()(since 1.4.0)getLoadNodesCacheSize()andsetLoadNodesCacheSize(int)(since 1.4.0)getLoadObjectsCacheSize()andsetLoadObjectsCacheSize(int)(since 1.4.0)setModelCacheLevel(int, boolean)(since 1.4.2),setModelCacheLevel(int)(since 1.4.0)CacheSettings.useContentCache(),CacheSettings.useComponentCache(),CacheSettings.useIteratorCache()(since 1.4.2)getSpecification()andsetSpecification(OntSpecification, String)getGraphTransformers()amdsetGraphTransformers(GraphTransformers)isPerformTransformation()andsetPerformTransformation(boolean)isProcessImports()andsetProcessImports(boolean)(since 1.4.1)getSupportedSchemes()andsetSupportedSchemes(List)disableWebAccess()(since 1.1.0)isAllowReadDeclarations()andsetAllowReadDeclarations(boolean)isAllowBulkAnnotationAssertions()andsetAllowBulkAnnotationAssertions(boolean)isIgnoreAnnotationAxiomOverlaps()andsetIgnoreAnnotationAxiomOverlaps(boolean)isUseOWLParsersToLoad()andsetUseOWLParsersToLoad(boolean)isControlImports()andsetControlImports(boolean)isIgnoreAxiomsReadErrors()andsetIgnoreAxiomsReadErrors(boolean)(since 1.1.0)isSplitAxiomAnnotations()andsetSplitAxiomAnnotations(boolean)(since 1.3.0)isUseDistinctUnionGraph()andsetUseDistinctUnionGraph(boolean)(since 4.0.1)
Created @ssz on 27.02.2017.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumNested classes/interfaces inherited from interface com.github.owlcs.ontapi.config.LoadSettings
LoadSettings.Scheme -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Map<OntSettings, Object> protected final Set<OntSettings> protected final Map<OntSettings, Object> Fields inherited from interface com.github.owlcs.ontapi.config.CacheSettings
CACHE_ALL, CACHE_COMPONENT, CACHE_CONTENT, CACHE_ITERATOR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddIgnoredImport(org.semanticweb.owlapi.model.IRI iri) protected Map<OntSettings, Object> asMap()Builds new loader configuration.Builds new writer configuration.static OntConfigcopy(org.semanticweb.owlapi.model.OntologyConfigurator from) Copies all settings from the givenOntologyConfiguratorto a new instance.static OntConfigcreateConfig(ReadWriteLock lock) Creates a new config instance with the default settings and the givenReadWriteLock.protected Map<OntSettings, Object> data()An ONT-API manager's load config setter.booleanprotected <X> Xget(OntSettings key) intOWL-API(NEW) manager load config getter.An ONT-API manager's load config getter.protected List<org.semanticweb.owlapi.model.IRI> intintAn ONT-API manager's load config getter.intAn ONT-API manager's load config getter.intAn ONT-API manager's load config getter.org.semanticweb.owlapi.model.MissingImportHandlingStrategyorg.semanticweb.owlapi.model.MissingOntologyHeaderStrategyintAn ONT-API manager's load config getter.org.semanticweb.owlapi.model.PriorityCollectionSortingintorg.apache.jena.ontapi.OntSpecificationAn ONT-API manager's load config getter.An ONT-API manager's load config getter.inthashCode()protected static Set<org.semanticweb.owlapi.model.IRI> ignoredImports(org.semanticweb.owlapi.model.OntologyConfigurator owl) booleanAn ONT-API manager's load config getter.booleanAn ONT-API manager's load config getter.booleanAn ONT-API manager's write config getter.booleanAn ONT-API manager's load config getter.booleanAn ONT-API manager's load config getter.booleanOWL-API(NEW) manager load config getter.booleanAn ONT-API manager's load config getter.booleanAn ONT-API manager's load config getter.booleanAn ONT-API manager's load config getter.booleanAn ONT-API manager's load config getter.booleanAn ONT-API manager's load config getter.booleanAn ONT-API manager's load config getter.lockProperty(OntSettings... keys) Makes the given property-keysprohibited for modification.protected OntConfigput(OntSettings key, Object value) putAll(org.semanticweb.owlapi.model.OntologyConfigurator from) Copies configuration from the given config.protected OntConfigputIgnoredImports(List<org.semanticweb.owlapi.model.IRI> imports) protected OntConfigputNonNegative(OntSettings k, int v) protected OntConfigputPositive(OntSettings k, int v) removeIgnoredImport(org.semanticweb.owlapi.model.IRI iri) protected static Map<OntSettings, Object> serializableOnly(Map<OntSettings, Object> data) setAcceptingHTTPCompression(boolean b) setAllowBulkAnnotationAssertions(boolean b) An ONT-API manager's load config setter.setAllowReadDeclarations(boolean b) An ONT-API manager's load config setter.setConnectionTimeout(int t) setControlImports(boolean b) An ONT-API manager's write config setter.setFollowRedirects(boolean b) setGraphTransformers(GraphTransformers transformers) An ONT-API manager's load config setter.setIgnoreAnnotationAxiomOverlaps(boolean b) An ONT-API manager's load config setter.setIgnoreAxiomsReadErrors(boolean b) An ONT-API manager's load config setter.setLoadAnnotationAxioms(boolean b) An ONT-API manager's load config setter.setLoadNodesCacheSize(int size) An ONT-API manager's load config setter.setLoadObjectsCacheSize(int size) An ONT-API manager's load config setter.protected OntConfigsetManagerIRIsCacheSize(int size) An ONT-API manager's load config setter.setMissingImportHandlingStrategy(org.semanticweb.owlapi.model.MissingImportHandlingStrategy strategy) setMissingOntologyHeaderStrategy(org.semanticweb.owlapi.model.MissingOntologyHeaderStrategy strategy) setModelCacheLevel(int level) An ONT-API manager's load config setter.default OntConfigsetModelCacheLevel(int constant, boolean b) Turns on/off the content cache use.setPerformTransformation(boolean b) An ONT-API manager's load config setter.setPriorityCollectionSorting(org.semanticweb.owlapi.model.PriorityCollectionSorting sorting) setProcessImports(boolean b) An ONT-API manager's load config setter.setReadONTObjects(boolean b) An ONT-API manager's load config setter.setReportStackTraces(boolean b) setRetriesToAttempt(int retries) default OntConfigsetSpecification(org.apache.jena.ontapi.OntSpecification specification) SetsOntSpecificationmodel configuration object.setSpecification(org.apache.jena.ontapi.OntSpecification specification, String constantFieldPath) An ONT-API manager's load config setter.setSplitAxiomAnnotations(boolean b) An ONT-API manager's load config setter.setStrict(boolean strict) setSupportedSchemes(List<LoadSettings.Scheme> schemes) An ONT-API manager's load config setter.setTreatDublinCoreAsBuiltIn(boolean value) setUseDistinctUnionGraph(boolean b) An ONT-API manager's load config setter.setUseOWLParsersToLoad(boolean b) An ONT-API manager's load config setter.booleanbooleanbooleanbooleanThe same asisLoadAnnotationAxioms()booleanbooleanbooleanAlways returnstruesince this functionality is not supported by ONT-API.booleanbooleanbooleanbooleanbooleanbooleanprotected Map<OntSettings, Object> store()withBannedParsers(String parsers) withBannersEnabled(boolean b) OWL-API(NEW) manager load config setter.withIndenting(boolean b) withIndentSize(int indent) withLabelsAsBanner(boolean b) static OntConfigwithLock(OntConfig conf, ReadWriteLock lock) Makes a concurrent version of the specified config with the given R/W lock if needed, otherwise returns the same config.withRemapAllAnonymousIndividualsIds(boolean b) withRepairIllegalPunnings(boolean b) No-op since this functionality is not supported by ONT-API.withSaveIdsForAllAnonymousIndividuals(boolean b) withUseNamespaceEntities(boolean b) Methods inherited from class org.semanticweb.owlapi.model.OntologyConfigurator
shouldOutputNamedGraphIRI, withNamedGraphIRIEnabledMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.github.owlcs.ontapi.config.CacheSettings
useComponentCache, useContentCache, useIteratorCache, useLoadNodesCache, useLoadObjectsCache
-
Field Details
-
data
-
store
-
locked
-
-
Constructor Details
-
OntConfig
public OntConfig()Constructs a config. All its settings are taken from the./resources/ontapi.propertiesfile or, if missed in the file, from thedefaults.
-
-
Method Details
-
createConfig
Creates a new config instance with the default settings and the givenReadWriteLock.- Parameters:
lock-ReadWriteLockornullfor non-concurrent version- Returns:
OntConfig- Since:
- 1.4.0
-
withLock
Makes a concurrent version of the specified config with the given R/W lock if needed, otherwise returns the same config. A concurrent config is backed by the given and vice versa.- Parameters:
conf-OntConfig, notnulllock-ReadWriteLock, possiblenull- Returns:
- an instance with lock
- Since:
- 1.4.0
-
copy
Copies all settings from the givenOntologyConfiguratorto a new instance.- Parameters:
from-OntologyConfiguratorornullto create config with default settings.- Returns:
OntConfignew instance
-
serializableOnly
-
ignoredImports
protected static Set<org.semanticweb.owlapi.model.IRI> ignoredImports(org.semanticweb.owlapi.model.OntologyConfigurator owl) -
lockProperty
Makes the given property-keysprohibited for modification. An attempt to modify the value for a locked property will causeOntApiException.ModificationDenied.- Parameters:
keys-ArrayofOntSettings-keys to lock- Returns:
OntConfigthis config- Since:
- 2.1.0
-
putAll
Copies configuration from the given config.- Parameters:
from-OntologyConfigurator, the source, can benull- Returns:
OntConfigthis config- Since:
- 1.4.0
-
data
-
store
-
get
-
put
-
putPositive
-
putNonNegative
-
getSpecification
public org.apache.jena.ontapi.OntSpecification getSpecification()An ONT-API manager's load config getter. GetsOntSpecificationconfiguration object.- Specified by:
getSpecificationin interfaceLoadSettings- Returns:
OntSpecification- See Also:
-
setSpecification
public OntConfig setSpecification(org.apache.jena.ontapi.OntSpecification specification, String constantFieldPath) An ONT-API manager's load config setter. SetsOntSpecificationmodel configuration object.- Parameters:
specification-OntPersonalitythe personalityconstantFieldPath-Stringa path to constant for serialization, e.g."org.apache.jena.ontapi.OntSpecification#OWL2_DL_MEM"; ifnullno attempt to serialize this field- Returns:
- this instance
- See Also:
-
getGraphTransformers
An ONT-API manager's load config getter. GetsTransformers Store.Transformers Store is a collection of actions that are performed on
Graphbefore it enters into the main system. One of the goals of this mechanism is a data transformation in accordance with OWL2 specification. AnyRDF Graphcan be presented by the system in the form ofRDF ModelorAxiomatic Model, but without a proper transformation you may not find a validAxioms inside that data. Transformations can be simply disabled through the methodLoadControl.setGraphTransformers(GraphTransformers). It is recommended to do this in case there is confidence that the data is OWL2, since transformations may take significant processor time. With the methodGraphTransformers.setFilter(GraphFilter)a whole graph family may be skipped from the transformation process. And there is one more facility to selectively turn off transformations: the methodOntGraphDocumentSource.withTransforms(), which is used while passing externally loaded graph into the manager (seeOntologyManager.addOntology(Graph)).- Specified by:
getGraphTransformersin interfaceLoadSettings- Returns:
GraphTransformers- See Also:
-
setGraphTransformers
An ONT-API manager's load config setter. SetsGraphTransformers.Storecollection.- Parameters:
transformers-GraphTransformers- Returns:
- this instance
- See Also:
-
getManagerIRIsCacheSize
public int getManagerIRIsCacheSize()An ONT-API manager's load config getter. Returns the IRI cache size, that is used inside a manager to share IRIs between ontologies. The default size is2048, it is a magic number which is taken from OWL-API impl (seeuk.ac.manchester.cs.owl.owlapi.OWLDataFactoryInternalsImpl, v5) A negative or zero number means that IRIs cache is disabled.- Returns:
- int, possible non-positive number to disable whole
IRIs caching - Since:
- 1.4.0
- See Also:
-
setManagerIRIsCacheSize
An ONT-API manager's load config setter. Sets a new IRIs cache size. Protected, since this is a manager's initialization setting, that must not be changed during manager's lifetime.- Parameters:
size- int, possible negative- Returns:
- this instance
-
getLoadNodesCacheSize
public int getLoadNodesCacheSize()An ONT-API manager's load config getter. Returns the maximum size of nodes' cache, which is used as optimization while reading OWLObjects from a graph (seeSearchModel). The system default size is50_000.Each
object factoryhas its own nodes cache with the same size, but, as a rule, only a few factories have many nodes in their cache. AverageNode(uri and blank) size is about 160 bytes (internal string ~ 150byte), Experiments show that for the limit = 100_000, the total number of cached nodes is not more than 190_000 (it is for teleost and galen, significantly less for the rest tested ontologies), The number 190_000 uri or blank nodes means about 30 MB. Here the list of tested ontologies:- teleost(59mb, 336_291 axioms, 650_339 triples)
- hp(38mb, 143_855 axioms, 367_315 triples)
- galen(33mb, 96_463 axioms, 281_492 triples)
- psychology(4mb, 38_872 axioms, 38_873 triples)
- family(0.2mb, 2_845 axioms)
- pizza(0.1mb, 945 axioms)
- Specified by:
getLoadNodesCacheSizein interfaceCacheSettings- Returns:
- int
- See Also:
-
setLoadNodesCacheSize
An ONT-API manager's load config setter. Sets a new maximum nodes cache size to the specified positive number or disables nodes caching at all in case of non-positive number.- Parameters:
size- int- Returns:
- this instance
-
getLoadObjectsCacheSize
public int getLoadObjectsCacheSize()An ONT-API manager's load config getter. Returns the maximum size of objects factory cache, which is used as optimization while reading OWLObjects from a graph (seeCacheObjectFactory). The system default size is2048. This is a magic number from OWL-API impl, which has also similar caches.- Specified by:
getLoadObjectsCacheSizein interfaceCacheSettings- Returns:
- int
- See Also:
-
setLoadObjectsCacheSize
An ONT-API manager's load config setter. Sets a new maximum objects cache size to the specified positive number or disables objects caching at all in case of non-positive number.- Parameters:
size- int- Returns:
- this instance
-
getModelCacheLevel
public int getModelCacheLevel()An ONT-API manager's load config getter. Returns the model content cache level. Currently, there are the following possible levels:CacheSettings.CACHE_ITERATOR- use cache-optimization to speed up iteration over the content (axioms/ontology annotations) and components (entities/anonymous individuals) found in a graphCacheSettings.CACHE_COMPONENT- use cache-optimization to optimize iteration over components found in a graphCacheSettings.CACHE_CONTENT- use cache-optimization to optimize iteration over content and its modificationCacheSettings.CACHE_ALL- all possible cache-optimizations
- Specified by:
getModelCacheLevelin interfaceCacheSettings- Returns:
- boolean
- See Also:
-
setModelCacheLevel
An ONT-API manager's load config setter. Sets the model content cache level to the specified integer value. The number0means disabling all model's caches.The content cache consists of several levels:
- Parameters:
level- int- Returns:
- this instance
- See Also:
-
getSupportedSchemes
An ONT-API manager's load config getter. Answers aCollectionof allowedLoadSettings.Scheme-controllers. This mechanism is used during preliminary analysis ofIRIbefore loading a document. If anIRIfails any of theLoadSettings.Scheme-tests from theCollection, the document source is rejected and the system throws an exception. Note: there is also possible to prohibit the processing of only one IRI (seeaddIgnoredImport(IRI)andOntLoaderConfiguration.addIgnoredImport(IRI)) or all imports (seeLoadControl.setProcessImports(boolean)).- Specified by:
getSupportedSchemesin interfaceLoadSettings- Returns:
- unmodifiable
Collectionof supportedschemas - See Also:
-
setSupportedSchemes
An ONT-API manager's load config setter. Sets a new collection ofLoadSettings.Scheme-controllers.- Parameters:
schemes- List ofLoadSettings.Scheme- Returns:
OntConfigthis instance- See Also:
-
disableWebAccess
An ONT-API manager's load config setter. Disables all schemes with except offileto prevent internet diving. While loading only IRIs starting withfilewill be processed.- Returns:
- this manager
- Since:
- 1.1.0
- See Also:
-
isPerformTransformation
public boolean isPerformTransformation()An ONT-API manager's load config getter. Answerstrueif the mechanism of graph transformers is enabled, which istrueby default. If it is enabled, the process of any document RDF source will begin with the graph transformers, otherwise a raw graph will be loaded as it is. In the last case, the final ontology may not contain OWL2 data (with except of Ontology ID). If you pretty sure that you are loading OWL2 ontology, it might make sense to disable transformers using the methodLoadControl.setPerformTransformation(boolean), since graph transformers require an additional processor time. For more info see the description for theLoadSettings.getGraphTransformers()method.- Specified by:
isPerformTransformationin interfaceLoadSettings- Returns:
- boolean, (
trueby default) - See Also:
-
setPerformTransformation
An ONT-API manager's load config setter. Disables or enables the Graph Transformation mechanism depending on the given flag.- Parameters:
b-trueto enable transformation (by default it is enabled)- Returns:
OntConfigthis instance- See Also:
-
isProcessImports
public boolean isProcessImports()An ONT-API manager's load config getter. Answerstrueif the imports' processing is enabled. In this case the document source loading entailsowl:importsprocessing and subsequent loading all related to them sources. If the imports' processing is disabled, then no additional work is performed and one document source is matched with one ontology. Note: there is also possible to prohibit the processing of one IRI (seeaddIgnoredImport(IRI)andOntLoaderConfiguration.addIgnoredImport(IRI)) or whole scheme (seeLoadControl.setSupportedSchemes(List)).- Specified by:
isProcessImportsin interfaceLoadSettings- Returns:
- boolean, (
trueby default) - See Also:
-
setProcessImports
An ONT-API manager's load config setter. Disables or enables the processing imports depending on the given flag. -
isAllowBulkAnnotationAssertions
public boolean isAllowBulkAnnotationAssertions()An ONT-API manager's load config getter. Answers whether the bulk annotations is allowed in declaration axioms or annotations should go separately as annotation assertion axioms. More specifically, this optional setting stands to manage behaviour of annotation assertions in conjunction with declarations: depending on this parameter bulk annotations fall either into declaration or annotation assertion. Consider the following RDF example:
In case this option is turned on, the RDF slice above corresponds to the following list of axioms:<C> a owl:Class ; rdfs:comment "plain assertion" ; rdfs:label "bulk assertion" . [ a owl:Axiom ; rdfs:comment "the child" ; owl:annotatedProperty rdfs:label ; owl:annotatedSource <C> ; owl:annotatedTarget "bulk assertion" ] .AnnotationAssertion(rdfs:comment <C> "plain assertion"^^xsd:string)AnnotationAssertion(Annotation(rdfs:comment "the child"^^xsd:string) rdfs:label <C> "bulk assertion"^^xsd:string)Declaration(Class(<C>))
Declaration(Annotation(Annotation(rdfs:comment "the child"^^xsd:string) rdfs:label "bulk assertion"^^xsd:string) Class(<C>))AnnotationAssertion(rdfs:comment <C> "plain assertion"^^xsd:string)
Manchester OWL-API Parserdoes NOT seem to work correctly in the second case (checked version: 5.1.4) - the loss of annotations is expected in case of reload ontology in manchester syntax. By default, annotated annotation assertions are allowed (the method answerstrue).- Specified by:
isAllowBulkAnnotationAssertionsin interfaceAxiomsSettings- Returns:
trueif bulk annotations are allowed (that is by default)- See Also:
-
setAllowBulkAnnotationAssertions
An ONT-API manager's load config setter. Sets bulk annotation assertions option to the specified state.- Parameters:
b-trueto enable bulk annotations- Returns:
- this instance
- See Also:
-
isAllowReadDeclarations
public boolean isAllowReadDeclarations()An ONT-API manager's load config getter. Answers whether the declaration axioms should be listed. This method is invited to match OWL-API behaviour. Some native OWL-API parsers skips declarations on loading. Using this option you can uniform global behaviour by discarding declarations in live ontology. The default value of this option istrue.- Specified by:
isAllowReadDeclarationsin interfaceAxiomsSettings- Returns:
trueif declarations are enabled (default)- See Also:
-
setAllowReadDeclarations
An ONT-API manager's load config setter. Sets the read declarations option to the desired state.- Parameters:
b- boolean enable/disable declarations- Returns:
- this instance
- See Also:
-
isIgnoreAnnotationAxiomOverlaps
public boolean isIgnoreAnnotationAxiomOverlaps()An ONT-API manager's load config getter. Answers whether the Range, Domain and SubClassOf axioms should be separated in case there is a 'punning' in annotation property with the other property (data or object). More specifically, the option determines the behavior while reading annotation axioms in case of a punning entity as subject in the root statement. There are three types of annotation axioms with following defining statements:Ai rdfs:subPropertyOf AjA rdfs:domain UA rdfs:range U
Ais also an object property (P) or data property (R) then, in case this option is turned on, the statements above define also corresponded object or data property axioms. Otherwise, (if the option is turned off), the annotation axioms of above type are ignored in favour of object or data property axioms.Please note:
OntPersonality.Punningsis the general mechanism to control punnings. It is accessible through the config methodsgetSpecification()andOntLoaderConfiguration.getSpecification().The default value of this option is
true.- Specified by:
isIgnoreAnnotationAxiomOverlapsin interfaceAxiomsSettings- Returns:
trueif annotation axiom overlaps are ignored (default)- See Also:
-
setIgnoreAnnotationAxiomOverlaps
An ONT-API manager's load config setter. Sets ignore annotation axioms overlaps option to the specified state.- Parameters:
b- boolean to enable/disable this config parameter- Returns:
- this instance
- See Also:
-
isUseOWLParsersToLoad
public boolean isUseOWLParsersToLoad()An ONT-API manager's load config getter. Answerstrueif the native OWL-API parsers must be preferred while loading ontology, which is strongly not recommended (and the method returnsfalseby default).The method is used by the
Ontology Factorydefault implementation to choose the preferable way to load. If this parameter is set tofalsethen ONT-API (i.e., Apache Jena) loading mechanisms are used in case the document format is supported both by Jena and OWL-API (like Turtle, RDF/XML, etc. SeeOntFormat). Otherwise, loading is always performed using only the native OWL-API Parsers, which, actually, do not read RDF graph fully, but rather assemble it axiom by axiom. Remember, the OWL-API loading mechanisms (as well as OWL-API default impl) are OWL-centric. As a result, in fact, they work buggy in many cases (e.g., when data is not produced by OWL-API itself). A dataGraphmay not present correct OWL2, but be rather RDFS, or whatever else. For example, SPIN ontology contains a lot of SPARQL queries in a special spin form, that is using customrdf:Lists (an example of such []-list is the right part of any triple with predicatesp:where). After loading such an ontology with the help of OWL Turtle Parser (checked v 5.1.4), it will contain garbage instead of the original constructs. With the default ONT-API loading mechanism you getGraphas it is, but with, maybe, several controlled changes caused by the transformers (seeLoadSettings.getGraphTransformers()). So please do not change the default value without a good reason- Specified by:
isUseOWLParsersToLoadin interfaceLoadSettings- Returns:
- boolean, (
falseby default) - See Also:
-
setUseOWLParsersToLoad
An ONT-API manager's load config setter. Changes the preferable way to load aGraph. Iftruespecified, the OWL-API native parsers will be used. Though, it is not recommended, for more details see thegetterdescription.- Parameters:
b- boolean to enable/disable this config parameter- Returns:
- this instance
-
isUseDistinctUnionGraph
public boolean isUseDistinctUnionGraph()An ONT-API manager's load config getter. Answerstrueif union graph must be distinct. A non-distinct graph does not prevent data duplication when querying (see generic query methodGraph.find(Node, Node, Node)). The data duplication may happen if a subgraph contains the same triples as the base graph. Note that distinct graphs require additional memory. A non-distinct graphs, for example, can be used when axioms/content cache is disabled to list raw/inferred entities and axioms.- Specified by:
isUseDistinctUnionGraphin interfaceLoadSettings- Returns:
trueif underlying graph must be distinct- See Also:
-
setUseDistinctUnionGraph
An ONT-API manager's load config setter. Disables or enables the behavior ofUnionGraph: if the parameter istrue, the graph is distinct, meaning there will be no duplicates in the query data.- Parameters:
b- boolean to enable/ disable this config parameter- Returns:
- this instance
-
isIgnoreAxiomsReadErrors
public boolean isIgnoreAxiomsReadErrors()An ONT-API manager's load config getter. Answers whether errors that arise when parsing axioms from a graph should be ignored. More specifically, it manages handling exceptions in case unable to read axioms of some type from a graph. If specified all errors would be silently ignored. AN RDF recursion (i.e.<A> rdfs:subClassOf <A>) is an example of such buggy situation. The default value of this option isfalse.- Specified by:
isIgnoreAxiomsReadErrorsin interfaceAxiomsSettings- Returns:
trueif any errors while reading axioms are ignored (by default it isfalse)- Since:
- 1.1.0
- See Also:
-
isReadONTObjects
public boolean isReadONTObjects()An ONT-API manager's load config getter. Answers whether theOntologyread methods should returnONTObjects. Iftrue, than every method that providesOWLObjectsin any form, will actually return correspondingONTObjectimplementation, otherwise, it will return a plainOWLObject. AnONTObjecthas an RDF-graph reference inside, and, therefore, allOWLObject-related RDF triples can be retrieved from it. A plainOWLObjectis detached from parent ontology, it can be stored somewhere separately without dangerous of memory leak. The default value of this option isfalse.- Specified by:
isReadONTObjectsin interfaceAxiomsSettings- Returns:
trueifONTObjects should be returned byOntologygetters- Since:
- 3.3.0
- See Also:
-
setIgnoreAxiomsReadErrors
An ONT-API manager's load config setter. Sets the ignore read errors option to the desired state.- Parameters:
b- boolean to enable/disable ignoring axioms reading errors- Returns:
- this instance
- Since:
- 1.1.0
- See Also:
-
setReadONTObjects
An ONT-API manager's load config setter. Sets the read-ont-objects flag to the desired state.- Parameters:
b- boolean to enable/disableONTObjectreading- Returns:
- this instance
- Since:
- 3.3.0
- See Also:
-
isSplitAxiomAnnotations
public boolean isSplitAxiomAnnotations()An ONT-API manager's load config getter. Answers whether the different bulk annotations for the same axiom should go as different axioms. If this optional parameter is set totrue, each bulk annotation RDF resource will generate a separated axiom. Otherwise, all bulk-annotations RDF resources with the same main statement in axiomatic view go together as a part of a single axiom that corresponds the main triple. Consider the following ontology snippet:
If<A> a owl:Class ; rdfs:subClassOf owl:Thing . [ a owl:Axiom ; rdfs:comment "X" ; rdfs:label "Z" ; owl:annotatedProperty rdfs:subClassOf ; owl:annotatedSource <A> ; owl:annotatedTarget owl:Thing ] . [ a owl:Axiom ; rdfs:comment "W" ; owl:annotatedProperty rdfs:subClassOf ; owl:annotatedSource <A> ; owl:annotatedTarget owl:Thing ] .isSplitAxiomAnnotations()equalstruethen the ontology above gives the following two axioms:
IfSubClassOf(Annotation(rdfs:comment "W"^^xsd:string) <A> owl:Thing) SubClassOf(Annotation(rdfs:comment "X"^^xsd:string) Annotation(rdfs:label "Z"^^xsd:string) <A> owl:Thing)isSplitAxiomAnnotations()equalsfalse, then there is only singleSubClassOfaxiom:
The default value of this option isSubClassOf(Annotation(rdfs:comment "W"^^xsd:string) Annotation(rdfs:comment "X"^^xsd:string) Annotation(rdfs:label "Z"^^xsd:string) <string:A> owl:Thing)false.- Specified by:
isSplitAxiomAnnotationsin interfaceAxiomsSettings- Returns:
- boolean
- See Also:
-
setSplitAxiomAnnotations
An ONT-API manager's load config setter. Sets the axiom-annotations-split option setting to the desired state.- Parameters:
b- boolean- Returns:
- this instance
- Since:
- 1.3.0
- See Also:
-
isControlImports
public boolean isControlImports()An ONT-API manager's write config getter. By default 'ont.api.write.conf.control.imports' is disabled.- Returns:
trueif 'ont.api.write.conf.control.imports' is enabled- See Also:
-
setControlImports
An ONT-API manager's write config setter.- Parameters:
b- boolean to enable/disable this config parameter- Returns:
- this instance
- See Also:
-
shouldLoadAnnotations
public boolean shouldLoadAnnotations()The same asisLoadAnnotationAxioms()- Overrides:
shouldLoadAnnotationsin classorg.semanticweb.owlapi.model.OntologyConfigurator- Returns:
- boolean
- See Also:
-
isLoadAnnotationAxioms
public boolean isLoadAnnotationAxioms()OWL-API(NEW) manager load config getter. Answers whether annotation axioms (instances ofOWLAnnotationAxiom) should be retrieved from theGraph. IffalsethenAnnotation Property Domain,Annotation Property Range,Annotation Property AssertionandSubAnnotationPropertyOfOWL Axioms are ignored. It is native OWL-API option, in OWL-API-impl it controls axioms loading from a source, while in ONT-API it is a graph reading option, which can be turned on or off without any actual changing underlying data. By default, the reading (loading) of annotation axioms is enabled (i.e. the method returnstrue).Note: the behaviour is slightly different from OWL-API (checked version: 5.1.4): if read annotation axioms is disabled, all
Annotation Property Assertionaxioms turn into OWL Annotations in the composition of the nearest declaration axioms. For example, consider the snippet:
If this option is off, there above RDF corresponds to the axiom<C> rdf:type owl:Class ; rdfs:comment "comment1"@ex .Declaration(Annotation(rdfs:comment "comment1"@es) Class(<C>))in ONT-API structural view, while in OWL-API it would be just naked declaration (i.e.Declaration(Class(<C>))).- Specified by:
isLoadAnnotationAxiomsin interfaceAxiomsSettings- Returns:
- boolean
- See Also:
-
setLoadAnnotationAxioms
An ONT-API manager's load config setter.- Overrides:
setLoadAnnotationAxiomsin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
withEntityExpansionLimit
OWL-API(NEW) manager load config setter. This is NOT override method: there is NO such method in the original general OWL-API config (OntologyConfigurator), but it present in load-config.- Parameters:
s- String- Returns:
- this instance
- See Also:
-
getEntityExpansionLimit
OWL-API(NEW) manager load config getter. This is NOT override method: there is NO such method in the original general OWL-API config (OntologyConfigurator), but it present in load-config.- Returns:
- String, for more info see:
- See Also:
-
withBannedParsers
- Overrides:
withBannedParsersin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
getBannedParsers
- Overrides:
getBannedParsersin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
getPriorityCollectionSorting
public org.semanticweb.owlapi.model.PriorityCollectionSorting getPriorityCollectionSorting()- Overrides:
getPriorityCollectionSortingin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
setPriorityCollectionSorting
public OntConfig setPriorityCollectionSorting(@Nonnull org.semanticweb.owlapi.model.PriorityCollectionSorting sorting) - Overrides:
setPriorityCollectionSortingin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
getIgnoredImports
-
putIgnoredImports
-
addIgnoredImport
- Overrides:
addIgnoredImportin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
clearIgnoredImports
- Overrides:
clearIgnoredImportsin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
removeIgnoredImport
- Overrides:
removeIgnoredImportin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
setAcceptingHTTPCompression
- Overrides:
setAcceptingHTTPCompressionin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
shouldAcceptHTTPCompression
public boolean shouldAcceptHTTPCompression()- Overrides:
shouldAcceptHTTPCompressionin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
getConnectionTimeout
public int getConnectionTimeout()- Overrides:
getConnectionTimeoutin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
setConnectionTimeout
- Overrides:
setConnectionTimeoutin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
setFollowRedirects
- Overrides:
setFollowRedirectsin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
shouldFollowRedirects
public boolean shouldFollowRedirects()- Overrides:
shouldFollowRedirectsin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
getMissingImportHandlingStrategy
public org.semanticweb.owlapi.model.MissingImportHandlingStrategy getMissingImportHandlingStrategy()- Overrides:
getMissingImportHandlingStrategyin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
setMissingImportHandlingStrategy
public OntConfig setMissingImportHandlingStrategy(@Nonnull org.semanticweb.owlapi.model.MissingImportHandlingStrategy strategy) - Overrides:
setMissingImportHandlingStrategyin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
getMissingOntologyHeaderStrategy
public org.semanticweb.owlapi.model.MissingOntologyHeaderStrategy getMissingOntologyHeaderStrategy()- Overrides:
getMissingOntologyHeaderStrategyin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
setMissingOntologyHeaderStrategy
public OntConfig setMissingOntologyHeaderStrategy(@Nonnull org.semanticweb.owlapi.model.MissingOntologyHeaderStrategy strategy) - Overrides:
setMissingOntologyHeaderStrategyin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
setReportStackTraces
- Overrides:
setReportStackTracesin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
shouldReportStackTraces
public boolean shouldReportStackTraces()- Overrides:
shouldReportStackTracesin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
getRetriesToAttempt
public int getRetriesToAttempt()- Overrides:
getRetriesToAttemptin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
setRetriesToAttempt
- Overrides:
setRetriesToAttemptin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
setStrict
- Overrides:
setStrictin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
shouldParseWithStrictConfiguration
public boolean shouldParseWithStrictConfiguration()- Overrides:
shouldParseWithStrictConfigurationin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
setTreatDublinCoreAsBuiltIn
- Overrides:
setTreatDublinCoreAsBuiltInin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
shouldTreatDublinCoreAsBuiltin
public boolean shouldTreatDublinCoreAsBuiltin()- Overrides:
shouldTreatDublinCoreAsBuiltinin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
withSaveIdsForAllAnonymousIndividuals
- Overrides:
withSaveIdsForAllAnonymousIndividualsin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
shouldSaveIds
public boolean shouldSaveIds()- Overrides:
shouldSaveIdsin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
withRemapAllAnonymousIndividualsIds
- Overrides:
withRemapAllAnonymousIndividualsIdsin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
shouldRemapIds
public boolean shouldRemapIds()- Overrides:
shouldRemapIdsin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
withUseNamespaceEntities
- Overrides:
withUseNamespaceEntitiesin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
shouldUseNamespaceEntities
public boolean shouldUseNamespaceEntities()- Overrides:
shouldUseNamespaceEntitiesin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
withIndenting
- Overrides:
withIndentingin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
shouldIndent
public boolean shouldIndent()- Overrides:
shouldIndentin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
withIndentSize
- Overrides:
withIndentSizein classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
getIndentSize
public int getIndentSize()- Overrides:
getIndentSizein classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
withLabelsAsBanner
- Overrides:
withLabelsAsBannerin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
shouldUseLabelsAsBanner
public boolean shouldUseLabelsAsBanner()- Overrides:
shouldUseLabelsAsBannerin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
withBannersEnabled
- Overrides:
withBannersEnabledin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
shouldUseBanners
public boolean shouldUseBanners()- Overrides:
shouldUseBannersin classorg.semanticweb.owlapi.model.OntologyConfigurator- See Also:
-
shouldRepairIllegalPunnings
public boolean shouldRepairIllegalPunnings()Always returnstruesince this functionality is not supported by ONT-API.- Overrides:
shouldRepairIllegalPunningsin classorg.semanticweb.owlapi.model.OntologyConfigurator- Returns:
true- Since:
- OWL-API 5.1.1, ONT-API 1.3.0
-
withRepairIllegalPunnings
No-op since this functionality is not supported by ONT-API.- Overrides:
withRepairIllegalPunningsin classorg.semanticweb.owlapi.model.OntologyConfigurator- Parameters:
b- anything- Returns:
- this instance
- Since:
- OWL-API 5.1.1, ONT-API 1.3.0
-
buildLoaderConfiguration
Builds new loader configuration.- Overrides:
buildLoaderConfigurationin classorg.semanticweb.owlapi.model.OntologyConfigurator- Returns:
- new
OntLoaderConfiguration - See Also:
-
buildWriterConfiguration
Builds new writer configuration.- Overrides:
buildWriterConfigurationin classorg.semanticweb.owlapi.model.OntologyConfigurator- Returns:
- new
OntWriterConfiguration - See Also:
-
equals
-
hashCode
public int hashCode() -
asMap
-
setSpecification
SetsOntSpecificationmodel configuration object.- Parameters:
specification-OntSpecification, notnull- Returns:
LoadControl(this or copied instance)- See Also:
-
setModelCacheLevel
Turns on/off the content cache use. Other cache settings are untouched, which means if there is a component cache enabled, it will remain enabled (if existent constant do not equal to the given one).- Parameters:
constant- a non-negative int numberb-trueto turn on,falseto turn off- Returns:
CacheControl- See Also:
-