Package com.tinkerpop.gremlin.structure

Examples of com.tinkerpop.gremlin.structure.Property$Exceptions


    public <V> Property<V> property(final String key, final V value) {
        if (TinkerHelper.inComputerMode(this.graph)) {
            return this.graph.graphView.setProperty(this, key, value);
        } else {
            ElementHelper.validateProperty(key, value);
            final Property oldProperty = super.property(key);
            final Property<V> newProperty = new TinkerProperty<>(this, key, value);
            this.properties.put(key, Arrays.asList(newProperty));
            this.graph.edgeIndex.autoUpdate(key, value, oldProperty.isPresent() ? oldProperty.value() : null, this);
            return newProperty;
        }
    }
View Full Code Here


        if (propertyKeys.length == 0) {
            (getHiddens ? element.iterators().hiddenPropertyIterator() : element.iterators().propertyIterator()).forEachRemaining(property -> propertyMap.put(property.key(), property));
        } else {
            for (final String key : propertyKeys) {
                if (!Graph.Key.isHidden(key)) {
                    final Property property = element.property(getHiddens ? Graph.Key.hide(key) : key);
                    if (property.isPresent()) propertyMap.put(key, property);
                }
            }
        }
        return propertyMap;
    }
View Full Code Here

        return stage.equals(Stage.MAP);
    }

    @Override
    public void map(final Vertex vertex, final MapEmitter<Object, Double> emitter) {
        final Property pageRank = vertex.property(PageRankVertexProgram.PAGE_RANK);
        if (pageRank.isPresent()) {
            emitter.emit(vertex.id(), (Double) pageRank.value());
        }
    }
View Full Code Here

        public void shouldReturnWrappedPropertyToString() {
            final StrategyWrappedGraph swg = new StrategyWrappedGraph(g);
            final Vertex v1 = swg.addVertex(T.label, "Person");
            final Vertex v2 = swg.addVertex(T.label, "Person");
            final Edge e1 = v1.addEdge("friend", v2, "weight", "fifty");
            final Property weight = e1.property("weight");
            final Edge originalEdge = ((StrategyWrappedEdge) e1).getBaseEdge();
            final Property originalProperty = originalEdge.property("weight");
            swg.getStrategy().setGraphStrategy(strategy);
            assertEquals(StringFactory.graphStrategyPropertyString(strategy, originalProperty), weight.toString());
        }
View Full Code Here

                        if (this.predicate.test(itty.next().value(), this.value))
                            return true;
                    }
                    return false;
                } else {
                    final Property property = element.property(this.key);
                    return property.isPresent() && this.predicate.test(property.value(), this.value);
                }
            }
        } else {
            return Contains.within.equals(this.predicate) ?
                    element.property(this.key).isPresent() :
View Full Code Here

TOP

Related Classes of com.tinkerpop.gremlin.structure.Property$Exceptions

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.