public boolean isEntailed(OWLAxiom axiom) { checkPreConditions(axiom); if (!isConsistent()) return true; EntailmentChecker checker=new EntailmentChecker(this,getDataFactory()); return checker.entails(axiom); } public boolean isEntailed(Set<? extends OWLAxiom> axioms) {
/** * @param file file to load from * @throws IOException if an error occurs reading the file */ public void loadIndividualReuseStrategyReuseAlways(File file) throws IOException { Set<AtomicConcept> concepts=loadConceptsFromFile(file); setIndividualReuseStrategyReuseAlways(concepts); } protected void setIndividualReuseStrategyReuseNever(Set<? extends AtomicConcept> concepts) {
@Override public String toString(Prefixes ns) { return ns.abbreviateIRI(m_name); } @Override
protected void checkPreConditions(OWLObject... objects) { flushChangesIfRequired(); if (objects!=null && objects.length>0) throwFreshEntityExceptionIfNecessary(objects); throwInconsistentOntologyExceptionIfNecessary(); } protected void flushChangesIfRequired() {
/** * Instantiates a {@link OwlApiClassifier} from the specified parameters. * * @param ontology the ontology */ public OwlApiClassifier(OWLOntology ontology) { reasoner = new Reasoner.ReasonerFactory().createReasoner(ontology); this.ontology = ontology; }
/** * Creates a new reasoner object with standard parameters for blocking, expansion strategy etc. Then the given manager is used to find all required imports for the given ontology and the ontology with the imports is loaded into the reasoner and the data factory of the manager is used to create fresh concepts during the preprocessing phase if necessary. * * @param rootOntology * - the ontology that should be loaded by the reasoner */ public Reasoner(OWLOntology rootOntology) { this(new Configuration(),rootOntology,(Set<DescriptionGraph>)null); }
public Node<OWLClass> getEquivalentClasses(OWLClassExpression classExpression) { HierarchyNode<AtomicConcept> node=getHierarchyNode(classExpression); return atomicConceptHierarchyNodeToNode(node); } public NodeSet<OWLClass> getSuperClasses(OWLClassExpression classExpression,boolean direct) {
public boolean declarePrefix(String prefixName,String prefixIRI) { boolean containsPrefix=declarePrefixRaw(prefixName,prefixIRI); buildPrefixIRIMatchingPattern(); return containsPrefix; } protected boolean declarePrefixRaw(String prefixName,String prefixIRI) {
@Override public Node<OWLDataProperty> getEquivalentDataProperties(OWLDataProperty property) { return dataPropertyHierarchyNodeToNode(getHierarchyNode(property)); } @Override
@Override public Node<OWLObjectPropertyExpression> getEquivalentObjectProperties(OWLObjectPropertyExpression propertyExpression) { return objectPropertyHierarchyNodeToNode(getHierarchyNode(propertyExpression)); } @Override
@Override protected void finalize() { dispose(); } @Override
@Override public OWLReasoner createReasoner(OWLOntology ontology) { return createReasoner(ontology,getProtegeConfiguration(null)); } @Override
/** * @param defaultPrefixIRI defaultPrefixIRI * @return true if modification happened */ public boolean declareDefaultPrefix(String defaultPrefixIRI) { return declarePrefix(":",defaultPrefixIRI); } /**
@Override public boolean isEntailed(OWLAxiom axiom) { checkPreConditions(axiom); if (!isConsistent()) return true; EntailmentChecker checker=new EntailmentChecker(this,getDataFactory()); return checker.entails(axiom); } @Override
protected void checkPreConditions(OWLObject... objects) { flushChangesIfRequired(); if (objects!=null && objects.length>0) throwFreshEntityExceptionIfNecessary(objects); throwInconsistentOntologyExceptionIfNecessary(); } protected void flushChangesIfRequired() {
@Override public Node<OWLClass> getEquivalentClasses(OWLClassExpression classExpression) { HierarchyNode<AtomicConcept> node=getHierarchyNode(classExpression); return atomicConceptHierarchyNodeToNode(node); } @Override
/** * @param prefixName prefixName * @param prefixIRI prefixIRI * @return true if modification happened */ public boolean declarePrefix(String prefixName,String prefixIRI) { boolean containsPrefix=declarePrefixRaw(prefixName,prefixIRI); buildPrefixIRIMatchingPattern(); return containsPrefix; } protected boolean declarePrefixRaw(String prefixName,String prefixIRI) {
@Override public String toString(Prefixes prefixes) { return prefixes.abbreviateIRI(m_iri); } protected Object readResolve() {
@Override public String toString(Prefixes prefixes) { return prefixes.abbreviateIRI(m_iri); } protected Object readResolve() {
@Override public String toString(Prefixes prefixes) { return prefixes.abbreviateIRI(m_iri); } protected Object readResolve() {