@ExperimentalApi public class SchemaGraph extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
APPLIED_ARGUMENT |
static java.lang.String |
APPLIED_DIRECTIVE |
static java.lang.String |
ARGUMENT |
static java.lang.String |
DIRECTIVE |
static java.lang.String |
ENUM |
static java.lang.String |
ENUM_VALUE |
static java.lang.String |
FIELD |
static java.lang.String |
INPUT_FIELD |
static java.lang.String |
INPUT_OBJECT |
static java.lang.String |
INTERFACE |
static java.lang.String |
ISOLATED |
static java.lang.String |
OBJECT |
static java.lang.String |
SCALAR |
static java.lang.String |
SCHEMA |
static java.lang.String |
UNION |
Constructor and Description |
---|
SchemaGraph() |
SchemaGraph(java.util.List<Vertex> vertices,
java.util.List<Edge> edges,
com.google.common.collect.Table<Vertex,Vertex,Edge> edgeByVertexPair) |
Modifier and Type | Method and Description |
---|---|
void |
addDirective(java.lang.String name,
Vertex vertex) |
void |
addEdge(Edge edge) |
java.util.List<Vertex> |
addIsolatedVertices(int count,
java.lang.String debugPrefix) |
void |
addType(java.lang.String name,
Vertex vertex) |
void |
addVertex(Vertex vertex) |
void |
addVertices(java.util.Collection<Vertex> vertices) |
java.util.Optional<Vertex> |
findTargetVertex(Vertex from,
java.util.function.Predicate<Vertex> vertexPredicate) |
java.util.List<Edge> |
getAdjacentEdges(Vertex from) |
java.util.List<Edge> |
getAdjacentEdges(Vertex from,
java.util.function.Predicate<Vertex> predicate) |
java.util.List<Edge> |
getAdjacentEdgesAndInverse(Vertex fromAndTo) |
java.util.List<Edge> |
getAdjacentEdgesInverse(Vertex to) |
java.util.List<Edge> |
getAdjacentEdgesInverse(Vertex to,
java.util.function.Predicate<Vertex> predicate) |
java.util.List<Vertex> |
getAdjacentVertices(Vertex from) |
java.util.List<Vertex> |
getAdjacentVertices(Vertex from,
java.util.function.Predicate<Vertex> predicate) |
java.util.List<Vertex> |
getAdjacentVerticesInverse(Vertex to) |
java.util.List<Vertex> |
getAdjacentVerticesInverse(Vertex to,
java.util.function.Predicate<Vertex> predicate) |
java.util.List<Edge> |
getAllAdjacentEdges(java.util.List<Vertex> fromList,
Vertex to) |
Vertex |
getAppliedDirectiveContainerForAppliedDirective(Vertex appliedDirective) |
Vertex |
getAppliedDirectiveForAppliedArgument(Vertex appliedArgument) |
int |
getAppliedDirectiveIndex(Vertex appliedDirective) |
Vertex |
getDirective(java.lang.String name) |
@Nullable Edge |
getEdge(Vertex from,
Vertex to) |
@Nullable Edge |
getEdgeOrInverse(Vertex from,
Vertex to) |
java.util.List<Edge> |
getEdges() |
Vertex |
getEnumForEnumValue(Vertex enumValue) |
Vertex |
getFieldOrDirectiveForArgument(Vertex argument) |
Vertex |
getFieldsContainerForField(Vertex field) |
Vertex |
getInputObjectForInputField(Vertex inputField) |
Edge |
getSingleAdjacentEdge(Vertex from,
java.util.function.Predicate<Edge> predicate) |
Vertex |
getType(java.lang.String name) |
java.util.List<Vertex> |
getVertices() |
com.google.common.collect.Multimap<java.lang.String,Vertex> |
getVerticesByType() |
java.util.Collection<Vertex> |
getVerticesByType(java.lang.String type) |
void |
setVertices(java.util.List<Vertex> vertices) |
int |
size() |
public static final java.lang.String SCHEMA
public static final java.lang.String OBJECT
public static final java.lang.String INTERFACE
public static final java.lang.String UNION
public static final java.lang.String FIELD
public static final java.lang.String ARGUMENT
public static final java.lang.String SCALAR
public static final java.lang.String ENUM
public static final java.lang.String ENUM_VALUE
public static final java.lang.String INPUT_OBJECT
public static final java.lang.String INPUT_FIELD
public static final java.lang.String DIRECTIVE
public static final java.lang.String APPLIED_DIRECTIVE
public static final java.lang.String APPLIED_ARGUMENT
public static final java.lang.String ISOLATED
public void addVertex(Vertex vertex)
public void addVertices(java.util.Collection<Vertex> vertices)
public java.util.Collection<Vertex> getVerticesByType(java.lang.String type)
public com.google.common.collect.Multimap<java.lang.String,Vertex> getVerticesByType()
public void addEdge(Edge edge)
public java.util.List<Vertex> getAdjacentVertices(Vertex from, java.util.function.Predicate<Vertex> predicate)
public java.util.List<Vertex> getAdjacentVerticesInverse(Vertex to, java.util.function.Predicate<Vertex> predicate)
public java.util.List<Edge> getAdjacentEdges(Vertex from, java.util.function.Predicate<Vertex> predicate)
public java.util.List<Edge> getAdjacentEdgesInverse(Vertex to, java.util.function.Predicate<Vertex> predicate)
public Edge getSingleAdjacentEdge(Vertex from, java.util.function.Predicate<Edge> predicate)
public java.util.List<Edge> getEdges()
public java.util.List<Vertex> getVertices()
public void setVertices(java.util.List<Vertex> vertices)
public void addType(java.lang.String name, Vertex vertex)
public void addDirective(java.lang.String name, Vertex vertex)
public Vertex getType(java.lang.String name)
public Vertex getDirective(java.lang.String name)
public java.util.Optional<Vertex> findTargetVertex(Vertex from, java.util.function.Predicate<Vertex> vertexPredicate)
public int size()
public java.util.List<Vertex> addIsolatedVertices(int count, java.lang.String debugPrefix)
public Vertex getAppliedDirectiveForAppliedArgument(Vertex appliedArgument)
public Vertex getAppliedDirectiveContainerForAppliedDirective(Vertex appliedDirective)
public int getAppliedDirectiveIndex(Vertex appliedDirective)