|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.netflix.nfgraph.spec.NFGraphSpec
public class NFGraphSpec
An NFGraphSpec defines the schema for a graph. It contains a mapping of node type
name to NFNodeSpecs.
NFGraphSpec spec = new NFGraphSpec(
new NFNodeSpec(
"a",
new NFPropertySpec("a-to-one-b", "b", NFPropertySpec.SINGLE),
new NFPropertySpec("a-to-many-b", "b", NFPropertySpec.MULTIPLE | NFPropertySpec.COMPACT)
),
new NFNodeSpec(
"b",
new NFPropertySpec("b-to-many-a", "a", NFPropertySpec.MULTIPLE | NFPropertySpec.HASH)
)
);
NFNodeSpec,
NFPropertySpec| Constructor Summary | |
|---|---|
NFGraphSpec()
Instantiate a graph specification with no NFNodeSpecs. |
|
NFGraphSpec(NFNodeSpec... nodeTypes)
Instantiate a graph specification with the given NFNodeSpec. |
|
| Method Summary | |
|---|---|
void |
addNodeSpec(NFNodeSpec nodeSpec)
Add a node type to this graph specification. |
NFNodeSpec |
getNodeSpec(java.lang.String nodeType)
|
java.util.List<java.lang.String> |
getNodeTypes()
|
java.util.Iterator<NFNodeSpec> |
iterator()
Returns an Iterator over the NFNodeSpecs contained in this graph specification. |
int |
size()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NFGraphSpec()
NFNodeSpecs.
public NFGraphSpec(NFNodeSpec... nodeTypes)
NFNodeSpec.
| Method Detail |
|---|
public NFNodeSpec getNodeSpec(java.lang.String nodeType)
NFNodeSpec for the specified node type.public void addNodeSpec(NFNodeSpec nodeSpec)
public int size()
public java.util.List<java.lang.String> getNodeTypes()
List containing the names of each of the node types.public java.util.Iterator<NFNodeSpec> iterator()
Iterator over the NFNodeSpecs contained in this graph specification.
iterator in interface java.lang.Iterable<NFNodeSpec>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||