Class Node.Builder
- java.lang.Object
-
- org.geneontology.obographs.core.model.Node.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Nodebuild()Builds a newNode.Node.Builderfrom(AbstractNode instance)Fill a builder with attribute values from the providedorg.geneontology.obographs.core.model.AbstractNodeinstance.Node.Builderfrom(NodeOrEdge instance)Fill a builder with attribute values from the providedorg.geneontology.obographs.core.model.NodeOrEdgeinstance.Node.Builderid(String id)Initializes the value for theidattribute.Node.Builderlabel(String label)Initializes the value for thelabelattribute.Node.Buildermeta(Meta meta)Initializes the value for themetaattribute.Node.Buildertype(AbstractNode.RDFTYPES type)Initializes the value for thetypeattribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final Node.Builder from(AbstractNode instance)
Fill a builder with attribute values from the providedorg.geneontology.obographs.core.model.AbstractNodeinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final Node.Builder from(NodeOrEdge instance)
Fill a builder with attribute values from the providedorg.geneontology.obographs.core.model.NodeOrEdgeinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
meta
@CanIgnoreReturnValue public final Node.Builder meta(@Nullable Meta meta)
Initializes the value for themetaattribute.- Parameters:
meta- The value for meta (can benull)- Returns:
thisbuilder for use in a chained invocation
-
id
@CanIgnoreReturnValue public final Node.Builder id(String id)
Initializes the value for theidattribute.If not set, this attribute will have a default value as returned by the initializer of
id.- Parameters:
id- The value for id- Returns:
thisbuilder for use in a chained invocation
-
label
@CanIgnoreReturnValue public final Node.Builder label(String label)
Initializes the value for thelabelattribute.If not set, this attribute will have a default value as returned by the initializer of
label.- Parameters:
label- The value for label- Returns:
thisbuilder for use in a chained invocation
-
type
@CanIgnoreReturnValue public final Node.Builder type(@Nullable AbstractNode.RDFTYPES type)
Initializes the value for thetypeattribute.- Parameters:
type- The value for type (can benull)- Returns:
thisbuilder for use in a chained invocation
-
build
public Node build()
Builds a newNode.- Returns:
- An immutable instance of Node
- Throws:
IllegalStateException- if any required attributes are missing
-
-