DictionaryConst.NODE_TYPE_STEP_PROPERTY, (String) targetTemplateStepVertex.getProperty( DictionaryConst.PROPERTY_LOGICAL_ID ), targetTemplateStepName + ":" + targetTemplateStepAttr.getAttributeKey(), null ); .append( targetTemplateStepName ).append( ": " ).append( targetTemplateStepAttr.getAttributeKey() ); verboseProperties.add( mappingKey ); stepVertex.setProperty( mappingKey, mapping.toString() ); getMetaverseBuilder().addLink( sourceStepField, DictionaryConst.LINK_INPUTS, stepVertex ); final Vertex derivedField = findFieldVertex( parentTransMeta, stepVertex.getProperty( DictionaryConst.PROPERTY_NAME ).toString(), sourceStepField.getProperty( DictionaryConst.PROPERTY_NAME ).toString() ); if ( derivedField != null ) { getMetaverseBuilder().addLink( sourceStepField, DictionaryConst.LINK_DERIVES, derivedField ); stepVertex.setProperty( DictionaryConst.PROPERTY_VERBOSE_DETAILS, StringUtils.join( verboseProperties, "," ) );
public WrappedGraph(final T baseGraph) { this.baseGraph = baseGraph; this.features = this.baseGraph.getFeatures().copyFeatures(); this.features.isWrapper = true; }
@Override public Features getFeatures() { Features features = baseGraph.getFeatures().copyFeatures(); features.ignoresSuppliedIds = false; features.isWrapper = true; features.supportsEdgeIteration = false; features.supportsThreadedTransactions = false; features.supportsVertexIteration = false; return features; }
public boolean isLegal(final Element element) { if (this.key.equals(StringFactory.ID)) { return this.predicate.evaluate(element.getId(), this.value); } else if (this.key.equals(StringFactory.LABEL) && element instanceof Edge) { return this.predicate.evaluate(((Edge) element).getLabel(), this.value); } else { return this.predicate.evaluate(element.getProperty(this.key), this.value); } } }
private void init() { try { this.graph.getVertices("class", ""); } catch (IllegalArgumentException e) { Vertex v = this.graph.addVertex(null); v.setProperty("class", ""); } }
public VertexQuery build(final Vertex vertex) { VertexQuery query = vertex.query(); for (final HasContainer hasContainer : this.hasContainers) { query = query.has(hasContainer.key, hasContainer.predicate, hasContainer.value); } return query.limit(this.limit).labels(this.labels).direction(this.direction); } }
Vertex RestaurantVertex = get(graph, RESTAURANT_ID, nextLine[1]); Edge visitEdge = userVertex.addEdge("visit", RestaurantVertex); visitEdge.setProperty(PROP_VISIT_RATING, nextLine[2]); visitEdge.setProperty(PROP_VISIT_FOOD, nextLine[3]); visitEdge.setProperty(PROP_VISIT_SERVICE, nextLine[4]); RESTAURANTVertex.addEdge("restaurant_genre", genreVertex); userVertex.addEdge("friend", friendVertex);
public void commit() { if (this.baseGraph instanceof TransactionalGraph) { ((TransactionalGraph) baseGraph).commit(); } }
@Override public Vertex createVertex(final Object id) { return this.graph.addVertex(id); } }
public GraphQuery query() { return new WrappedGraphQuery(this.baseGraph.query()) { @Override public Iterable<Edge> edges() { return new WrappedEdgeIterable(this.query.edges()); } @Override public Iterable<Vertex> vertices() { return new WrappedVertexIterable(this.query.vertices()); } }; }
public void close() { if (this.iterable instanceof CloseableIterable) { ((CloseableIterable) this.iterable).close(); } } }
public ReadOnlyGraph(final T baseGraph) { this.baseGraph = baseGraph; this.features = this.baseGraph.getFeatures().copyFeatures(); this.features.isWrapper = true; }
public void close() { if (this.iterable instanceof CloseableIterable) { ((CloseableIterable) this.iterable).close(); } } }
/** * @return The features of the underlying graph but with transactions supported. */ @Override public Features getFeatures() { Features f = graph.getFeatures().copyFeatures(); f.isWrapper = true; f.supportsTransactions = true; return f; }