Examples of Quantity


Examples of OntoUML.Quantity

        if (result == null) result = caseNamedElement(property);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case OntoUMLPackage.QUANTITY: {
        Quantity quantity = (Quantity)theEObject;
        T result = caseQuantity(quantity);
        if (result == null) result = caseSubstanceSortal(quantity);
        if (result == null) result = caseRigidSortalClass(quantity);
        if (result == null) result = caseSortalClass(quantity);
        if (result == null) result = caseObjectClass(quantity);
View Full Code Here

Examples of OntoUML.Quantity

     * <!-- end-user-doc -->
     * @generated NOT
     */
    private void updateContents(QuantityEditPart quantityeditpart) {

      Quantity s = (Quantity) ((View) quantityeditpart.getModel())
          .getElement();
      for (int i = 0; i < s.getAttribute().size(); i++) {
        Property p1 = (Property) s.getAttribute().get(i);
        if (p1.getAttribute().size() >= 2) {
          DatatypeAssociation d = (DatatypeAssociation) p1
              .getAttribute().get(0);
          Property p2 = (Property) p1.getAttribute().get(1);
          d.setOwner(null);
          d.setContainer(s.getContainer());
          d.setName("Name");
          p1.setAssociationEnd(d);
          p1.setName("Name");
          p2.setAssociationEnd(d);
          p2.setOwner(d);
View Full Code Here

Examples of groundTruthModule.datastructure.PersonEntity.Quantity

        evidence.setResidentNode("knowsPersonImprisionedInOIForOEF");
        argument = new ArgumentInfo();
        argument.setType("Person");
        argument.setName(personName);
        evidence.getArguments().add(argument);
        Quantity quantity = person.getKnowsPersonImprisionedInOIForOEF();
        evidence.setState(quantity.toString());
        evidenceList.add(evidence);
      }
      if (person.getKnowsPersonKilledinOIForOEF() != null) {
        evidence = new EvidenceInfo();
        evidence.setResidentNode("knowsPersonKilledInOIForOEF");
        argument = new ArgumentInfo();
        argument.setType("Person");
        argument.setName(personName);
        evidence.getArguments().add(argument);
        Quantity quantity = person.getKnowsPersonKilledinOIForOEF();
        evidence.setState(quantity.toString());
        evidenceList.add(evidence);
      }
      if (person.getHasFamilyStatus() != null) {
        evidence = new EvidenceInfo();
        evidence.setResidentNode("hasFamilyStatus");
        argument = new ArgumentInfo();
        argument.setType("Person");
        argument.setName(personName);
        evidence.getArguments().add(argument);
        FamilyStatus status = person.getHasFamilyStatus();
        evidence.setState(status.toString());
        evidenceList.add(evidence);
      }
     
      // Evidence that support the hypothesis hasTerroristBeliefs(person)
      if (person.getHasFriendshipWithTerrorist() != null) {
        evidence = new EvidenceInfo();
        evidence.setResidentNode("hasFriendshipWithTerrorist");
        argument = new ArgumentInfo();
        argument.setType("Person");
        argument.setName(personName);
        evidence.getArguments().add(argument);
        Quantity quantity = person.getHasFriendshipWithTerrorist();
        evidence.setState(quantity.toString());
        evidenceList.add(evidence);
      }
      if (person.getHasKinshipToTerrorist() != null) {
        evidence = new EvidenceInfo();
        evidence.setResidentNode("hasKinshipToTerrorist");
        argument = new ArgumentInfo();
        argument.setType("Person");
        argument.setName(personName);
        evidence.getArguments().add(argument);
        Quantity quantity = person.getHasKinshipToTerrorist();
        evidence.setState(quantity.toString());
        evidenceList.add(evidence);
      }
     
      // Evidence that support the hypothesis hasClusterPartition(person)
      if (person.getHasNationality() != null) {
View Full Code Here

Examples of groundTruthModule.datastructure.PersonEntity.Quantity

      if (person.getKnowsPersonImprisionedInOIForOEF() != null) {
        residentNode = mebn.getDomainResidentNode("knowsPersonImprisionedInOIForOEF");
        arguments = new ObjectEntityInstance[1];
        arguments[0] = mebn.getObjectEntityContainer()
            .getEntityInstanceByName(personName);
        Quantity quantity = person.getKnowsPersonImprisionedInOIForOEF();
        if (quantity == Quantity.None) {
          categoricalState = mebn.getCategoricalStatesEntityContainer().getCategoricalState("None");
        } else if (quantity == Quantity.Few) {
          categoricalState = mebn.getCategoricalStatesEntityContainer().getCategoricalState("Few");
        } else {
          categoricalState = mebn.getCategoricalStatesEntityContainer().getCategoricalState("Many");
        }
        mebnUtil
            .createRandomVariableFinding(residentNode, arguments, categoricalState);
      }
      if (person.getKnowsPersonKilledinOIForOEF() != null) {
        residentNode = mebn.getDomainResidentNode("knowsPersonKilledInOIForOEF");
        arguments = new ObjectEntityInstance[1];
        arguments[0] = mebn.getObjectEntityContainer()
            .getEntityInstanceByName(personName);
        Quantity quantity = person.getKnowsPersonKilledinOIForOEF();
        if (quantity == Quantity.None) {
          categoricalState = mebn.getCategoricalStatesEntityContainer().getCategoricalState("None");
        } else if (quantity == Quantity.Few) {
          categoricalState = mebn.getCategoricalStatesEntityContainer().getCategoricalState("Few");
        } else {
          categoricalState = mebn.getCategoricalStatesEntityContainer().getCategoricalState("Many");
        }
        mebnUtil
            .createRandomVariableFinding(residentNode, arguments, categoricalState);
      }
      if (person.getHasFamilyStatus() != null) {
        residentNode = mebn.getDomainResidentNode("hasFamilyStatus");
        arguments = new ObjectEntityInstance[1];
        arguments[0] = mebn.getObjectEntityContainer()
            .getEntityInstanceByName(personName);
        FamilyStatus status = person.getHasFamilyStatus();
        if (status == FamilyStatus.Single) {
          categoricalState = mebn.getCategoricalStatesEntityContainer().getCategoricalState("Single");
        } else {
          categoricalState = mebn.getCategoricalStatesEntityContainer().getCategoricalState("Married");
        }
        mebnUtil
            .createRandomVariableFinding(residentNode, arguments, categoricalState);
      }
     
      // Evidence that support the hypothesis hasTerroristBeliefs(person)
      if (person.getHasFriendshipWithTerrorist() != null) {
        residentNode = mebn.getDomainResidentNode("hasFriendshipWithTerrorist");
        arguments = new ObjectEntityInstance[1];
        arguments[0] = mebn.getObjectEntityContainer()
            .getEntityInstanceByName(personName);
        Quantity quantity = person.getHasFriendshipWithTerrorist();
        if (quantity == Quantity.None) {
          categoricalState = mebn.getCategoricalStatesEntityContainer().getCategoricalState("None");
        } else if (quantity == Quantity.Few) {
          categoricalState = mebn.getCategoricalStatesEntityContainer().getCategoricalState("Few");
        } else {
          categoricalState = mebn.getCategoricalStatesEntityContainer().getCategoricalState("Many");
        }
        mebnUtil
            .createRandomVariableFinding(residentNode, arguments, categoricalState);
      }
      if (person.getHasKinshipToTerrorist() != null) {
        residentNode = mebn.getDomainResidentNode("hasKinshipToTerrorist");
        arguments = new ObjectEntityInstance[1];
        arguments[0] = mebn.getObjectEntityContainer()
            .getEntityInstanceByName(personName);
        Quantity quantity = person.getHasKinshipToTerrorist();
        if (quantity == Quantity.None) {
          categoricalState = mebn.getCategoricalStatesEntityContainer().getCategoricalState("None");
        } else if (quantity == Quantity.Few) {
          categoricalState = mebn.getCategoricalStatesEntityContainer().getCategoricalState("Few");
        } else {
View Full Code Here

Examples of jsky.science.Quantity

    /**
     * sets the current min quantity of the range
     */
    public void setMinQuantity(Quantity inQ) {
        Quantity oldQ = fMinValue;
        fMinValue = inQ;
        updateTitle();
        updateScaleMinMax((int) fMinValue.getValue());
        fSlider.setValue((int) inQ.getValue());
        firePropertyChange(MINQUANTITY_PROPERTY, oldQ, inQ);
View Full Code Here

Examples of jsky.science.Quantity

    /**
     * sets the current Max quantity of the range
     */
    public void setMaxQuantity(Quantity inQ) {
        Quantity oldQ = fMaxValue;
        fMaxValue = inQ;
        updateTitle();
        updateScaleMinMax((int) fMaxValue.getValue());
        fSlider.setExtent((int) (fMaxValue.getValue() - fMinValue.getValue()));
        firePropertyChange(MAXQUANTITY_PROPERTY, oldQ, inQ);
View Full Code Here

Examples of jsky.science.Quantity

                double val = popupQuantityRequest(
                        "Min Value",
                        sb.toString());

                if (!Double.isNaN(val)) {
                    Quantity newQ = fMinValue.newInstance(val);
                    setMinQuantity(newQ);
                }
            } else if (fSlider.extentContains(e.getX(), e.getY())) {
                StringBuffer sb = new StringBuffer("Enter new max value (");
                sb.append(fMaxValue.getDefaultUnits());
                sb.append("):");
                double val = popupQuantityRequest(
                        "Max Value",
                        sb.toString());

                if (!Double.isNaN(val)) {
                    Quantity newQ = fMaxValue.newInstance(val);
                    setMaxQuantity(newQ);
                }
            }
        }
    }
View Full Code Here

Examples of jsky.science.Quantity

    /**
     * Sets the Quantity instance to be editted.
     * @param newQ Quantity object to be editted
     **/
    public void setQuantity(Quantity newQ) {
        Quantity oldW = fQuantity;

        if ((newQ != null) && !fClass.isInstance(newQ)) {
            throw new ClassCastException();
        }

View Full Code Here

Examples of org.apache.isis.applib.value.Quantity

        if (entry == null || entry.trim().equals("")) {
            quantity = null;
        } else {
            try {
                int intValue = format.parse(entry).intValue();
                quantity = new Quantity(intValue);
            } catch (ParseException e) {
                throw new TextEntryParseException("Invalid number", e);
            }
        }
    }
View Full Code Here

Examples of org.apache.isis.applib.value.Quantity

    }

    public void restoreFromEncodedString(final byte[] data) {
        String text = new String(data);
        int value = Integer.valueOf(text).intValue();
        quantity = new Quantity(value);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.