com.ibm.mm.sdk.common
Class DKLink
- java.lang.Object
-
- com.ibm.mm.sdk.common.DKLink
-
public class DKLink extends java.lang.ObjectRepresents a link between two CM8 data objects.A link establishes a relationship between a source object and a target object, with an optional link item that can carry additional metadata about the relationship. Links are typed, allowing different kinds of relationships to be represented.
Link Components:
- Type Name: Categorizes the relationship (e.g., "References", "Contains")
- Source: The originating data object
- Target: The destination data object
- Link Item: Optional object carrying relationship metadata
Example usage:
DKLink link = new DKLink("References", sourceDoc, targetDoc); link.setLinkItem(linkMetadata); // Access link components dkDataObject source = link.getSource(); dkDataObject target = link.getTarget(); String type = link.getTypeName();- See Also:
dkDataObject,DKLinkCollection
-
-
Constructor Summary
Constructors Constructor and Description DKLink()Constructs a link object.DKLink(java.lang.String typeName, dkDataObject source, dkDataObject target)Constructs a link object and initialize it with the type name, the source and target objects.DKLink(java.lang.String typeName, dkDataObject source, dkDataObject target, dkDataObject linkItem)Constructs a link object and initialize it with the type name, the source and target objects as well as the link item.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description dkDataObjectgetLinkItem()Gets the link item object.dkDataObjectgetSource()Gets the link source object.dkDataObjectgetTarget()Gets the link target object.java.lang.StringgetTypeName()Gets the link type name.voidsetLinkItem(dkDataObject linkItem)Sets the link item object.voidsetSource(dkDataObject source)Sets the link source object.voidsetTarget(dkDataObject target)Sets the link target object.voidsetTypeName(java.lang.String typeName)Sets the link type name.
-
-
-
Constructor Detail
-
DKLink
public DKLink()
Constructs a link object.
-
DKLink
public DKLink(java.lang.String typeName, dkDataObject source, dkDataObject target)Constructs a link object and initialize it with the type name, the source and target objects.- Parameters:
typeName- the link type namesource- the source data objecttarget- the target data object
-
DKLink
public DKLink(java.lang.String typeName, dkDataObject source, dkDataObject target, dkDataObject linkItem)Constructs a link object and initialize it with the type name, the source and target objects as well as the link item.- Parameters:
typeName- the link type namesource- the source data objecttarget- the target data objectlinkItem- the link item object
-
-
Method Detail
-
getTypeName
public java.lang.String getTypeName()
Gets the link type name.- Returns:
- the link type name
-
setTypeName
public void setTypeName(java.lang.String typeName)
Sets the link type name. A link type name is the name by which links are categorized and grouped and often describe a meaningful relationship.- Parameters:
typeName- the link type name to set
-
getSource
public dkDataObject getSource()
Gets the link source object.- Returns:
- the source data object
-
setSource
public void setSource(dkDataObject source)
Sets the link source object.- Parameters:
source- the source data object to set
-
getTarget
public dkDataObject getTarget()
Gets the link target object.- Returns:
- the target data object
-
setTarget
public void setTarget(dkDataObject target)
Sets the link target object.- Parameters:
target- the target data object to set
-
getLinkItem
public dkDataObject getLinkItem()
Gets the link item object.- Returns:
- the link item data object
-
setLinkItem
public void setLinkItem(dkDataObject linkItem)
Sets the link item object.- Parameters:
linkItem- the link item data object to set
-
-