Package eu.planets_project.pp.plato.services.characterisation.xcl

Examples of eu.planets_project.pp.plato.services.characterisation.xcl.CprProperty


                     * they have the pattern: xcl:<propertyName>:<metricName>
                     */
                    String[] keyParts =  p.getName().split(":");
                    if (keyParts.length == 3) {
                        if ("xcl".equals(keyParts[0])) {
                            CprProperty cprP =
                               compResult.get(0).getProperties().get(keyParts[1]);
                            if (cprP != null) {
                                String id = MetricToScaleMapping.getMetricId(keyParts[2]);
                                if (id != null) {
                                    Value v = null;                                   
                                    Scale s = MetricToScaleMapping.getScale(id);
                                    if (s == null) {
                                        // There is a new XCLMetric we have not registered in MetricToScaleMapping yet...
                                        log.debug("CPR: unkown metricId: " +  id);
                                    } else {
                                        // scale found, so we can create a value object
                                        v =  s.createValue();
                                        v.setScale(null);
                                       
                                        CprMetricResult mResult = cprP.getResultMetrics().get(id);
                                        if (mResult != null) {
                                            if ("ok".equals(mResult.getState())) {
                                                v.parse(mResult.getResult());
                                                v.setComment("xcdl values(sample::result)=(" + cprP.getSource()+"::" + cprP.getTarget()+")");
                                            } else {
                                                v.setComment(mResult.getResult());
                                            }
                                        }                                       
                                    }
View Full Code Here

TOP

Related Classes of eu.planets_project.pp.plato.services.characterisation.xcl.CprProperty

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.