public boolean assertDataPropertyInstance(String ind, String prop, int value) {
   OWLDataProperty dataProp =
       OWLFactory.getOWLDataProperty(
           IRI.create(topIxOnt.getOntologyID().getOntologyIRI().toString() + '#' + prop));
   OWLDataPropertyAssertionAxiom tmpAx =
       OWLFactory.getOWLDataPropertyAssertionAxiom(
           dataProp,
           OWLFactory.getOWLNamedIndividual(
               IRI.create(topIxOnt.getOntologyID().getOntologyIRI().toString() + '#' + ind)),
           OWLFactory.getOWLLiteral(value));
   manager.addAxiom(topIxOnt, tmpAx);
   return true;
 }
  ////////////////////////////////
  // INDIVIDUAL ASSERTION METHODS//
  ////////////////////////////////
  public boolean assertSiteIndividual(String siteNameHash, String siteNameAnnotation) {
    OWLClassExpression tmpCE = OWLFactory.getOWLClass(":Site", topIxPrefixManager);
    OWLIndividual tmpInd = OWLFactory.getOWLNamedIndividual(':' + siteNameHash, topIxPrefixManager);

    manager.addAxiom(topIxOnt, OWLFactory.getOWLClassAssertionAxiom(tmpCE, tmpInd));
    manager.addAxiom(
        topIxOnt,
        OWLFactory.getOWLAnnotationAssertionAxiom(
            OWLFactory.getOWLAnnotationProperty(
                IRI.create(
                    topIxOnt.getOntologyID().getOntologyIRI().toString() + '#' + "individualName")),
            IRI.create(topIxOnt.getOntologyID().getOntologyIRI().toString() + '#' + siteNameHash),
            OWLFactory.getOWLLiteral(siteNameAnnotation)));
    return true;
  }
Ejemplo n.º 3
0
 public void classifyOntology(OWLOntology ontology, OWLReasonerFactory factory) {
   ToStringRenderer.getInstance().setRenderer(new ManchesterOWLSyntaxOWLObjectRendererImpl());
   OWLReasoner reasoner = factory.createNonBufferingReasoner(ontology);
   // reasoner.precomputeInferences(InferenceType.values());
   long time = System.currentTimeMillis();
   boolean isConsistent = reasoner.isConsistent();
   int numOfUnsatClasses = reasoner.getUnsatisfiableClasses().getEntitiesMinusBottom().size();
   time = System.currentTimeMillis() - time;
   DLExpressivityChecker checker = new DLExpressivityChecker(Collections.singleton(ontology));
   String e = checker.getDescriptionLogicName();
   String name = ontology.getOntologyID().getOntologyIRI().getFragment();
   logger.info(
       "ontology: "
           + name
           + ", reasoner: "
           + factory.getReasonerName()
           + ", expressivity: "
           + e
           + ", consistent: "
           + isConsistent
           + ", unsat classes: "
           + numOfUnsatClasses
           + ", time: "
           + time);
 }
Ejemplo n.º 4
0
 private OWLOntology findOntology(List<OWLOntology> loadedOntologies, IRI documentIRI) {
   for (OWLOntology o : loadedOntologies) {
     if (documentIRI.equals(o.getOntologyID().getOntologyIRI())) {
       return o;
     }
   }
   return null;
 }
  public boolean assertHouseIndividual(String houseEntryHash, String houseEntryAnnotation) {
    OWLClassExpression tempClassExpression = OWLFactory.getOWLClass(":House", topIxPrefixManager);
    OWLIndividual tempIndividual =
        OWLFactory.getOWLNamedIndividual(':' + houseEntryHash, topIxPrefixManager);

    manager.addAxiom(
        topIxOnt, OWLFactory.getOWLClassAssertionAxiom(tempClassExpression, tempIndividual));
    manager.addAxiom(
        topIxOnt,
        OWLFactory.getOWLAnnotationAssertionAxiom(
            OWLFactory.getOWLAnnotationProperty(
                IRI.create(
                    topIxOnt.getOntologyID().getOntologyIRI().toString() + '#' + "individualName")),
            IRI.create(topIxOnt.getOntologyID().getOntologyIRI().toString() + '#' + houseEntryHash),
            OWLFactory.getOWLLiteral(houseEntryAnnotation)));
    return true;
  }
Ejemplo n.º 6
0
  public void mergeOntologies() {
    List<OWLOntologyChange> changes = new ArrayList<OWLOntologyChange>();
    for (OWLOntology ont : ontologies) {
      if (!ont.equals(targetOntology)) {

        // move the axioms
        for (OWLAxiom ax : ont.getAxioms()) {
          changes.add(new AddAxiom(targetOntology, ax));
        }

        // move ontology annotations
        for (OWLAnnotation annot : ont.getAnnotations()) {
          changes.add(new AddOntologyAnnotation(targetOntology, annot));
        }

        if (!targetOntology.getOntologyID().isAnonymous()) {
          // move ontology imports
          for (OWLImportsDeclaration decl : ont.getImportsDeclarations()) {
            if (ontologies.contains(ont.getOWLOntologyManager().getImportedOntology(decl))) {
              continue;
            }
            Optional<IRI> defaultDocumentIRI =
                targetOntology.getOntologyID().getDefaultDocumentIRI();
            if (defaultDocumentIRI.isPresent() && !decl.getIRI().equals(defaultDocumentIRI.get())) {
              changes.add(new AddImport(targetOntology, decl));
            } else {
              logger.warn(
                  "Merge: ignoring import declaration for ontology "
                      + targetOntology.getOntologyID()
                      + " (would result in target ontology importing itself).");
            }
          }
        }
      }
    }
    try {
      owlOntologyManager.applyChanges(changes);
    } catch (OWLOntologyChangeException e) {
      ErrorLogPanel.showErrorDialog(e);
    }
  }
 // asserts a hasHouse property instance between a house and its corresponding
 // site
 public boolean assertHasHousePropertyInstance(String houseEntryHash, String siteNameHash) {
   OWLObjectProperty objProp =
       OWLFactory.getOWLObjectProperty(
           IRI.create(topIxOnt.getOntologyID().getOntologyIRI() + "#hasHouse"));
   OWLIndividual houseIndividual =
       OWLFactory.getOWLNamedIndividual(':' + houseEntryHash, topIxPrefixManager);
   OWLIndividual siteIndividual =
       OWLFactory.getOWLNamedIndividual(':' + siteNameHash, topIxPrefixManager);
   manager.addAxiom(
       topIxOnt,
       OWLFactory.getOWLObjectPropertyAssertionAxiom(objProp, siteIndividual, houseIndividual));
   return true;
 }
 public boolean assertHasRoomPropertyInstance(
     String houseIndividualHash, String roomIndividualHash) {
   OWLObjectProperty tempOWLbjectProperty =
       OWLFactory.getOWLObjectProperty(
           IRI.create(topIxOnt.getOntologyID().getOntologyIRI() + "#hasRoom"));
   OWLIndividual houseIndividual =
       OWLFactory.getOWLNamedIndividual(':' + houseIndividualHash, topIxPrefixManager);
   OWLIndividual roomIndividual =
       OWLFactory.getOWLNamedIndividual(':' + roomIndividualHash, topIxPrefixManager);
   manager.addAxiom(
       topIxOnt,
       OWLFactory.getOWLObjectPropertyAssertionAxiom(
           tempOWLbjectProperty, houseIndividual, roomIndividual));
   return true;
 }
  public boolean assertRoomIndividual(
      String roomName, String roomIndividualHash, String roomIndividualAnnotation) {
    OWLClassExpression tempClassExpression =
        OWLFactory.getOWLClass(
            IRI.create(
                roomToIRI.get(
                    roomName))); // retrieves the Room Class IRI fron the roomToIRI map, using
                                 // roomID as a key.
    OWLIndividual tempIndividual =
        OWLFactory.getOWLNamedIndividual(':' + roomIndividualHash, topIxPrefixManager);

    manager.addAxiom(
        topIxOnt, OWLFactory.getOWLClassAssertionAxiom(tempClassExpression, tempIndividual));
    manager.addAxiom(
        topIxOnt,
        OWLFactory.getOWLAnnotationAssertionAxiom(
            OWLFactory.getOWLAnnotationProperty(
                IRI.create(
                    topIxOnt.getOntologyID().getOntologyIRI().toString() + '#' + "individualName")),
            IRI.create(
                topIxOnt.getOntologyID().getOntologyIRI().toString() + '#' + roomIndividualHash),
            OWLFactory.getOWLLiteral(String.format(roomIndividualAnnotation))));
    return true;
  }
  public void loadOntology() {
    try {
      /*
       * --apaitoymena vimata gia th dhmioyrgia mapped ontologias:
       * 1.dhmioyrgoyme ena toBeMappedIRI me skopo toy thn antistoixish me
       * to local File. 2.dhmioyrgoyme ena File me th dieythynsh ths
       * ontologias sto topiko apothikeytiko meso. 3.dhmioyrgoyme enan
       * SimpleIRIMapper kai ton prosthetoyme mesw toy manager. o
       * SimpleIRIMapper syndeei to toBeMappedIRI poy dwsame arxika, me
       * thn fysikh topothesia ths ontologias sto topiko apothikeytiko
       * meso. 4.dhmioyrgoyme ena ontologyIRI me akrivws thn idia arxiki
       * timh me to toBeMappedIRI to opoio tha einai to IRI ths ontologias
       * mas 5.dhmioyrgoyme thn ontologia mas xrhsimopoiwntas to
       * manager.loadOntology(ontologyIRI);
       */
      String sep = File.separator;

      manager = OWLManager.createOWLOntologyManager();
      toBeMappedIRI =
          IRI.create(
              "http://www.semanticweb.org/ontologies/ptyxiaki_v0.6/2011/5/Ontology1308067064597.owl");
      // ontFile = new File("../src/ontologyresources/ptyxiaki_v0.8.owl");
      ontFile = new File("src/ontologyresources/ptyxiaki_v0.8.owl");
      // in case of alternative location on load time when the application is jar'ed!
      if (!ontFile.canRead()) {
        ontFile = new File("ontologyresources/ptyxiaki_v0.8.owl");
      }
      manager.addIRIMapper(new SimpleIRIMapper(toBeMappedIRI, IRI.create(ontFile)));
      ontologyIRI =
          IRI.create(
              "http://www.semanticweb.org/ontologies/ptyxiaki_v0.6/2011/5/Ontology1308067064597.owl");
      topIxOnt = manager.loadOntology(ontologyIRI);
      OWLFactory = manager.getOWLDataFactory();
      topIxFormat = manager.getOntologyFormat(topIxOnt);
      topIxPrefixManager =
          new DefaultPrefixManager(topIxOnt.getOntologyID().getOntologyIRI().toString() + '#');

      System.out.println("loaded ontology: " + this.topIxOnt);
      System.out.println("from: " + this.manager.getOntologyDocumentIRI(this.topIxOnt));

    } catch (OWLException oex) {
      logger.info(oex.getMessage());
    }
  }
Ejemplo n.º 11
0
  public static void main(String[] args) {

    try {
      // Create our ontology manager in the usual way.
      OWLOntologyManager manager = OWLManager.createOWLOntologyManager();

      // Load a copy of the people+pets ontology.  We'll load the ontology from the web (it's
      // acutally located
      // in the TONES ontology repository).
      IRI docIRI = IRI.create(DOCUMENT_IRI);
      // We load the ontology from a document - our IRI points to it directly
      OWLOntology ont = manager.loadOntologyFromOntologyDocument(docIRI);
      System.out.println("Loaded " + ont.getOntologyID());

      // We need to create an instance of OWLReasoner.  An OWLReasoner provides the basic
      // query functionality that we need, for example the ability obtain the subclasses
      // of a class etc.  To do this we use a reasoner factory.

      // Create a reasoner factory.  In this case, we will use HermiT, but we could also
      // use FaCT++ (http://code.google.com/p/factplusplus/) or
      // Pellet(http://clarkparsia.com/pellet)
      // Note that (as of 03 Feb 2010) FaCT++ and Pellet OWL API 3.0.0 compatible libraries are
      // expected to be available in the near future).

      // For now, we'll use HermiT
      // HermiT can be downloaded from http://hermit-reasoner.com
      // Make sure you get the HermiT library and add it to your class path.  You can then
      // instantiate the HermiT reasoner factory:
      // Comment out the first line below and uncomment the second line below to instantiate
      // the HermiT reasoner factory.  You'll also need to import the
      // org.semanticweb.HermiT.Reasoner
      // package.
      OWLReasonerFactory reasonerFactory = null;
      //            OWLReasonerFactory reasonerFactory = new Reasoner.ReasonerFactory();

      // We'll now create an instance of an OWLReasoner (the implementation being provided by HermiT
      // as
      // we're using the HermiT reasoner factory).  The are two categories of reasoner, Buffering
      // and
      // NonBuffering.  In our case, we'll create the buffering reasoner, which is the default kind
      // of reasoner.
      // We'll also attach a progress monitor to the reasoner.  To do this we set up a configuration
      // that
      // knows about a progress monitor.

      // Create a console progress monitor.  This will print the reasoner progress out to the
      // console.
      ConsoleProgressMonitor progressMonitor = new ConsoleProgressMonitor();
      // Specify the progress monitor via a configuration.  We could also specify other setup
      // parameters in
      // the configuration, and different reasoners may accept their own defined parameters this
      // way.
      OWLReasonerConfiguration config = new SimpleConfiguration(progressMonitor);
      // Create a reasoner that will reason over our ontology and its imports closure.  Pass in the
      // configuration.
      OWLReasoner reasoner = reasonerFactory.createReasoner(ont, config);

      // Ask the reasoner to do all the necessary work now
      reasoner.precomputeInferences();

      // We can determine if the ontology is actually consistent (in this case, it should be).
      boolean consistent = reasoner.isConsistent();
      System.out.println("Consistent: " + consistent);
      System.out.println("\n");

      // We can easily get a list of unsatisfiable classes.  (A class is unsatisfiable if it
      // can't possibly have any instances).  Note that the getUnsatisfiableClasses method
      // is really just a convenience method for obtaining the classes that are equivalent
      // to owl:Nothing.  In our case there should be just one unsatisfiable class - "mad_cow"
      // We ask the reasoner for the unsatisfiable classes, which returns the bottom node
      // in the class hierarchy (an unsatisfiable class is a subclass of every class).
      Node<OWLClass> bottomNode = reasoner.getUnsatisfiableClasses();
      // This node contains owl:Nothing and all the classes that are equivalent to owl:Nothing -
      // i.e. the unsatisfiable classes.
      // We just want to print out the unsatisfiable classes excluding owl:Nothing, and we can
      // used a convenience method on the node to get these
      Set<OWLClass> unsatisfiable = bottomNode.getEntitiesMinusBottom();
      if (!unsatisfiable.isEmpty()) {
        System.out.println("The following classes are unsatisfiable: ");
        for (OWLClass cls : unsatisfiable) {
          System.out.println("    " + cls);
        }
      } else {
        System.out.println("There are no unsatisfiable classes");
      }
      System.out.println("\n");

      // Now we want to query the reasoner for all descendants of vegetarian.  Vegetarians are
      // defined in the
      // ontology to be animals that don't eat animals or parts of animals.
      OWLDataFactory fac = manager.getOWLDataFactory();
      // Get a reference to the vegetarian class so that we can as the reasoner about it.
      // The full IRI of this class happens to be:
      // <http://owl.man.ac.uk/2005/07/sssw/people#vegetarian>
      OWLClass vegPizza =
          fac.getOWLClass(IRI.create("http://owl.man.ac.uk/2005/07/sssw/people#vegetarian"));

      // Now use the reasoner to obtain the subclasses of vegetarian.
      // We can ask for the direct subclasses of vegetarian or all of the (proper) subclasses of
      // vegetarian.
      // In this case we just want the direct ones (which we specify by the "true" flag).
      NodeSet<OWLClass> subClses = reasoner.getSubClasses(vegPizza, true);

      // The reasoner returns a NodeSet, which represents a set of Nodes.
      // Each node in the set represents a subclass of vegetarian pizza.  A node of classes contains
      // classes,
      // where each class in the node is equivalent. For example, if we asked for the
      // subclasses of some class A and got back a NodeSet containing two nodes {B, C} and {D}, then
      // A would have
      // two proper subclasses.  One of these subclasses would be equivalent to the class D, and the
      // other would
      // be the class that is equivalent to class B and class C.

      // In this case, we don't particularly care about the equivalences, so we will flatten this
      // set of sets and print the result
      Set<OWLClass> clses = subClses.getFlattened();
      System.out.println("Subclasses of vegetarian: ");
      for (OWLClass cls : clses) {
        System.out.println("    " + cls);
      }
      System.out.println("\n");

      // In this case, we should find that the classes, cow, sheep and giraffe are vegetarian.  Note
      // that in this
      // ontology only the class cow had been stated to be a subclass of vegetarian.  The fact that
      // sheep and
      // giraffe are subclasses of vegetarian was implicit in the ontology (through other things we
      // had said)
      // and this illustrates why it is important to use a reasoner for querying an ontology.

      // We can easily retrieve the instances of a class.  In this example we'll obtain the
      // instances of
      // the class pet.  This class has a full IRI of <http://owl.man.ac.uk/2005/07/sssw/people#pet>

      // We need to obtain a reference to this class so that we can ask the reasoner about it.
      OWLClass country =
          fac.getOWLClass(IRI.create("http://owl.man.ac.uk/2005/07/sssw/people#pet"));
      // Ask the reasoner for the instances of pet
      NodeSet<OWLNamedIndividual> individualsNodeSet = reasoner.getInstances(country, true);
      // The reasoner returns a NodeSet again.  This time the NodeSet contains individuals.
      // Again, we just want the individuals, so get a flattened set.
      Set<OWLNamedIndividual> individuals = individualsNodeSet.getFlattened();
      System.out.println("Instances of pet: ");
      for (OWLNamedIndividual ind : individuals) {
        System.out.println("    " + ind);
      }
      System.out.println("\n");

      // Again, it's worth noting that not all of the individuals that are returned were explicitly
      // stated
      // to be pets.

      // Finally, we can ask for the property values (property assertions in OWL speak) for a given
      // individual
      // and property.
      // Let's get the property values for the individual Mick, the full IRI of which is
      // <http://owl.man.ac.uk/2005/07/sssw/people#Mick>

      // Get a reference to the individual Mick
      OWLNamedIndividual mick =
          fac.getOWLNamedIndividual(IRI.create("http://owl.man.ac.uk/2005/07/sssw/people#Mick"));

      // Let's get the pets of Mick
      // Get hold of the has_pet property which has a full IRI of
      // <http://owl.man.ac.uk/2005/07/sssw/people#has_pet>
      OWLObjectProperty hasPet =
          fac.getOWLObjectProperty(IRI.create("http://owl.man.ac.uk/2005/07/sssw/people#has_pet"));

      // Now ask the reasoner for the has_pet property values for Mick
      NodeSet<OWLNamedIndividual> petValuesNodeSet = reasoner.getObjectPropertyValues(mick, hasPet);
      Set<OWLNamedIndividual> values = petValuesNodeSet.getFlattened();
      System.out.println("The has_pet property values for Mick are: ");
      for (OWLNamedIndividual ind : values) {
        System.out.println("    " + ind);
      }

      // Notice that Mick has a pet Rex, which wasn't asserted in the ontology.

      // Finally, let's print out the class hierarchy.
      // Get hold of the top node in the class hierarchy (containing owl:Thing)
      // Now print the hierarchy out
      Node<OWLClass> topNode = reasoner.getTopClassNode();
      print(topNode, reasoner, 0);

    } catch (UnsupportedOperationException exception) {
      System.out.println("Unsupported reasoner operation.");
    } catch (OWLOntologyCreationException e) {
      System.out.println("Could not load the pizza ontology: " + e.getMessage());
    }
  }
  public boolean retrieveSolutions(String siteNameHash) {
    // use the siteNameHash to access a certain Site individual in the ontology
    // retrieve each Solution individual of this site and use it to re-initialise the Solutions List
    OwlSolution tempSolution;
    OwlSolvedHouse tempSolvedHouse;
    OwlSolvedRoom tempSolvedRoom;

    // first clear the Solution List contents...
    this.solutionsList.clear();

    OWLIndividual tempSiteIndividual =
        OWLFactory.getOWLNamedIndividual(":" + siteNameHash, topIxPrefixManager);
    OWLClassExpression tempSolutionClassExpression =
        OWLFactory.getOWLClass(":Solution", topIxPrefixManager);
    Set<OWLObjectPropertyAssertionAxiom> tempSitePropertyAxioms =
        topIxOnt.getObjectPropertyAssertionAxioms(tempSiteIndividual);

    Set<OWLIndividual> tempSolutionIndividuals =
        new HashSet<>(); // Solution individuals for this particular site. will be filled below...
    Set<OWLIndividual> tempSolvedHouseIndividuals = new HashSet<>();
    Set<OWLIndividual> tempSolvedRoomIndividuals = new HashSet<>();

    // populate the tempSolutionIndividuals Set<OWLIndividual>
    // with the Solution individuals that are solutions of the current Site
    // this block runs through the set of all the object property axioms
    // that have this site as their subject
    // and filters out the ones that are of type "hasSolution"
    for (OWLObjectPropertyAssertionAxiom tempObjPropAssAx : tempSitePropertyAxioms) {
      OWLObjectProperty tempHasSolutionObjectProperty =
          OWLFactory.getOWLObjectProperty(
              IRI.create(topIxOnt.getOntologyID().getOntologyIRI() + "#hasSolution"));
      if (tempObjPropAssAx.getProperty() == tempHasSolutionObjectProperty) {
        tempSolutionIndividuals.add(tempObjPropAssAx.getObject());
      }
    }
    // retrieving the site dimensions for this solution set
    // (the site remains the same throughout the plethos of solutions).
    int tempSiteLength = 0;
    int tempSiteWidth = 0;
    OWLDataProperty siteHasLengthProp = OWLFactory.getOWLDataProperty(":hasX", topIxPrefixManager);
    OWLDataProperty siteHasWidthProp = OWLFactory.getOWLDataProperty(":hasY", topIxPrefixManager);
    Set<OWLDataPropertyAssertionAxiom> tempSiteDataProperties = new HashSet<>();

    tempSiteDataProperties = topIxOnt.getDataPropertyAssertionAxioms(tempSiteIndividual);

    for (OWLDataPropertyAssertionAxiom tempSiteDataProperty : tempSiteDataProperties) {
      if (tempSiteDataProperty.getProperty() == siteHasLengthProp) {
        tempSiteLength = tempSiteDataProperty.getObject().parseInteger();
      }
      if (tempSiteDataProperty.getProperty() == siteHasWidthProp) {
        tempSiteWidth = tempSiteDataProperty.getObject().parseInteger();
      }
    }

    logger.info(tempSolutionIndividuals.size());

    // running every solution individual for/of that particular site in order
    // to extract the solvedHouse's and the solvedRoom's
    // via the hasSolvedHouse and hasSolvedRoom properties.
    int solutionCounter = 0;
    for (OWLIndividual tempSolutionIndividual : tempSolutionIndividuals) {
      tempSolution = new OwlSolution();
      tempSolution.setSolutionID(new Integer(++solutionCounter));

      tempSolution.setSiteLength(new Integer(tempSiteLength));
      tempSolution.setSiteWidth(new Integer(tempSiteWidth));

      // clearing the contents of these two structuresin order to accommodate the solved entities of
      // the next solution.
      tempSolvedHouseIndividuals.clear();
      tempSolvedRoomIndividuals.clear();

      for (OWLObjectPropertyAssertionAxiom tempObjPropAssAx :
          topIxOnt.getObjectPropertyAssertionAxioms(tempSolutionIndividual)) {
        OWLObjectProperty tempHasSolvedHouseObjectProperty =
            OWLFactory.getOWLObjectProperty(
                IRI.create(topIxOnt.getOntologyID().getOntologyIRI() + "#hasSolvedHouse"));
        OWLObjectProperty tempHasSolvedRoomObjectProperty =
            OWLFactory.getOWLObjectProperty(
                IRI.create(topIxOnt.getOntologyID().getOntologyIRI() + "#hasSolvedRoom"));
        if (tempObjPropAssAx.getProperty() == tempHasSolvedHouseObjectProperty) {
          tempSolvedHouseIndividuals.add(tempObjPropAssAx.getObject());
        } else if (tempObjPropAssAx.getProperty() == tempHasSolvedRoomObjectProperty) {
          tempSolvedRoomIndividuals.add(tempObjPropAssAx.getObject());
        }
      }

      for (OWLIndividual tempSolvedHouseIndividual : tempSolvedHouseIndividuals) {
        tempSolvedHouse = new OwlSolvedHouse();
        for (OWLDataPropertyAssertionAxiom tempDatPropAssAx :
            topIxOnt.getDataPropertyAssertionAxioms(tempSolvedHouseIndividual)) {
          if (tempDatPropAssAx.getProperty()
              == (OWLFactory.getOWLDataProperty(":hasL", topIxPrefixManager))) {
            // logger.info(tempDatPropAssAx.getObject().parseInteger());
            tempSolvedHouse.setSolvedHouseLength(tempDatPropAssAx.getObject().parseInteger());
          } else if (tempDatPropAssAx.getProperty()
              == (OWLFactory.getOWLDataProperty(":hasW", topIxPrefixManager))) {
            tempSolvedHouse.setSolvedHouseWidth(tempDatPropAssAx.getObject().parseInteger());
          } else if (tempDatPropAssAx.getProperty()
              == (OWLFactory.getOWLDataProperty(":hasX", topIxPrefixManager))) {
            tempSolvedHouse.setSolvedHouseX(tempDatPropAssAx.getObject().parseInteger());
          } else if (tempDatPropAssAx.getProperty()
              == (OWLFactory.getOWLDataProperty(":hasY", topIxPrefixManager))) {
            tempSolvedHouse.setSolvedHouseY(tempDatPropAssAx.getObject().parseInteger());
          } else if (tempDatPropAssAx.getProperty()
              == (OWLFactory.getOWLDataProperty(":hasLiteral", topIxPrefixManager))) {
            tempSolvedHouse.setSolvedHouseLiteral(tempDatPropAssAx.getObject().getLiteral());
          }
        }
        // logger.info(tempSolvedHouse.getSolvedHouseX()+" "+tempSolvedHouse.getSolvedHouseY());
        tempSolution.getSolvedHouses().add(tempSolvedHouse);
      }

      for (OWLIndividual tempSolvedRoomIndividual : tempSolvedRoomIndividuals) {
        tempSolvedRoom = new OwlSolvedRoom();
        for (OWLDataPropertyAssertionAxiom tempDatPropAssAx :
            topIxOnt.getDataPropertyAssertionAxioms(tempSolvedRoomIndividual)) {
          if (tempDatPropAssAx.getProperty()
              == (OWLFactory.getOWLDataProperty(":hasL", topIxPrefixManager))) {
            tempSolvedRoom.setSolvedRoomLength(tempDatPropAssAx.getObject().parseInteger());
          } else if (tempDatPropAssAx.getProperty()
              == (OWLFactory.getOWLDataProperty(":hasW", topIxPrefixManager))) {
            tempSolvedRoom.setSolvedRoomWidth(tempDatPropAssAx.getObject().parseInteger());
          } else if (tempDatPropAssAx.getProperty()
              == (OWLFactory.getOWLDataProperty(":hasH", topIxPrefixManager))) {
            tempSolvedRoom.setSolvedRoomHeight(tempDatPropAssAx.getObject().parseInteger());
          } else if (tempDatPropAssAx.getProperty()
              == (OWLFactory.getOWLDataProperty(":hasX", topIxPrefixManager))) {
            tempSolvedRoom.setSolvedRoomX(tempDatPropAssAx.getObject().parseInteger());
          } else if (tempDatPropAssAx.getProperty()
              == (OWLFactory.getOWLDataProperty(":hasY", topIxPrefixManager))) {
            tempSolvedRoom.setSolvedRoomY(tempDatPropAssAx.getObject().parseInteger());
          } else if (tempDatPropAssAx.getProperty()
              == (OWLFactory.getOWLDataProperty(":hasZ", topIxPrefixManager))) {
            tempSolvedRoom.setSolvedRoomZ(tempDatPropAssAx.getObject().parseInteger());
          } else if (tempDatPropAssAx.getProperty()
              == (OWLFactory.getOWLDataProperty(":hasLiteral", topIxPrefixManager))) {
            tempSolvedRoom.setSolvedRoomLiteral(tempDatPropAssAx.getObject().getLiteral());
          }
        }
        tempSolution.getSolvedRooms().add(tempSolvedRoom);
      }
      this.solutionsList.add(tempSolution);
    }

    return true;
  }