Exemplo n.º 1
0
 @Override
 public void visit(OWLDataPropertyRangeAxiom axiom) {
   axiom.getProperty().accept(this);
   OWLDataPropertyExpression prop = (OWLDataPropertyExpression) obj;
   axiom.getRange().accept(this);
   OWLDataRange range = (OWLDataRange) obj;
   obj = dataFactory.getOWLDataPropertyRangeAxiom(prop, range, duplicateAxiomAnnotations(axiom));
 }
Exemplo n.º 2
0
 @Override
 public void visit(OWLDataPropertyRangeAxiom axiom) {
   write(TOP);
   writeSpace();
   write(SUBCLASS);
   writeSpace();
   df.getOWLDataAllValuesFrom(axiom.getProperty(), axiom.getRange()).accept(this);
 }
 public Set<OWLAxiom> write(OWLDataProperty property) {
   Set<OWLAxiom> axioms = new HashSet<OWLAxiom>();
   axioms.addAll(writeEntityStart(DATA_PROPERTY, property));
   if (!isFiltered(AxiomType.FUNCTIONAL_DATA_PROPERTY)) {
     for (OWLOntology ontology : getOntologies()) {
       SectionMap characteristics = new SectionMap();
       for (OWLAxiom ax : ontology.getFunctionalDataPropertyAxioms(property)) {
         if (isDisplayed(ax)) {
           characteristics.add(FUNCTIONAL.toString(), ax);
           axioms.add(ax);
         }
       }
       writeSection(CHARACTERISTICS, characteristics, ",", true, ontology);
     }
   }
   if (!isFiltered(AxiomType.DATA_PROPERTY_DOMAIN)) {
     for (OWLOntology ontology : getOntologies()) {
       SectionMap domains = new SectionMap();
       for (OWLDataPropertyDomainAxiom ax : ontology.getDataPropertyDomainAxioms(property)) {
         if (isDisplayed(ax)) {
           domains.add(ax.getDomain(), ax);
           axioms.add(ax);
         }
       }
       writeSection(DOMAIN, domains, ",", true, ontology);
     }
   }
   if (!isFiltered(AxiomType.DATA_PROPERTY_RANGE)) {
     for (OWLOntology ontology : getOntologies()) {
       SectionMap ranges = new SectionMap();
       for (OWLDataPropertyRangeAxiom ax : ontology.getDataPropertyRangeAxioms(property)) {
         if (isDisplayed(ax)) {
           ranges.add(ax.getRange(), ax);
           axioms.add(ax);
         }
       }
       writeSection(RANGE, ranges, ",", true, ontology);
     }
   }
   if (!isFiltered(AxiomType.SUB_DATA_PROPERTY)) {
     for (OWLOntology ontology : getOntologies()) {
       SectionMap supers = new SectionMap();
       for (OWLSubDataPropertyOfAxiom ax :
           ontology.getDataSubPropertyAxiomsForSubProperty(property)) {
         if (isDisplayed(ax)) {
           supers.add(ax.getSuperProperty(), ax);
           axioms.add(ax);
         }
       }
       writeSection(SUB_PROPERTY_OF, supers, ",", true, ontology);
     }
   }
   if (!isFiltered(AxiomType.EQUIVALENT_DATA_PROPERTIES)) {
     for (OWLOntology ontology : getOntologies()) {
       SectionMap props = new SectionMap();
       for (OWLEquivalentDataPropertiesAxiom ax :
           ontology.getEquivalentDataPropertiesAxioms(property)) {
         if (isDisplayed(ax) && ax.getProperties().size() == 2) {
           props.add(ax.getPropertiesMinus(property).iterator().next(), ax);
           axioms.add(ax);
         }
       }
       writeSection(EQUIVALENT_TO, props, ",", true, ontology);
     }
   }
   if (!isFiltered(AxiomType.DISJOINT_DATA_PROPERTIES)) {
     for (OWLOntology ontology : getOntologies()) {
       SectionMap props = new SectionMap();
       for (OWLDisjointDataPropertiesAxiom ax :
           ontology.getDisjointDataPropertiesAxioms(property)) {
         if (ax.getProperties().size() == 2 && isDisplayed(ax)) {
           props.add(ax.getPropertiesMinus(property).iterator().next(), ax);
           axioms.add(ax);
         }
       }
       props.remove(property);
       writeSection(DISJOINT_WITH, props, ",", true, ontology);
     }
   }
   if (!isFiltered(AxiomType.SWRL_RULE)) {
     for (OWLOntology ontology : getOntologies()) {
       Set<OWLAxiom> rules = new HashSet<OWLAxiom>();
       for (SWRLRule rule : ontology.getAxioms(AxiomType.SWRL_RULE)) {
         if (isDisplayed(rule)) {
           for (SWRLAtom atom : rule.getHead()) {
             if (atom.getPredicate().equals(property)) {
               writeSection(RULE, rules, "", true, ontology);
               break;
             }
           }
         }
       }
     }
   }
   writeEntitySectionEnd(DATA_PROPERTY.toString());
   return axioms;
 }
 @Override
 public void visit(OWLDataPropertyRangeAxiom axiom) {
   result =
       factory.getOWLDataSomeValuesFrom(
           axiom.getProperty(), factory.getOWLDataComplementOf(axiom.getRange()));
 }
 @Override
 public void visit(OWLDataPropertyRangeAxiom axiom) {
   handleObject(axiom);
   axiom.getRange().accept(this);
   axiom.getProperty().accept(this);
 }
Exemplo n.º 6
0
 @Override
 public void visit(OWLDataPropertyRangeAxiom axiom) {
   constructs.add(AL);
   constructs.add(D);
   axiom.getProperty().accept(this);
 }
 public void visit(OWLDataPropertyRangeAxiom axiom) {
   type = AXIOM_TYPE_INDEX_BASE + axiom.getAxiomType().getIndex();
 }
 public void visit(OWLDataPropertyRangeAxiom axiom) {
   axiom.getProperty().accept(this);
   axiom.getRange().accept(this);
   processAxiomAnnotations(axiom);
 }