Examples of CriterionCategory


Examples of eu.planets_project.pp.plato.model.tree.CriterionCategory

        // 2. extract propertyId and criterion sub-category
        String propertyId = path.substring(subCategoryEndIdx+1);
        String subCategory = path.substring(0, subCategoryEndIdx);

        // 3. try to get the corresponding category
        CriterionCategory cat = CriterionCategory.getType(scheme, subCategory);
        if (cat == null) {
            throw new IllegalArgumentException("invalid measurement info uri - scheme and path don't correspond to a criterion category: " +uri);
        }
        // reuse existing property, when possible
        MeasurableProperty prop = getProperty();
View Full Code Here

Examples of eu.planets_project.pp.plato.model.tree.CriterionCategory

        String path = null;
       
        if ((property == null)||(property.getCategory() == null)) {
            return null;
        }
        CriterionCategory cat = property.getCategory();
       
        scheme = cat.getCategory();
        path = cat.getSubCategory();

        String fragment;
        if ((metric != null) && (metric.getMetricId() != null)) {
            fragment = "#" + metric.getMetricId();
        } else {
View Full Code Here

Examples of eu.planets_project.pp.plato.model.tree.CriterionCategory

                mpmSelectedLeaf.changeScale(mappingScale);
                mpmSelectedLeaf.getMeasurementInfo().setProperty(mappingInfo.getProperty());
                mpmSelectedLeaf.getMeasurementInfo().setMetric(mappingInfo.getMetric());
               
                // only outcome object and action runtime criteria are evaluated per object, all others per action
                CriterionCategory mappingCategory = mappingProperty.getCategory();
                mpmSelectedLeaf.setSingle(!
                        (CriterionCategory.ACTION_RUNTIME.equals(mappingCategory) ||
                        CriterionCategory.OUTCOME_OBJECT.equals(mappingCategory)) );
               
                if ("- tbd -".equals(mpmSelectedLeaf.getName())) {
View Full Code Here

Examples of eu.scape_project.planning.model.measurement.CriterionCategory

       
        assertEquals(1((Long)em.createQuery("select count(*) from Scale").getSingleResult()).longValue());

        Measure meas = new Measure();
        Attribute attr = new Attribute();
        CriterionCategory cat = new CriterionCategory("test://category/1", "testcategory", EvaluationScope.ALTERNATIVE_ACTION);
        attr.setCategory(cat);
        attr.setName("test attr");
        attr.setUri("test://attribute/1");
        meas.setAttribute(attr);
        meas.setName("test measure");
View Full Code Here

Examples of eu.scape_project.planning.model.measurement.CriterionCategory

        Attribute a = m.getAttribute();
        Assert.assertNotNull(a);
        Assert.assertTrue(StringUtils.isNotEmpty(a.getUri()));
        Assert.assertTrue(StringUtils.isNotEmpty(a.getName()));

        CriterionCategory category = a.getCategory();
        Assert.assertNotNull("Measure '" + m.getName() + "' has no category!", category);
        Assert.assertTrue("Measure '" + m.getName() + "' category has no uri!",
            StringUtils.isNotEmpty(category.getUri()));
        Assert.assertNotNull("Measure '" + m.getName() + "' category " + category.getUri() + " has no scope",
            category.getScope());

        Scale s = m.getScale();
        Assert.assertNotNull("Measure '" + m.getName() + "' has no scale!", s);
        Assert.assertNotNull("Measure '" + m.getName() + "' scale " + s.getDisplayName() + " has no type", s.getType());
    }
View Full Code Here

Examples of eu.scape_project.planning.model.measurement.CriterionCategory

            Attribute a = m.getAttribute();
            Assert.assertNotNull(a);
            Assert.assertTrue(StringUtils.isNotEmpty(a.getUri()));
            Assert.assertTrue(StringUtils.isNotEmpty(a.getName()));

            CriterionCategory category = a.getCategory();
            Assert.assertNotNull("Measure '" + m.getName() + " has no category defined", category);

            Scale s = m.getScale();
            Assert.assertNotNull("Measure '" + m.getName() + "' has no scale!", s);
            Assert.assertNotNull("Measure '" + m.getName() + "' scale " + s.getDisplayName() + " has no type",
View Full Code Here

Examples of eu.scape_project.planning.model.measurement.CriterionCategory

            return hierarchy;
        }

        hierarchy.add(0, a.getName());

        CriterionCategory criterionCategory = a.getCategory();

        if (criterionCategory == null) {
            return hierarchy;
        }

        hierarchy.add(0, criterionCategory.getName());

        return hierarchy;
    }
View Full Code Here

Examples of eu.scape_project.planning.model.measurement.CriterionCategory

                scope = EvaluationScope.OBJECT;
            } else {
                scope = EvaluationScope.ALTERNATIVE_ACTION;
            }
            if (scope != null) {
                CriterionCategory category = new CriterionCategory(categoryId, name, scope);
                knownCategories.put(categoryId, category);
            } else {
                log.warn("CriterionCategory without defined scope: " + categoryId + ", " + name);
            }
        }
View Full Code Here

Examples of eu.scape_project.planning.model.measurement.CriterionCategory

            Element attributeEl = measureEl.addElement("attribute");
            attributeEl.addAttribute("ID", attribute.getUri());
            addStringElement(attributeEl, "name", attribute.getName());
            addStringElement(attributeEl, "description", attribute.getDescription());

            CriterionCategory category = attribute.getCategory();
            Element categoryEl = attributeEl.addElement("category");
            categoryEl.addAttribute("ID", category.getUri());
            categoryEl.addAttribute("scope", category.getScope().toString());
            addStringElement(categoryEl, "name", category.getName());
        }
        addScale(measure.getScale(), measureEl);

        // addChangeLog(measure.getChangeLog(), measureEl);
    }
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.