Enterprise Information Portal APIs

com.ibm.mm.sdk.common
Class DKLink

java.lang.Object
  |
  +--com.ibm.mm.sdk.common.DKLink
All Implemented Interfaces:
DKConstant, DKMessageId, java.io.Serializable

public class DKLink
extends java.lang.Object
implements DKConstant, DKMessageId, java.io.Serializable

A DKLink object represents an instance of 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.

See Also:
Serialized Form

Fields inherited from interface com.ibm.mm.sdk.common.DKConstant
    For details, see the class or interface
 
Fields inherited from interface com.ibm.mm.sdk.common.DKMessageId
    For details, see the class or interface
 
Constructor Summary
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
 dkDataObject getLinkItem()
          Gets the link item object
 dkDataObject getSource()
          Gets the link source object
 dkDataObject getTarget()
          Gets the link target object
 java.lang.String getTypeName()
          Gets the link type name
 void setLinkItem(dkDataObject linkItem)
          Sets the link item object.
 void setSource(dkDataObject source)
          Sets the link source object
 void setTarget(dkDataObject target)
          Sets the link target object
 void setTypeName(java.lang.String typeName)
          Sets the link type name
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 - link type name, an identifier, for example "contains".
source - link source
target - link target

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 - link type name
source - link source
target - link target
linkItem - link item

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

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
Parameters:
typeName - link type name

getSource

public dkDataObject getSource()
Gets the link source object
Returns:
the link source object, or null

setSource

public void setSource(dkDataObject source)
Sets the link source object
Parameters:
source - link source object

getTarget

public dkDataObject getTarget()
Gets the link target object
Returns:
the link target object, or null

setTarget

public void setTarget(dkDataObject target)
Sets the link target object
Parameters:
target - link target object

getLinkItem

public dkDataObject getLinkItem()
Gets the link item object
Returns:
the link item object, or null

setLinkItem

public void setLinkItem(dkDataObject linkItem)
Sets the link item object. This object is optional in a link.
Parameters:
linkItem - link item object

EIP Java APIs

(c) Copyright International Business Machines Corporation 1996, 2002. IBM Corp. All rights reserved.