public OWLAnnotation getCurrentAnnotation() { return walker.getAnnotation(); }
public OWLAxiom getCurrentAxiom() { return walker.getAxiom(); }
public OWLOntology getCurrentOntology() { return walker.getOntology(); }
public OWLProfileReport checkOntology(OWLOntology ontology) { this.ont = ontology; OWL2DLProfile profile = new OWL2DLProfile(); OWLProfileReport report = profile.checkOntology(ontology); Set<OWLProfileViolation> violations = new HashSet<OWLProfileViolation>(); violations.addAll(report.getViolations()); OWLOntologyWalker ontologyWalker = new OWLOntologyWalker(ontology.getImportsClosure()); OWL2ELProfileObjectVisitor visitor = new OWL2ELProfileObjectVisitor(ontologyWalker, ontology.getOWLOntologyManager()); ontologyWalker.walkStructure(visitor); violations.addAll(visitor.getProfileViolations()); return new OWLProfileReport(this, violations); }
/** * Checks an ontology and its import closure to see if it is within * this profile. * @param ontology The ontology to be checked. * @param manager A manager which can be used to obtain the imports closure * of the ontology * @return An <code>OWLProfileReport</code> that describes whether or not the * ontology is within this profile. */ public OWLProfileReport checkOntology(OWLOntology ontology) { OWLOntologyWalker walker = new OWLOntologyWalker(ontology.getImportsClosure()); OWL2ProfileObjectWalker visitor = new OWL2ProfileObjectWalker(walker, ontology.getOWLOntologyManager()); walker.walkStructure(visitor); Set<OWLProfileViolation> pv = visitor.getProfileViolations(); return new OWLProfileReport(this, pv); }
/** * Checks an ontology and its import closure to see if it is within * this profile. * @param ontology The ontology to be checked. * @return An <code>OWLProfileReport</code> that describes whether or not the * ontology is within this profile. */ public OWLProfileReport checkOntology(OWLOntology ontology) { OWL2DLProfile profile = new OWL2DLProfile(); OWLProfileReport report = profile.checkOntology(ontology); Set<OWLProfileViolation> violations = new HashSet<OWLProfileViolation>(); violations.addAll(report.getViolations()); OWLOntologyWalker walker = new OWLOntologyWalker(ontology.getImportsClosure()); OWL2QLObjectVisitor visitor = new OWL2QLObjectVisitor(walker); walker.walkStructure(visitor); violations.addAll(visitor.getProfileViolations()); return new OWLProfileReport(this, violations); }
/** * @return current ontology */ public OWLOntology getCurrentOntology() { OWLOntology ontology = walker.getOntology(); if (ontology == null) { throw new OWLRuntimeException( "No current ontology; is the walker being used outside of an ontology visit?"); } return ontology; }
/** * @return annotation */ @Nullable public OWLAnnotation getCurrentAnnotation() { return walker.getAnnotation(); } }
/** * @return current axiom from walker */ @Nullable public OWLAxiom getCurrentAxiom() { return walker.getAxiom(); }
/** * Checks an ontology and its import closure to see if it is within * this profile. * @param ontology The ontology to be checked. * @return An <code>OWLProfileReport</code> that describes whether or not the * ontology is within this profile. */ public OWLProfileReport checkOntology(OWLOntology ontology) { OWL2DLProfile profile = new OWL2DLProfile(); OWLProfileReport report = profile.checkOntology(ontology); Set<OWLProfileViolation> violations = new HashSet<OWLProfileViolation>(); violations.addAll(report.getViolations()); OWLOntologyWalker walker = new OWLOntologyWalker(ontology.getImportsClosure()); OWL2RLObjectVisitor visitor = new OWL2RLObjectVisitor(walker); walker.walkStructure(visitor); violations.addAll(visitor.getProfileViolations()); return new OWLProfileReport(this, violations); }
/** * @return current ontology from walker */ public OWLOntology getCurrentOntology() { OWLOntology ontology = walker.getOntology(); if (ontology == null) { throw new OWLRuntimeException( "No current ontology; is the walker being used outside of an ontology visit?"); } return ontology; }
/** * @return current annotation from walker */ @Nullable public OWLAnnotation getCurrentAnnotation() { return walker.getAnnotation(); } }
/** * @return current axiom */ @Nullable public OWLAxiom getCurrentAxiom() { return walker.getAxiom(); }
/** * Checks an ontology and its import closure to see if it is within * this profile. * @param ontology The ontology to be checked. * @return An <code>OWLProfileReport</code> that describes whether or not the * ontology is within this profile. */ public OWLProfileReport checkOntology(OWLOntology ontology) { OWL2Profile owl2Profile = new OWL2Profile(); OWLProfileReport report = owl2Profile.checkOntology(ontology); Set<OWLProfileViolation> violations = new LinkedHashSet<OWLProfileViolation>(); if(!report.isInProfile()) { //We won't be in the OWL 2 DL Profile then! violations.addAll(report.getViolations()); } OWLOntologyWalker walker = new OWLOntologyWalker(ontology.getImportsClosure()); OWL2DLProfileObjectVisitor visitor = new OWL2DLProfileObjectVisitor(walker, ontology.getOWLOntologyManager()); walker.walkStructure(visitor); violations.addAll(visitor.getProfileViolations()); return new OWLProfileReport(this, violations); }
/** * @return current ontology */ public OWLOntology getCurrentOntology() { OWLOntology ontology = walker.getOntology(); if (ontology == null) { throw new OWLRuntimeException( "No current ontology; is the walker being used outside of an ontology visit?"); } return ontology; }
/** * @return annotation */ @Nullable public OWLAnnotation getCurrentAnnotation() { return walker.getAnnotation(); } }
/** * @return current axiom */ @Nullable public OWLAxiom getCurrentAxiom() { return walker.getAxiom(); }
private void preParsing(OWLOntology ontology, VowlData vowlData, OWLOntologyManager manager) { OWLOntologyWalker walker = new OWLOntologyWalker(ontology.importsClosure().collect(Collectors.toSet())); EntityCreationVisitor ecv = new EntityCreationVisitor(vowlData); walker.walkStructure(ecv); logger.info("WalkStructure Success!"); } catch (Exception e) {
/** * @return current ontology from walker */ public OWLOntology getCurrentOntology() { OWLOntology ontology = walker.getOntology(); if (ontology == null) { throw new OWLRuntimeException( "No current ontology; is the walker being used outside of an ontology visit?"); } return ontology; }
/** * @return current annotation from walker */ @Nullable public OWLAnnotation getCurrentAnnotation() { return walker.getAnnotation(); } }