|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.netflix.nfgraph.spec.NFPropertySpec
public class NFPropertySpec
This class defines a specification for a single property.
The recommended interface for creating a property is to instantiate with the flag method below. By default, anNFPropertySpec is GLOBAL, MULTIPLE, and COMPACT.
import static com.netflix.nfgraph.spec.NFPropertySpec.*;
...
NFPropertySpec spec1 = new NFPropertySpec( "property1", "foreignNodeType1", MULTIPLE | HASH );
NFPropertySpec spec2 = new NFPropertySpec( "property2", "foreignNodeType2", MULTIPLE | COMPACT | MODEL_SPECIFIC);
NFPropertySpec spec3 = new NFPropertySpec( "property2", "foreignNodeType3", SINGLE );
| Field Summary | |
|---|---|
static int |
COMPACT
A MULTIPLE property instantiated with this flag will be represented as a CompactOrdinalSet in an NFCompressedGraph. |
static int |
GLOBAL
A property spec instantiated with this flag will not be separable into connection models. |
static int |
HASH
A MULTIPLE property instantiated with this flag will be represented as a BitSetOrdinalSet in an NFCompressedGraph. |
static int |
MODEL_SPECIFIC
A property spec instantiated with this flag will be separable into connection models. |
static int |
MULTIPLE
A property spec instantiated with this flag will be allowed multiple connections. |
static int |
SINGLE
A property spec instantiated with this flag will be allowed only a single connection. |
| Constructor Summary | |
|---|---|
NFPropertySpec(java.lang.String name,
java.lang.String toNodeType,
boolean isGlobal,
boolean isMultiple,
boolean isHashed)
|
|
NFPropertySpec(java.lang.String name,
java.lang.String toNodeType,
int flags)
The recommended constructor. |
|
| Method Summary | |
|---|---|
java.lang.String |
getName()
|
int |
getPropertyIndex()
Used by the NFBuildGraph. |
java.lang.String |
getToNodeType()
|
boolean |
isCompact()
|
boolean |
isConnectionModelSpecific()
|
boolean |
isGlobal()
|
boolean |
isHashed()
|
boolean |
isMultiple()
|
boolean |
isSingle()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int GLOBAL
public static final int MODEL_SPECIFIC
public static final int MULTIPLE
public static final int SINGLE
public static final int HASH
MULTIPLE property instantiated with this flag will be represented as a BitSetOrdinalSet in an NFCompressedGraph.
BitSetOrdinalSet,
Constant Field Valuespublic static final int COMPACT
MULTIPLE property instantiated with this flag will be represented as a CompactOrdinalSet in an NFCompressedGraph.
CompactOrdinalSet,
Constant Field Values| Constructor Detail |
|---|
public NFPropertySpec(java.lang.String name,
java.lang.String toNodeType,
int flags)
name - the name of the property.toNodeType - the node type to which this property connectsflags - a bitwise-or of the various flags defined as constants in NFPropertySpec.NFPropertySpec.GLOBAL | NFPropertySpec.MULTIPLE | NFPropertySpec.COMPACT
public NFPropertySpec(java.lang.String name,
java.lang.String toNodeType,
boolean isGlobal,
boolean isMultiple,
boolean isHashed)
| Method Detail |
|---|
public boolean isConnectionModelSpecific()
public boolean isGlobal()
public boolean isMultiple()
public boolean isSingle()
public boolean isHashed()
public boolean isCompact()
public java.lang.String getName()
public java.lang.String getToNodeType()
public int getPropertyIndex()
NFBuildGraph.
It is unlikely that this method will be required externally.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||