Package eu.scape_project.planning.model.policy

Examples of eu.scape_project.planning.model.policy.ControlPolicy


                try {

                    while ((results != null) && (results.hasNext())) {
                        QuerySolution qs = results.next();
                        ControlPolicy cp = new ControlPolicy();

                        String controlPolicyUri = qs.getResource("objective").getURI();
                        String controlPolicyName = qs.getLiteral("objective_label").toString();
                        String measureUri = qs.getResource("measure").toString();
                        String modality = qs.getResource("modality").getLocalName();
                        String value = qs.getLiteral("value").getString();
                        Resource qualifier = qs.getResource("qualifier");

                        Measure m = criteriaManager.getMeasure(measureUri);

                        cp.setUri(controlPolicyUri);
                        cp.setName(controlPolicyName);
                        cp.setValue(value);
                        cp.setMeasure(m);

                        if (qualifier != null) {
                            cp.setQualifier(ControlPolicy.Qualifier.valueOf(qualifier.getLocalName()));
                        } else {
                            cp.setQualifier(ControlPolicy.Qualifier.EQ);
                        }
                        cp.setModality(ControlPolicy.Modality.valueOf(modality));

                        pc.getControlPolicies().add(cp);
                    }
                } finally {
                    qe.close();
View Full Code Here

TOP

Related Classes of eu.scape_project.planning.model.policy.ControlPolicy

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.