Examples of OntologyProperty


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

    }

    public static List<Attribute> createCollectionFromVertex(Vertex vertex, OntologyRepository ontologyRepository) {
        List<Attribute> collection = new ArrayList<Attribute>();
        for (Property property : vertex.getProperties()) {
            OntologyProperty ontologyProperty = ontologyRepository.getPropertyByIRI(property.getName());
            if (ontologyProperty.getUserVisible()) {
                String name = ontologyProperty.getTitle();
                Map<String, String> possibleValues = ontologyProperty.getPossibleValues();
                String value = property.getValue().toString();
                if (possibleValues != null && possibleValues.size() > 0 && possibleValues.containsKey(value)) {
                    value = possibleValues.get(value);
                }
                Attribute attribute = new Attribute(name, value);
View Full Code Here

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

            respondWithBadRequest(response, "visibilitySource", getString(request, "visibility.invalid"));
            chain.next(request, response);
            return;
        }

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

        Object value;
        try {
            value = property.convertString(valueStr);
        } catch (Exception ex) {
            LOGGER.warn(String.format("Validation error propertyName: %s, valueStr: %s", propertyName, valueStr), ex);
            response.sendError(HttpServletResponse.SC_BAD_REQUEST, ex.getMessage());
            return;
        }
View Full Code Here

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

            propertyKey = this.graph.getIdGenerator().nextId();
        }

        Map<String, Object> metadata = GraphUtil.metadataStringToMap(metadataString);

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

        Object value;
        try {
            value = property.convertString(valueStr);
        } catch (Exception ex) {
            LOGGER.warn(String.format("Validation error propertyName: %s, valueStr: %s", propertyName, valueStr), ex);
            throw new LumifyException(ex.getMessage(), ex);
        }
View Full Code Here

Examples of ru.spbu.math.ontologycomparison.zhukova.logic.ontologygraph.impl.OntologyProperty

                if (concept != null) {
                    ranges.add(concept);
                }
            }
        }
        IOntologyProperty ontologyProperty = new OntologyProperty(property.getIRI(), label,
                domains.toArray(new IOntologyConcept[domains.size()]), ranges.toArray(new IOntologyConcept[ranges.size()]),
                property.isFunctional(getOntology()));
        uriToProperty.put(property.getIRI(), ontologyProperty);
        labelToProperty.insert(ontologyProperty.getNormalizedMainLabel(), ontologyProperty);
    }
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.