Class SerializationSpecification
- java.lang.Object
-
- com.graphaware.common.representation.SerializationSpecification
-
public class SerializationSpecification extends Object
Specification of what to include an API output.
-
-
Constructor Summary
Constructors Constructor Description SerializationSpecification()
Construct a new spec: Return all node and relationship properties.SerializationSpecification(String[] nodeProperties, String[] relationshipProperties)
Construct a new spec.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]
getNodeProperties()
Get the node properties to be included in the output.String[]
getRelationshipProperties()
Get the relationship properties to be included in the output.void
setNodeProperties(String[] nodeProperties)
Set the node properties to be included in the output.void
setRelationshipProperties(String[] relationshipProperties)
Set the relationship properties to be included in the output.
-
-
-
Constructor Detail
-
SerializationSpecification
public SerializationSpecification()
Construct a new spec: Return all node and relationship properties.
-
SerializationSpecification
public SerializationSpecification(String[] nodeProperties, String[] relationshipProperties)
Construct a new spec.- Parameters:
nodeProperties
- keys of node properties to be included in the output. If the property doesn't exist for a node, nothing happens (i.e. it will not appear in the output in any form).null
means all, empty array means none.relationshipProperties
- keys of relationship properties to be included in the output. If the property doesn't exist for a relationship, nothing happens (i.e. it will not appear in the output in any form).null
means all, empty array means none.
-
-
Method Detail
-
getNodeProperties
public String[] getNodeProperties()
Get the node properties to be included in the output.- Returns:
- keys of node properties to be included. If the property doesn't exist for a node, nothing happens (i.e. it will not appear in the output in any form).
-
setNodeProperties
public void setNodeProperties(String[] nodeProperties)
Set the node properties to be included in the output.- Parameters:
nodeProperties
- keys of node properties to be included. If the property doesn't exist for a node, nothing happens (i.e. it will not appear in the output in any form).null
means all, empty array means none.
-
getRelationshipProperties
public String[] getRelationshipProperties()
Get the relationship properties to be included in the output.- Returns:
- keys of relationship properties to be included. If the property doesn't exist for a relationship, nothing happens (i.e. it will not appear in the output in any form).
-
setRelationshipProperties
public void setRelationshipProperties(String[] relationshipProperties)
Set the relationship properties to be included in the output.- Parameters:
relationshipProperties
- keys of relationship properties to be included. If the property doesn't exist for a relationship, nothing happens (i.e. it will not appear in the output in any form).null
means all, empty array means none.
-
-