Package eu.scape_project.planning.model.measurement

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


        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

            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

            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

                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

            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

Related Classes of eu.scape_project.planning.model.measurement.CriterionCategory

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.