Class Relationship
- java.lang.Object
-
- org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship
-
- All Implemented Interfaces:
Serializable,OmasObject
- Direct Known Subclasses:
Antonym,Categorization,CategoryAnchor,CategoryHierarchyLink,HasA,IsA,IsATypeOf,IsATypeOfDeprecated,Leadership,LibraryCategoryReference,LibraryTermReference,MediaReference,PreferredTerm,ProjectScope,RelatedTerm,ReplacementTerm,SemanticAssignment,Synonym,TermAnchor,Translation,TypedBy,UsedInContext,ValidValue
public abstract class Relationship extends Object implements Serializable, OmasObject
A relationship between 2 subject area OMAS Nodes. It is contains named attributes and has 2 relationship ends.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected RelationshipEndend1protected RelationshipEndend2protected Stringnameprotected RelationshipTyperelationshipTypeprotected static longserialVersionUID
-
Constructor Summary
Constructors Modifier Constructor Description protectedRelationship(String name, RelationshipEnd end1, RelationshipEnd end2)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>getAdditionalProperties()Get the extra attributes - ones that are in addition to the standard types.LonggetEffectiveFromTime()Return the date/time that this relationship should start to be used (null means it can be used from creationTime).LonggetEffectiveToTime()Return the date/time that this relationship should no longer be used.RelationshipEndgetEnd1()Get relationship end 1.RelationshipEndgetEnd2()Get relationship end 1.StringgetGuid()StringgetName()RelationshipTypegetRelationshipType()SystemAttributesgetSystemAttributes()protected voidinitialise()booleanisReadOnly()The relationship is readOnlyvoidsetAdditionalProperties(Map<String,String> additionalProperties)voidsetEffectiveFromTime(Long effectiveFromTime)voidsetEffectiveToTime(Long effectiveToTime)voidsetEnd1(RelationshipEnd end1)voidsetEnd2(RelationshipEnd end2)voidsetGuid(String guid)voidsetReadOnly(boolean readOnly)set whether the relationship is readOnlyvoidsetRelationshipType(RelationshipType relationshipType)voidsetSystemAttributes(SystemAttributes systemAttributes)StringtoString()StringBuildertoString(StringBuilder sb)
-
-
-
Field Detail
-
serialVersionUID
protected static final long serialVersionUID
- See Also:
- Constant Field Values
-
relationshipType
protected RelationshipType relationshipType
-
name
protected String name
-
end1
protected RelationshipEnd end1
-
end2
protected RelationshipEnd end2
-
-
Constructor Detail
-
Relationship
protected Relationship(String name, RelationshipEnd end1, RelationshipEnd end2)
-
-
Method Detail
-
initialise
protected void initialise()
-
getRelationshipType
public RelationshipType getRelationshipType()
-
setRelationshipType
public void setRelationshipType(RelationshipType relationshipType)
-
getSystemAttributes
public SystemAttributes getSystemAttributes()
-
setSystemAttributes
public void setSystemAttributes(SystemAttributes systemAttributes)
-
getEffectiveFromTime
public Long getEffectiveFromTime()
Return the date/time that this relationship should start to be used (null means it can be used from creationTime).- Returns:
- Date the relationship becomes effective.
-
setEffectiveFromTime
public void setEffectiveFromTime(Long effectiveFromTime)
-
getEffectiveToTime
public Long getEffectiveToTime()
Return the date/time that this relationship should no longer be used.- Returns:
- Date the relationship stops being effective.
-
setEffectiveToTime
public void setEffectiveToTime(Long effectiveToTime)
-
getGuid
public String getGuid()
-
setGuid
public void setGuid(String guid)
-
getName
public String getName()
-
getAdditionalProperties
public Map<String,String> getAdditionalProperties()
Get the extra attributes - ones that are in addition to the standard types.- Returns:
- extra attributes
-
setAdditionalProperties
public void setAdditionalProperties(Map<String,String> additionalProperties)
-
getEnd1
public RelationshipEnd getEnd1()
Get relationship end 1. The child relationship sets the appropriate values for its relationship end 1- Returns:
- RelationshipEnd relationship end 1
-
setEnd1
public void setEnd1(RelationshipEnd end1)
-
getEnd2
public RelationshipEnd getEnd2()
Get relationship end 1. The child relationship sets the appropriate values for its relationship end 1- Returns:
- RelationshipEnd relationship end 1
-
setEnd2
public void setEnd2(RelationshipEnd end2)
-
isReadOnly
public boolean isReadOnly()
The relationship is readOnly- Returns:
- whether read only
-
setReadOnly
public void setReadOnly(boolean readOnly)
set whether the relationship is readOnly- Parameters:
readOnly- readonly flag
-
toString
public StringBuilder toString(StringBuilder sb)
-
-