Package com.tinkerpop.blueprints

Examples of com.tinkerpop.blueprints.Vertex


        }
    }

    public void updateFeedEntity(Feed oldFeed, Feed newFeed) {
        LOG.info("Updating feed entity: " + newFeed.getName());
        Vertex feedEntityVertex = findVertex(oldFeed.getName(), RelationshipType.FEED_ENTITY);
        if (feedEntityVertex == null) {
            // todo - throw new IllegalStateException(oldFeed.getName() + " entity vertex must exist.");
            LOG.error("Illegal State: Feed entity vertex must exist for " + oldFeed.getName());
            return;
        }
View Full Code Here


    }

    public void addProcessEntity(Process process) {
        String processName = process.getName();
        LOG.info("Adding process entity: " + processName);
        Vertex processVertex = addVertex(processName, RelationshipType.PROCESS_ENTITY);
        addWorkflowProperties(process.getWorkflow(), processVertex, processName);

        addUserRelation(processVertex);
        addDataClassification(process.getTags(), processVertex);
View Full Code Here

        addOutputFeeds(process.getOutputs(), processVertex);
    }

    public void updateProcessEntity(Process oldProcess, Process newProcess) {
        LOG.info("Updating process entity: " + newProcess.getName());
        Vertex processEntityVertex = findVertex(oldProcess.getName(), RelationshipType.PROCESS_ENTITY);
        if (processEntityVertex == null) {
            // todo - throw new IllegalStateException(oldProcess.getName() + " entity vertex must exist");
            LOG.error("Illegal State: Process entity vertex must exist for " + oldProcess.getName());
            return;
        }
View Full Code Here

        updateProcessInputs(oldProcess.getInputs(), newProcess.getInputs(), processEntityVertex);
        updateProcessOutputs(oldProcess.getOutputs(), newProcess.getOutputs(), processEntityVertex);
    }

    public void addColoRelation(String colo, Vertex fromVertex) {
        Vertex coloVertex = addVertex(colo, RelationshipType.COLO);
        addEdge(fromVertex, coloVertex, RelationshipLabel.CLUSTER_COLO.getName());
    }
View Full Code Here

        Vertex coloVertex = addVertex(colo, RelationshipType.COLO);
        addEdge(fromVertex, coloVertex, RelationshipLabel.CLUSTER_COLO.getName());
    }

    public void addRelationToCluster(Vertex fromVertex, String clusterName, RelationshipLabel edgeLabel) {
        Vertex clusterVertex = findVertex(clusterName, RelationshipType.CLUSTER_ENTITY);
        if (clusterVertex == null) { // cluster must exist before adding other entities
            // todo - throw new IllegalStateException("Cluster entity vertex must exist: " + clusterName);
            LOG.error("Illegal State: Cluster entity vertex must exist for " + clusterName);
            return;
        }
View Full Code Here

            addProcessFeedEdge(processVertex, output.getFeed(), RelationshipLabel.PROCESS_FEED_EDGE);
        }
    }

    public void addProcessFeedEdge(Vertex processVertex, String feedName, RelationshipLabel edgeLabel) {
        Vertex feedVertex = findVertex(feedName, RelationshipType.FEED_ENTITY);
        if (feedVertex == null) {
            // todo - throw new IllegalStateException("Feed entity vertex must exist: " + feedName);
            LOG.error("Illegal State: Feed entity vertex must exist for " + feedName);
            return;
        }
View Full Code Here

            removeProcessFeedEdge(processVertex, output.getFeed(), RelationshipLabel.PROCESS_FEED_EDGE);
        }
    }

    public void removeProcessFeedEdge(Vertex processVertex, String feedName, RelationshipLabel edgeLabel) {
        Vertex feedVertex = findVertex(feedName, RelationshipType.FEED_ENTITY);
        if (feedVertex == null) {
            // todo - throw new IllegalStateException("Feed entity vertex must exist: " + feedName);
            LOG.error("Illegal State: Feed entity vertex must exist for " + feedName);
            return;
        }
View Full Code Here

    protected boolean isPreserveHistory() {
        return preserveHistory;
    }

    public Vertex addVertex(String name, RelationshipType type) {
        Vertex vertex = findVertex(name, type);
        if (vertex != null) {
            if (LOG.isDebugEnabled()) {
                LOG.debug("Found an existing vertex for: name=" + name + ", type=" + type);
            }
View Full Code Here

        return createVertex(name, type);
    }

    protected Vertex addVertex(String name, RelationshipType type, String timestamp) {
        Vertex vertex = findVertex(name, type);
        if (vertex != null) {
            if (LOG.isDebugEnabled()) {
                LOG.debug("Found an existing vertex for: name=" + name + ", type=" + type);
            }
View Full Code Here

    protected Vertex createVertex(String name, RelationshipType type, String timestamp) {
        if (LOG.isDebugEnabled()) {
            LOG.debug("Creating a new vertex for: name=" + name + ", type=" + type);
        }

        Vertex vertex = graph.addVertex(null);
        vertex.setProperty(RelationshipProperty.NAME.getName(), name);
        vertex.setProperty(RelationshipProperty.TYPE.getName(), type.getName());
        vertex.setProperty(RelationshipProperty.TIMESTAMP.getName(), timestamp);

        return vertex;
    }
View Full Code Here

TOP

Related Classes of com.tinkerpop.blueprints.Vertex

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.