Package org.securegraph

Examples of org.securegraph.VertexBuilder.save()


        if (!(lineData.getValue() instanceof LinkValue)) {
            String multiValueKey = lineData.getValue().getValueString();
            entityVertexBuilder.addPropertyValue(multiValueKey, lineData.getPropertyIri(), lineData.getValue().getValue(), visibility);
        }

        Vertex entityVertex = entityVertexBuilder.save(authorizations);

        String edgeId = getEntityHasWikipediaPageEdgeId(entityVertex, pageVertex);
        addEdge(edgeId, entityVertex, pageVertex, DbpediaOntology.EDGE_LABEL_ENTITY_HAS_WIKIPEDIA_PAGE, visibility, authorizations);

        return entityVertex;
View Full Code Here


        Map<String, Object> titleMetadata = new HashMap<String, Object>();
        LumifyProperties.CONFIDENCE.setMetadata(titleMetadata, 0.1);
        LumifyProperties.TITLE.addPropertyValue(pageVertexBuilder, ImportMR.MULTI_VALUE_KEY, lineData.getPageTitle(), titleMetadata, visibility);

        return pageVertexBuilder.save(authorizations);
    }
}
View Full Code Here

            String ref = getAttributeValue(fieldNode, "ref");
            String value = fieldNode.getTextContent();
            vertex.addPropertyValue(MULTI_VALUE_KEY, "http://lumify.io/worldfactbook#" + ref, value, visibility);
        }

        return vertex.save(getAuthorizations());
    }

    private String getAttributeValue(Node node, String attributeName) {
        Node attribute = node.getAttributes().getNamedItem(attributeName);
        if (attribute == null) {
View Full Code Here

        if (propertyValue == null) {
            // skip null values
        } else {
            VertexBuilder v = getDataImporter().getGraph().prepareVertex(getObjectId(row), getDataImporter().getVisibility());
            v.addPropertyValue(propertyKey, propertyName, propertyValue, getDataImporter().getVisibility());
            v.save(getDataImporter().getAuthorizations());
        }
    }

    private Object toValueGeo(PtPropertyAndValue row, Object propertyValue) {
        JGeometryWrapper geometryGis = JGeometryWrapper.load(row.getGeometryGis());
View Full Code Here

            }

            VertexBuilder vertexBuilder = getDataImporter().getGraph().prepareVertex(getMediaId(row), getDataImporter().getVisibility());
            LumifyProperties.RAW.addPropertyValue(vertexBuilder, propertyKey, propertyValue, getDataImporter().getVisibility());
            LumifyProperties.TITLE.setProperty(vertexBuilder, title, getDataImporter().getVisibility());
            Vertex mediaVertex = vertexBuilder.save(getDataImporter().getAuthorizations());

            Vertex sourceVertex = getVertexCache().get(getObjectVertexId(row.getLinkObjectId()));
            checkNotNull(sourceVertex, "Could not find source vertex for media object: " + row.getLinkObjectId());

            String edgeId = getEdgeId(row);
View Full Code Here

        }
        String conceptTypeUri = getConceptTypeUri(ptObjectType.getUri());

        VertexBuilder v = getDataImporter().getGraph().prepareVertex(getObjectId(row), getDataImporter().getVisibility());
        LumifyProperties.CONCEPT_TYPE.setProperty(v, conceptTypeUri, getDataImporter().getVisibility());
        v.save(getDataImporter().getAuthorizations());
    }

    protected String getObjectId(PtObject ptObject) {
        return getDataImporter().getIdPrefix() + ptObject.getObjectId();
    }
View Full Code Here

        StreamingPropertyValue rawValue = new StreamingPropertyValue(new ByteArrayInputStream(value.getBytes()), byte[].class);
        rawValue.store(true);
        rawValue.searchIndex(false);
        LumifyProperties.RAW.addPropertyValue(m, MULTI_VALUE_KEY, rawValue, visibility);
        LumifyProperties.TITLE.addPropertyValue(m, MULTI_VALUE_KEY, "Image of " + title, visibility);
        Vertex profileImageVertex = m.save(authorizations);

        VertexBuilder sourceVertexMutation = prepareVertex(sourceVertexId, visibility);
        LumifyProperties.ENTITY_IMAGE_VERTEX_ID.addPropertyValue(sourceVertexMutation, MULTI_VALUE_KEY, profileImageVertex.getId(), visibility);
        Vertex sourceVertex = sourceVertexMutation.save(authorizations);
View Full Code Here

        LumifyProperties.TITLE.addPropertyValue(m, MULTI_VALUE_KEY, "Image of " + title, visibility);
        Vertex profileImageVertex = m.save(authorizations);

        VertexBuilder sourceVertexMutation = prepareVertex(sourceVertexId, visibility);
        LumifyProperties.ENTITY_IMAGE_VERTEX_ID.addPropertyValue(sourceVertexMutation, MULTI_VALUE_KEY, profileImageVertex.getId(), visibility);
        Vertex sourceVertex = sourceVertexMutation.save(authorizations);

        addEdge(edgeId, sourceVertex, profileImageVertex, edgeLabel, visibility, authorizations);

        context.getCounter(TheMovieDbImportCounters.IMAGES_PROCESSED).increment(1);
    }
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.