com.ibm.mm.sdk.common

Class DKLink

  1. java.lang.Object
  2. extended bycom.ibm.mm.sdk.common.DKLink
All implemented interfaces:
java.io.Serializable

  1. public class DKLink
  2. extends java.lang.Object
  3. implements java.io.Serializable
A DKLink object represents an instance of a one to one relationship between two objects, a source and a target object. The link relationship has a name, an identifier, for example, "contains", "has", etc. A link relationship can also have some other optional properties or attributes which further describes this relationship. These properties are kept in an object called link item, which is usually another DDO.

Usually, the source and target objects are both DDOs, representing items. For example, if the link type name is "contains" then it would be reasonable to interpret this as container-containee relationship, that is the source item contains the target item. It could also mean a folder-document relationship, where the folder contains the document.

A link type name is the name by which links are categorized and grouped and often describe a meaningful relationship. Depending on the backend, the link type names used may be required to be a valid name defined first in a link type definition object, such as DKLinkTypeDefICM.

See Also:
Serialized Form

Constructor Summary

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

Modifier and Type Method and Description
  1. dkDataObject
getLinkItem()
Gets the link item object
  1. dkDataObject
getSource()
Gets the link source object
  1. dkDataObject
getTarget()
Gets the link target object
  1. java.lang.String
getTypeName()
Gets the link type name
  1. void
setLinkItem(dkDataObject linkItem)
Sets the link item object.
  1. void
setSource(dkDataObject source)
Sets the link source object
  1. void
setTarget(dkDataObject target)
Sets the link target object
  1. 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.
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

  1. public DKLink()
Constructs a link object

  1. public DKLink(java.lang.String typeName,
  2. dkDataObject source,
  3. dkDataObject target)
Constructs a link object and initialize it with the type name, the source and target objects.
Parameters:
typeName - link type name, an identifier, for example "contains".
source - data object for the source of the link.
target - target data object for the target of the link.

  1. public DKLink(java.lang.String typeName,
  2. dkDataObject source,
  3. dkDataObject target,
  4. 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 - link type name
source - data object for the source of the link.
target - data object for the target of the link.
linkItem - I suggest adding more information to the "linkItem" option: Data object containing Optional properties or attributes that further describe the relationship.

For more information about these parameters, see the description in the beginning of this class.

Method Detail

getTypeName

  1. public java.lang.String getTypeName( )
Gets the link type name
Returns:
the link type name

setTypeName

  1. 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. Depending on the backend, the link type names used may be required to be a valid name defined first in a link type definition object, such as DKLinkTypeDefICM.
Parameters:
typeName - link type name

getSource

  1. public dkDataObject getSource()
Gets the link source object
Returns:
Returns the data object for the source of the link if it has been specified in this DKLink object. Null will be returned if it has not been specified.

setSource

  1. public void setSource(dkDataObject source)
Sets the link source object
Parameters:
source - data object for the source of the link.

getTarget

  1. public dkDataObject getTarget()
Gets the link target object
Returns:
Returns the data object for the target of the link if it has been specified in this DKLink object. Null will be returned if it has not been specified.

setTarget

  1. public void setTarget(dkDataObject target)
Sets the link target object
Parameters:
target - data object for the target of the link.

getLinkItem

  1. public dkDataObject getLinkItem( )
Gets the link item object
Returns:
Returns the data object for the link item of the link if it has been specified in this DKLink object. Null will be returned if it has not been specified.

setLinkItem

  1. public void setLinkItem(dkDataObject linkItem)
Sets the link item object. This object is optional in a link.
Parameters:
linkItem - link item object. option: Optional data object containing properties or attributes that further describe the relationship.