This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.tinkerpop.gremlin.scala.transform | |
import com.tinkerpop.blueprints.pgm.Vertex | |
import com.tinkerpop.blueprints.pgm.impls.tg.TinkerGraphFactory | |
import com.tinkerpop.gremlin.test.UtilitiesTest | |
import com.tinkerpop.gremlin.scala._ | |
import com.tinkerpop.pipes.branch.LoopPipe.LoopBundle | |
class PathStepTest extends com.tinkerpop.gremlin.test.transform.PathStepTest { | |
val g = TinkerGraphFactory.createTinkerGraph() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.cisco.hmp.graph.gui; | |
import com.tinkerpop.blueprints.pgm.Edge; | |
import com.tinkerpop.blueprints.pgm.Graph; | |
import com.tinkerpop.blueprints.pgm.Vertex; | |
import java.util.Collection; | |
import java.util.HashMap; | |
import java.util.Map; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.cisco.hmp.graph.gui; | |
import com.tinkerpop.blueprints.pgm.Edge; | |
import com.tinkerpop.blueprints.pgm.Graph; | |
import com.tinkerpop.blueprints.pgm.impls.tg.TinkerGraphFactory; | |
import junit.framework.TestCase; | |
import java.util.Arrays; | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AuditGraph graph = new AuditGraph(new Neo4jGraph("/tmp/hmp")); // realize that you can do the graph stacking as in: new SchemaGraph(new AuditGraph(new Neo4jGraph("/tmp/hmp")) | |
graph.setUser("bim"); // this name is recorded with a representation (i.e. who created this representation?) | |
graph.inThePresentMoment(true); // our perspective is startTime:System.currentTimeMillis() and endTime:startTime+1 | |
Vertex marko = graph.addVertex(null); | |
Vertex sumit = graph.addVertex(null); | |
graph.addEdge(null, marko, sumit, "knows"); | |
assertTrue(count(graph.getVertices()) == 2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ReadOnlyVertex extends ReadOnlyElement implements Vertex { | |
public ReadOnlyVertex(final Vertex rawVertex) { | |
super(rawVertex); | |
} | |
public Iterable<Edge> getInEdges(final String... labels) { | |
return new ReadOnlyEdgeIterable(((Vertex) this.rawElement).getInEdges(labels)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.tinkerpop.gremlin.pipes.filter; | |
import com.tinkerpop.blueprints.Element; | |
import com.tinkerpop.pipes.AbstractPipe; | |
import com.tinkerpop.pipes.filter.FilterPipe; | |
import com.tinkerpop.pipes.util.PipeHelper; | |
/** | |
* @author Marko A. Rodriguez (http://markorodriguez.com) | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.tinkerpop.blueprints; | |
/** | |
* A vertex maintains pointers to both a set of incoming and outgoing edges. | |
* The outgoing edges are those edges for which the vertex is the tail. | |
* The incoming edges are those edges for which the vertex is the head. | |
* Diagrammatically, ---inEdges---> vertex ---outEdges--->. | |
* | |
* @author Marko A. Rodriguez (http://markorodriguez.com) | |
* @author Matthias Brocheler (http://matthiasb.com) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.tinkerpop.blueprints.impls.tg; | |
import com.tinkerpop.blueprints.Direction; | |
import com.tinkerpop.blueprints.Edge; | |
import com.tinkerpop.blueprints.Query; | |
import com.tinkerpop.blueprints.Vertex; | |
import com.tinkerpop.blueprints.util.DefaultQuery; | |
import com.tinkerpop.blueprints.util.MultiIterable; | |
import com.tinkerpop.blueprints.util.StringFactory; | |
import com.tinkerpop.blueprints.util.VerticesFromEdgesIterable; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.tinkerpop.blueprints.util; | |
import com.tinkerpop.blueprints.Direction; | |
import com.tinkerpop.blueprints.Edge; | |
import com.tinkerpop.blueprints.Vertex; | |
import java.util.Iterator; | |
/** | |
* @author Marko A. Rodriguez (http://markorodriguez.com) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A CloseableIterable which wraps a simple iterator. | |
* | |
* @author Joshua Shinavier (http://fortytwo.net) | |
*/ | |
public class IteratorCloseableIterable<T> implements CloseableIterable<T> { | |
private final Iterator<T> iterator; | |
public IteratorCloseableIterable(Iterator<T> iterator) { | |
this.iterator = iterator; |