Package eu.planets_project.tb.api.model.ontology

Examples of eu.planets_project.tb.api.model.ontology.OntologyProperty


        //as well as the Measurements added from the Ontology (and stored in the Experiment Executable)
        if(ontoOps!=null){
            OntologyHandlerImpl ontohandler = OntologyHandlerImpl.getInstance();
            for(String propURI : ontoOps.get(stageName)){
              //query the authority to get the OntologyProperty by URI
              OntologyProperty ontoProp = ontohandler.getProperty(propURI);
             
          try {
            MeasurementImpl m = OntoPropertyUtil.createMeasurementFromOntologyProperty(ontoProp);
            l.add(m);
          } catch (Exception e) {
View Full Code Here


        }
      }
     
      //finally add the MeasurementInfo data (name, description, for the propertyID etc.
      if(manualProps){
        OntologyProperty ontop = OntologyHandlerImpl.getInstance().getProperty(propertyID);
        //create a MeasurementImpl from the OntologyProperty
        try {
          MeasurementImpl measurementinfo = OntoPropertyUtil.createMeasurementFromOntologyProperty(ontop);
          resBean.setMeasurementInfo(measurementinfo);
        } catch (Exception e) {
View Full Code Here

        }
      }
     
      //3.finally add the MeasurementInfo data (name, description, for the propertyID etc.
      if(manualProps){
        OntologyProperty ontop = OntologyHandlerImpl.getInstance().getProperty(propertyID);
        //create a MeasurementImpl from the OntologyProperty
        try {
          MeasurementImpl measurementinfo = OntoPropertyUtil.createMeasurementFromOntologyProperty(ontop);
          evalPropResBean.setMeasurementInfo(measurementinfo);
        } catch (Exception e) {
View Full Code Here

                for (Iterator<RDFIndividual> jt = instances.iterator(); jt.hasNext();) {
                  try{
                    RDFIndividual individual = (RDFIndividual)jt.next();
                    //OWLIndividual individual = (OWLIndividual) jt.next();   
                    TreeNode child = new TreeNodeImpl();
                      OntologyProperty ontologyProperty = new OntologyPropertyImpl(individual);
                     
                      boolean bMatchesFilter = true;
                     if(applyfilter){
                       boolean b1 = ontologyProperty.getName().toLowerCase().contains(filterTreeString.toLowerCase());
                       boolean b2 = ontologyProperty.getHumanReadableName().toLowerCase().contains(filterTreeString.toLowerCase());
                       bMatchesFilter =  b1||b2;
                     }
                     if(bMatchesFilter){
                       child.setData(ontologyProperty);
                        childClass.addChild(ontologyProperty.getURI(), child);
                    }
                  }catch(ClassCastException e){
                    log.debug("Shouldn't happen any more: Filtering out RDFIndividual");
                  }
                }
View Full Code Here

      //TB property uris correspond to OWLIndividuals
      RDFIndividual individual = this.getOWLModel().getRDFIndividual(uri);
     
      if(individual != null){
          //create ontology property for this individual
          OntologyProperty ontoprop = new OntologyPropertyImpl(individual);
          return ontoprop;
      }
      else{
        //unexpected instance - no individual for this uri RETURN NULL
        log.debug("Not able to retrieve a stored TB property URI from the OWLModel. uri: "+uri);
View Full Code Here

        }
       
        OntologyHandlerImpl onto = OntologyHandlerImpl.getInstance();
        for( Property p : properties ) {
            _log.info( "Property: " + p );
            OntologyProperty op = onto.getProperty(p.getUri().toString());
            if( op != null ) {
                _log.info("P: "+p.getUri()+" OP: "+op.getURI());
                _log.info("P: "+p.getName()+" OP: "+op.getName());
                _log.info("P: "+p.getDescription()+" OP: "+op.getComment());
                _log.info("P: "+p.getType()+" OP: "+op.getType());
                _log.info("P: "+p.getUnit()+" OP: "+op.getUnit());
                _log.info("P= "+p.getValue()+" OP: "+op.getDataType());
                try {
                    MeasurementImpl measurementinfo = OntoPropertyUtil.createMeasurementFromOntologyProperty(op);
                    _log.info("Got MeasurementImpl: " + measurementinfo.getDescription() );
                } catch (Exception e) {
                    _log.error("Could not turn the OntologyProperty into a MeasurementImpl.");
View Full Code Here

TOP

Related Classes of eu.planets_project.tb.api.model.ontology.OntologyProperty

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.