public void visit(OWLClassAssertionAxiom object) {
   OWLClassExpression description = object.getClassExpression();
   if (description instanceof OWLClass) {
     AtomicConcept atomicConcept =
         AtomicConcept.create(((OWLClass) description).getIRI().toString());
     Atom atom = Atom.create(atomicConcept, getIndividual(object.getIndividual()));
     Collection<OWLAxiom> originalAxioms = m_positiveFacts_map.get(atom);
     if (originalAxioms == null) {
       originalAxioms = new ArrayList<OWLAxiom>();
       m_positiveFacts_map.put(atom, originalAxioms);
     }
     if (originalAxiom != null) originalAxioms.add(originalAxiom);
   } else if (description instanceof OWLObjectComplementOf
       && ((OWLObjectComplementOf) description).getOperand() instanceof OWLClass) {
     AtomicConcept atomicConcept =
         AtomicConcept.create(
             ((OWLClass) ((OWLObjectComplementOf) description).getOperand())
                 .getIRI()
                 .toString());
     Atom atom = Atom.create(atomicConcept, getIndividual(object.getIndividual()));
     Collection<OWLAxiom> originalAxioms = m_negativeFacts_map.get(atom);
     if (originalAxioms == null) {
       originalAxioms = new ArrayList<OWLAxiom>();
       m_negativeFacts_map.put(atom, originalAxioms);
     }
     if (originalAxiom != null) originalAxioms.add(originalAxiom);
   } else if (description instanceof OWLObjectHasSelf) {
     OWLObjectHasSelf self = (OWLObjectHasSelf) description;
     Atom atom =
         getRoleAtom(
             self.getProperty(),
             getIndividual(object.getIndividual()),
             getIndividual(object.getIndividual()));
     Collection<OWLAxiom> originalAxioms = m_positiveFacts_map.get(atom);
     if (originalAxioms == null) {
       originalAxioms = new ArrayList<OWLAxiom>();
       m_positiveFacts_map.put(atom, originalAxioms);
     }
     if (originalAxiom != null) originalAxioms.add(originalAxiom);
   } else if (description instanceof OWLObjectComplementOf
       && ((OWLObjectComplementOf) description).getOperand() instanceof OWLObjectHasSelf) {
     OWLObjectHasSelf self =
         (OWLObjectHasSelf) (((OWLObjectComplementOf) description).getOperand());
     Atom atom =
         getRoleAtom(
             self.getProperty(),
             getIndividual(object.getIndividual()),
             getIndividual(object.getIndividual()));
     Collection<OWLAxiom> originalAxioms = m_negativeFacts_map.get(atom);
     if (originalAxioms == null) {
       originalAxioms = new ArrayList<OWLAxiom>();
       m_negativeFacts_map.put(atom, originalAxioms);
     }
     if (originalAxiom != null) originalAxioms.add(originalAxiom);
   } else throw new IllegalStateException("Internal error: invalid normal form.");
 }
Esempio n. 2
0
 @Override
 public void visit(OWLObjectHasSelf desc) {
   write(SOME);
   writeSpace();
   desc.getProperty().accept(this);
   writeSpace();
   write(SELF);
 }
 @Override
 public void visit(OWLObjectHasSelf desc) {
   desc.getProperty().accept(this);
   OWLObjectPropertyExpression prop = (OWLObjectPropertyExpression) obj;
   obj = dataFactory.getOWLObjectHasSelf(prop);
 }
 @Override
 public void visit(OWLObjectHasSelf desc) {
   handleObject(desc);
   desc.getProperty().accept(this);
 }
 @Override
 public void visit(OWLObjectHasSelf ce) {
   ce.getProperty().accept(this);
   constructs.add(R);
 }
 public void visit(OWLObjectHasSelf desc) {
   desc.getProperty().accept(this);
 }