Package unbbayes.io.mebn.exceptions

Examples of unbbayes.io.mebn.exceptions.IOMebnException


        individualOne = (RDFIndividual) it.next();
        domainResidentNode = getMapDomainResidentNode().get(individualOne
            .getBrowserText());
        if (domainResidentNode == null) {
          throw new IOMebnException(
              getResource().getString("DomainResidentNotExistsInMTheory"),
              individualOne.getBrowserText());
        }

        Debug.println("Domain Resident loaded: "
            + individualOne.getBrowserText());

        domainResidentNode.setDescription(getDescription(individualOne));

        /* -> isResidentNodeIn */
        objectProperty = (OWLObjectProperty) getOwlModel()
            .getOWLObjectProperty("isResidentNodeIn");
        instances = individualOne.getPropertyValues(objectProperty);
        Iterator itAux = instances.iterator();
        individualTwo = (RDFIndividual) itAux.next();
        domainMFrag = getMapDomainMFrag().get(individualTwo.getBrowserText());
        if (domainMFrag.containsDomainResidentNode(domainResidentNode) == false) {
          throw new IOMebnException(
              getResource().getString("DomainResidentNotExistsInDomainMFrag"));
        }
        mFragOfNode = domainMFrag;
        Debug.println("-> " + individualOne.getBrowserText() + ": "
            + objectProperty.getBrowserText() + " = "
            + individualTwo.getBrowserText());

        /* -> hasArgument */
        objectProperty = (OWLObjectProperty) getOwlModel()
            .getOWLObjectProperty("hasArgument");
        instances = individualOne.getPropertyValues(objectProperty);
        for (Iterator itIn = instances.iterator(); itIn.hasNext();) {
          individualTwo = (RDFIndividual) itIn.next();
          argument = new Argument(individualTwo.getBrowserText(),
              domainResidentNode);
          domainResidentNode.addArgument(argument);
          getMapArgument().put(individualTwo.getBrowserText(), argument);
          Debug.println("-> " + individualOne.getBrowserText() + ": "
              + objectProperty.getBrowserText() + " = "
              + individualTwo.getBrowserText());
        }

        /* -> hasParent */
        objectProperty = (OWLObjectProperty) getOwlModel()
            .getOWLObjectProperty("hasParent");
        instances = individualOne.getPropertyValues(objectProperty);
        for (Iterator itIn = instances.iterator(); itIn.hasNext();) {
          individualTwo = (RDFIndividual) itIn.next();
          if (getMapDomainResidentNode().containsKey(individualTwo
              .getBrowserText())) {
            ResidentNode aux = getMapDomainResidentNode().get(individualTwo
                .getBrowserText());

            Edge auxEdge = new Edge(aux, domainResidentNode);
            try {
              mFragOfNode.addEdge(auxEdge);
            } catch (Exception e) {
              Debug.println("Erro: arco invalido!!!");
            }
          } else {
            if (getMapGenerativeInputNode().containsKey(individualTwo
                .getBrowserText())) {
              InputNode aux = getMapGenerativeInputNode()
                  .get(individualTwo.getBrowserText());

              Edge auxEdge = new Edge(aux, domainResidentNode);
              try {
                mFragOfNode.addEdge(auxEdge);
              } catch (Exception e) {
                Debug.println("Erro: arco invalido!!!");
              }

            } else {
              throw new IOMebnException(
                  getResource().getString("NodeNotFound"),
                  individualTwo.getBrowserText());
            }
          }
          Debug.println("-> " + individualOne.getBrowserText() + ": "
View Full Code Here


      for (Iterator it = instances.iterator(); it.hasNext();) {
        individualOne = (RDFIndividual) it.next();
        domainMFrag = getMapDomainMFrag().get(individualOne.getBrowserText());
        if (domainMFrag == null) {
          throw new IOMebnException(
              getResource().getString("DomainMFragNotExistsInMTheory"),
              individualOne.getBrowserText());
        }

        Debug.println("DomainMFrag loaded: "
View Full Code Here

TOP

Related Classes of unbbayes.io.mebn.exceptions.IOMebnException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.