コード例 #1
0
  public Map<String, OWLIndividual> returnSitesInOntology() {
    // map that contains the correspondance between the names of the sites
    // and their OWLIndividual representations.
    Map<String, OWLIndividual> returnMap = new HashMap<>();
    List<OWLIndividual> returnList = new ArrayList<>();
    OWLAnnotationProperty hasNameAnnotationProperty =
        OWLFactory.getOWLAnnotationProperty(":individualName", topIxPrefixManager);

    OWLClassExpression tempSiteClassExpression =
        OWLFactory.getOWLClass(":Site", topIxPrefixManager);
    for (OWLClassAssertionAxiom tempClassAssAx :
        topIxOnt.getClassAssertionAxioms(tempSiteClassExpression)) {
      returnList.add(tempClassAssAx.getIndividual());

      Set<OWLAnnotationAssertionAxiom> tempSiteAnnotationsSet =
          topIxOnt.getAnnotationAssertionAxioms(
              tempClassAssAx.getIndividual().asOWLNamedIndividual().getIRI());
      for (OWLAnnotationAssertionAxiom tempAnnotationAssertionAxiom : tempSiteAnnotationsSet) {
        if (tempAnnotationAssertionAxiom.getProperty().equals(hasNameAnnotationProperty)) {
          String tempString = tempAnnotationAssertionAxiom.getValue().toString();
          logger.info(tempString);
          tempString =
              tempString.substring(tempString.indexOf('"') + 1, tempString.indexOf('^') - 1);
          logger.info(tempString);
          logger.info(tempClassAssAx.getIndividual().toString());
          returnMap.put(tempString, tempClassAssAx.getIndividual());
        }
      }
    }
    return returnMap;
  }
コード例 #2
0
 @Override
 public void visit(OWLClassAssertionAxiom axiom) {
   axiom.getIndividual().accept(this);
   OWLIndividual ind = (OWLIndividual) obj;
   axiom.getClassExpression().accept(this);
   OWLClassExpression type = (OWLClassExpression) obj;
   obj = dataFactory.getOWLClassAssertionAxiom(type, ind, duplicateAxiomAnnotations(axiom));
 }
コード例 #3
0
 @Override
 public void visit(OWLClassAssertionAxiom axiom) {
   axiom.getIndividual().accept(this);
   writeSpace();
   write(":");
   writeSpace();
   axiom.getClassExpression().accept(this);
 }
コード例 #4
0
 public Boolean visit(OWLClassAssertionAxiom axiom) {
   return !axiom.getClassExpression().isAnonymous();
 }
コード例 #5
0
 public void visit(OWLClassAssertionAxiom axiom) {
   type = AXIOM_TYPE_INDEX_BASE + axiom.getAxiomType().getIndex();
 }
 public void visit(OWLClassAssertionAxiom axiom) {
   axiom.getClassExpression().accept(this);
   processAxiomAnnotations(axiom);
 }
コード例 #7
0
 public void visit(OWLClassAssertionAxiom axiom) {
   addChildParent(axiom.getIndividual(), axiom.getClassExpression(), axiom);
   axiom.getClassExpression().accept(this);
 }