use of org.apache.atlas.repository.graphdb.AtlasEdgeDirection in project atlas by apache.
the class Titan0GraphManagement method createEdgeIndex.
@Override
public void createEdgeIndex(String label, String indexName, AtlasEdgeDirection edgeDirection, List<AtlasPropertyKey> propertyKeys) {
EdgeLabel edgeLabel = management.getEdgeLabel(label);
if (edgeLabel == null) {
edgeLabel = management.makeEdgeLabel(label).make();
}
Direction direction = TitanObjectFactory.createDirection(edgeDirection);
PropertyKey[] keys = TitanObjectFactory.createPropertyKeys(propertyKeys);
management.buildEdgeIndex(edgeLabel, indexName, direction, keys);
}
use of org.apache.atlas.repository.graphdb.AtlasEdgeDirection in project atlas by apache.
the class AtlasJanusVertex method getEdges.
@Override
public Iterable<AtlasEdge<AtlasJanusVertex, AtlasJanusEdge>> getEdges(AtlasEdgeDirection in) {
Direction d = AtlasJanusObjectFactory.createDirection(in);
Iterator<Edge> edges = getWrappedElement().edges(d);
return graph.wrapEdges(edges);
}
use of org.apache.atlas.repository.graphdb.AtlasEdgeDirection in project atlas by apache.
the class AtlasJanusVertex method getEdges.
@Override
public Iterable<AtlasEdge<AtlasJanusVertex, AtlasJanusEdge>> getEdges(AtlasEdgeDirection dir, String edgeLabel) {
Direction d = AtlasJanusObjectFactory.createDirection(dir);
Iterator<Edge> edges = getWrappedElement().edges(d, edgeLabel);
return graph.wrapEdges(edges);
}
use of org.apache.atlas.repository.graphdb.AtlasEdgeDirection in project atlas by apache.
the class AtlasJanusGraphManagement method createEdgeIndex.
@Override
public void createEdgeIndex(String label, String indexName, AtlasEdgeDirection edgeDirection, List<AtlasPropertyKey> propertyKeys) {
EdgeLabel edgeLabel = management.getEdgeLabel(label);
if (edgeLabel == null) {
edgeLabel = management.makeEdgeLabel(label).make();
}
Direction direction = AtlasJanusObjectFactory.createDirection(edgeDirection);
PropertyKey[] keys = AtlasJanusObjectFactory.createPropertyKeys(propertyKeys);
if (management.getRelationIndex(edgeLabel, indexName) == null) {
management.buildEdgeIndex(edgeLabel, indexName, direction, keys);
}
}
use of org.apache.atlas.repository.graphdb.AtlasEdgeDirection in project incubator-atlas by apache.
the class Titan1Vertex method getEdges.
@Override
public Iterable<AtlasEdge<Titan1Vertex, Titan1Edge>> getEdges(AtlasEdgeDirection in) {
Direction d = TitanObjectFactory.createDirection(in);
Iterator<Edge> edges = getWrappedElement().edges(d);
return graph.wrapEdges(edges);
}
Aggregations