Examples of OntologyProperty


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

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

        }
      }
     
      //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

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

        }
      }
     
      //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

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

                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

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

      //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

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

        }
       
        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

Examples of io.lumify.core.model.ontology.OntologyProperty

        }
        return visibility;
    }

    private String checkAndConvertForDateType(String propertyName, Object value) {
        OntologyProperty ontologyProperty = ontologyRepository.getPropertyByIRI(propertyName);
        if (ontologyProperty != null && ontologyProperty.getDataType() == PropertyType.DATE) {
            SimpleDateFormat dateFormat = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyy");
            try {
                return String.valueOf(dateFormat.parse(value.toString()).getTime());
            } catch (ParseException e) {
                throw new RuntimeException("could not parse date");
View Full Code Here

Examples of io.lumify.core.model.ontology.OntologyProperty

        User user = getUser(request);
        Authorizations authorizations = getAuthorizations(request, user);
        String workspaceId = getActiveWorkspaceId(request);

        OntologyProperty property = ontologyRepository.getPropertyByIRI(propertyName);
        if (property == null) {
            throw new RuntimeException("Could not find property: " + propertyName);
        }

        // TODO remove all properties from all edges? I don't think so
        Edge edge = graph.getEdge(edgeId, authorizations);
        Object oldValue = null;
        Property oldProperty = edge.getProperty(propertyKey, propertyName);
        if (oldProperty != null) {
            oldValue = oldProperty.getValue();
        }
        // TODO: replace "" when we implement commenting on ui
        auditRepository.auditRelationshipProperty(AuditAction.DELETE, sourceId, destId, propertyKey, property.getDisplayName(),
                oldValue, null, edge, "", "", user, lumifyVisibility.getVisibility());
        edge.removeProperty(propertyKey, propertyName, authorizations);
        graph.flush();

        workQueueRepository.pushGraphPropertyQueue(edge, null, propertyName, workspaceId, null);
View Full Code Here

Examples of io.lumify.core.model.ontology.OntologyProperty

                String propertyKey = propertyPublishItem.getKey();
                String propertyName = propertyPublishItem.getName();
                String propertyVisibilityString = propertyPublishItem.getVisibilityString();

                OntologyProperty ontologyProperty = ontologyRepository.getPropertyByIRI(propertyName);
                checkNotNull(ontologyProperty, "Could not find ontology property: " + propertyName);
                if (!ontologyProperty.getUserVisible() || propertyName.equals(LumifyProperties.ENTITY_IMAGE_VERTEX_ID.getPropertyName())) {
                    continue;
                }

                List<Property> properties = toList(element.getProperties(propertyKey, propertyName));
                SandboxStatus[] sandboxStatuses = GraphUtil.getPropertySandboxStatuses(properties, workspaceId);
View Full Code Here

Examples of io.lumify.core.model.ontology.OntologyProperty

        ExistingElementMutation<Vertex> vertexElementMutation = vertex.prepareMutation();
        vertexElementMutation.alterElementVisibility(lumifyVisibility.getVisibility());

        for (Property property : vertex.getProperties()) {
            OntologyProperty ontologyProperty = ontologyRepository.getPropertyByIRI(property.getName());
            checkNotNull(ontologyProperty, "Could not find ontology property " + property.getName());
            if (!ontologyProperty.getUserVisible() && !property.getName().equals(LumifyProperties.ENTITY_IMAGE_VERTEX_ID.getPropertyName())) {
                publishProperty(vertexElementMutation, property, workspaceId, user);
            }
        }

        Map<String, Object> metadata = new HashMap<String, Object>();
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.