Class Node
java.lang.Object
org.geneontology.obographs.core.model.AbstractNode
org.geneontology.obographs.core.model.Node
- All Implemented Interfaces:
Comparable<AbstractNode>,NodeOrEdge
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class Node
extends AbstractNode
A graph node corresponds to a class, individual or property

- Author:
- cjm
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.geneontology.obographs.core.model.AbstractNode
AbstractNode.PropertyType, AbstractNode.RDFTYPES -
Field Summary
Fields inherited from interface org.geneontology.obographs.core.model.NodeOrEdge
EMPTY_META -
Method Summary
Modifier and TypeMethodDescriptionstatic NodecopyOf(AbstractNode instance) Creates an immutable copy of aAbstractNodevalue.booleanThis instance is equal to all instances ofNodethat have equal attribute values.getId()getLabel()getMeta()getType()inthashCode()Computes a hash code from attributes:meta,id,label,type,propertyType.toString()Prints the immutable valueNodewith attribute values.final NodeCopy the current immutable object by setting a value for theidattribute.final NodeCopy the current immutable object by setting a value for thelabelattribute.final NodeCopy the current immutable object by setting a value for themetaattribute.final NodeCopy the current immutable object by setting a value for thepropertyTypeattribute.final NodewithType(AbstractNode.RDFTYPES value) Copy the current immutable object by setting a value for thetypeattribute.Methods inherited from class org.geneontology.obographs.core.model.AbstractNode
compareTo
-
Method Details
-
getMeta
- Returns:
- the meta
-
getId
- Overrides:
getIdin classAbstractNode- Returns:
- The value of the
idattribute
-
getLabel
- Overrides:
getLabelin classAbstractNode- Returns:
- The value of the
labelattribute
-
getType
- Specified by:
getTypein classAbstractNode- Returns:
- The value of the
typeattribute
-
getPropertyType
- Specified by:
getPropertyTypein classAbstractNode- Returns:
- The value of the
propertyTypeattribute
-
withMeta
Copy the current immutable object by setting a value for themetaattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for meta (can benull)- Returns:
- A modified copy of the
thisobject
-
withId
Copy the current immutable object by setting a value for theidattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id- Returns:
- A modified copy of the
thisobject
-
withLabel
Copy the current immutable object by setting a value for thelabelattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for label- Returns:
- A modified copy of the
thisobject
-
withType
Copy the current immutable object by setting a value for thetypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type (can benull)- Returns:
- A modified copy of the
thisobject
-
withPropertyType
Copy the current immutable object by setting a value for thepropertyTypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for propertyType (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofNodethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:meta,id,label,type,propertyType. -
toString
Prints the immutable valueNodewith attribute values. -
copyOf
Creates an immutable copy of aAbstractNodevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable Node instance
-