Enterprise Information Portal APIs

com.ibm.mm.sdk.common
Class DKAttrDefICM

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

public class DKAttrDefICM
extends dkAbstractAttrDef
implements java.io.Serializable

This class is used to represent attribute definition in Content Manager Server. It has basic properties, such as, name, description, nullability, text-searchability, and so forth. Persistent operations on attribute definition are also supported via add, update, and delete methods. Attributes in Content Manager are created as independent objects and have generic properties. When creating an item-type, the user decides which attributes to include into this item-type. Once an attribute is included in an item-type, it can have specific properties for this particular item-type. For example, the attribute ISBN under item-type Journal is set to nullable, but under item-type Book, it is non-nullable. Such specific properties includes nullable, readable, writable, text-searchable, Uniqueness, RM attribute, excludeRow, representative property, etc. See DKItemTypeDefICM for the definition of the item-type, and DKItemTypeViewDefICM for the definition of item-type view. Attriubtes can be used to compose attribute groups. See DKAttrGroupDefICM for the definition of the attribute group.

Since:
Version 8
See Also:
Serialized Form

Field Summary
 short _groupSeqNo
           
static short DK_ATTR_TYPE_DEFAULT_DECIMAL
           
static short DK_ATTR_TYPE_DEFAULT_FLOAT
           
static short DK_ATTR_TYPE_DEFAULT_HEXSTRING
           
static short DK_ATTR_TYPE_DEFAULT_INTEGER
           
static short DK_ATTR_TYPE_DEFAULT_OTHER
           
static short DK_ATTR_TYPE_DEFAULT_STRING
           
static short DK_ATTR_TYPE_DEFAULT_UNDEFINED
           
 
Fields inherited from interface com.ibm.mm.sdk.common.DKMessageId
    For details, see the class or interface
 
Constructor Summary
DKAttrDefICM()
          Constructs an attribute definition for ICM datastore
DKAttrDefICM(DKAttrDefICM attr)
          A copy constructor for attribute definition for ICM datastore
DKAttrDefICM(dkDatastore ds)
          Constructs an attribute definition for the given ICM datastore
 
Method Summary
 void add()
          Adds this attribute definition to the persistent store
 void del()
          Deletes this attribute definition from the persistent store.
 short getAttrFlag()
          Gets the attribute flag information for this attribute
 java.lang.String getAttrGroupMemberName()
          Gets the attribute name only.
 java.lang.String getAttrGroupName()
          Gets group name in which this attribute belongs to
 short getAttrViewFlag()
          Gets the attribute view flag information.
 int getComponentViewId()
          Gets the component type view identifier to which this attribute belongs This methods is only applicable if this attribute is a part of a component type view.
 short getDefaultType()
          Gets the default type for this attribute.
 java.lang.String getDefaultValue()
          Gets the default value for this attribute.
 java.lang.String getDescription(java.lang.String langCode)
          Gets the attribute description in the given language
 int getEntityId()
          Returns the identifier of the item type in which this attribute belongs
 int getGroupId()
          Get the group identifier for this attribute Returns zero, if this attribute is not part of an attribute group.
 int getGroupMemberId()
          Gets the attribute identifier.
 short getIndexOrder()
          Gets the index order information for this attribute The valid values are: DKConstantICM.DK_ICM_INDEX_FLAG_ASCENDING: Gets attribute index in ascending order DKConstantICM.DK_ICM_INDEX_FLAG_DESCENDING: Gets attribute index in desceding order
 int getIntId()
          Gets the integer identifier for this attribute.
 java.lang.String getName()
          Gets the attribute name or its composite name.
 java.lang.String getQualifiedName()
          Gets the qualified name of this attribute.
 int getStringType()
          Gets the string type value for this attribute override getStringType in class dkAbstractAttrDef
 DKTextIndexDefICM getTextIndexDef()
          Gets the text search index definition for this attribute.
 int getUserFlag()
          Gets the user flag The returned value will be one of the following: DK_CM_ATTR_ALPHA: The string contains alphabetic characters only DK_CM_ATTR_ALPHANUM: The string contains alpha-numeric characters DK_CM_ATTR_ALPHANUM_EXT: The string contains alpha-numeric and other special characters DK_CM_ATTR_NUMERIC: The string only contains numeric characters DK_CM_ATTR_OTHER: The string may follows application defined rules and the interpretation is left to the application
 java.lang.String getViewCompareValue()
          Gets the compare value associated with the view operator for the component view where this attribute belongs.
 short getViewOperator()
          Gets the view operator for the component view where this attribute belongs.
 short getViewSequenceNo()
          Gets the position number of this attribute in this component view This helps user application display attributes in order of perference.
 boolean isExcludeRow()
          Returns true if this attribute is used in an expression to filter unwanted component instances in component type view definition.
 boolean isNullable()
          Checks if this attribute is nullable.
 boolean isReadable()
          Returns true if this attribute is readable.
 boolean isRepresentative()
          Returns true if this attribute is a representative attribute for this item-type.
 boolean isRMAttr()
          Checks if this attribute is a resource manager attribute.
 boolean isTextSearchable()
          Returns true if this attribute is text searchable.
 boolean isUnique()
          Returns true if this attribute value is always unique in this item-type.
 boolean isWriteable()
          Returns true if this attribute is writeable.
 java.lang.String[] parseQualifiedName()
          Parses the qualified name of this attribute into an array of its parts.
 java.lang.String[] parseQualifiedName(java.lang.String qualifiedName)
          Parses the given qualified name into an array of its parts For example, a qualified name "chapter/section/SectionName" parses to a string array {"chapter", "section", "SectionName"}.
 void setAttrFlag(short attrFlag)
          Sets attribute flag information for this attribute
 void setAttrGroupMemberName(java.lang.String attrGroupMemName)
          Sets the attribute name only.
 void setAttrGroupName(java.lang.String attrGroupName)
          Sets group name in which this attribute belongs to
 void setAttrViewFlag(short attrViewFlag)
          Sets the attribute view flag to the given bit conbinations.
 void setComponentViewId(int compViewId)
          Sets the component view identifier to which this attribute belongs
 void setDefaultType(short defaultType)
          Sets the default type for this attribute.
 void setDefaultValue(java.lang.String defaultValue)
          Sets the default value for this attribute.
 void setDescription(java.lang.String desc, java.lang.String langCode)
          Sets the attribute description for the given language.
 void setExcludeRow(boolean isExcludeRow)
          Sets the excludeRow property of this attribute to true or false.
 void setIndexOrder(short indexOrder)
          Sets the index order information for this attribute
 void setName(java.lang.String attrName)
          Sets the attribute name or its composite name.
 void setNullable(boolean nullable)
          Sets the nullability property of this attribute.
 void setQualifiedName(java.lang.String fullQualifyName)
          Sets the qualified name for this attribute.
 void setReadable(boolean readable)
          Sets the readable property of this attribute to true or false.
 void setRepresentative(boolean isRepresentative)
          Set the representative property of this attribute to true or false.
 void setRMAttr(boolean rmAttr)
          Sets the resource manager property of this attribute to a boolean value true or false.
 void setStringType(int stringType)
          Sets the string type value for this attribute
 void setTextIndexDef(DKTextIndexDefICM textIndexDef)
          Sets the text search index definition for this attribute.
 void setTextSearchable(boolean textSearchable)
          Makes this attribute text searchable or non-text searchable.
 void setUnique(boolean unique)
          Sets the uniqueness property of this attribute value.
 void setUserFlag(int userFlag)
          Sets the user flag information for the attribute
 void setViewCompareValue(java.lang.String viewCompareValue)
          Sets the compare value associated with the view operator for the component view where this attribute belongs.
 void setViewOperator(short viewOperator)
          Sets the view operator for the component view where this attribute belongs Only DKConstant.DK_CM_OPCODE_EQ is supported in this release.
 void setViewSequenceNo(short viewSeqno)
          Sets the position number for this attribute in this component view
 void setWriteable(boolean writeable)
          Sets writeable property of this attribute to true or false.
 void update()
          Updates this attribute definition in the persistent store.
 
Methods inherited from class com.ibm.mm.sdk.common.dkAbstractAttrDef
datastoreName, datastoreType, getDatastore, getDescription, getEntity, getEntityName, getMax, getMin, getPrecision, getScale, getSize, getType, isQueryable, isUpdatable, parsedQualifiedName, setDatastore, setDescription, setEntity, setEntityName, setMax, setMin, setPrecision, setQueryable, setScale, setSize, setType, setUpdatable
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DK_ATTR_TYPE_DEFAULT_UNDEFINED

public static final short DK_ATTR_TYPE_DEFAULT_UNDEFINED

DK_ATTR_TYPE_DEFAULT_STRING

public static final short DK_ATTR_TYPE_DEFAULT_STRING

DK_ATTR_TYPE_DEFAULT_FLOAT

public static final short DK_ATTR_TYPE_DEFAULT_FLOAT

DK_ATTR_TYPE_DEFAULT_DECIMAL

public static final short DK_ATTR_TYPE_DEFAULT_DECIMAL

DK_ATTR_TYPE_DEFAULT_INTEGER

public static final short DK_ATTR_TYPE_DEFAULT_INTEGER

DK_ATTR_TYPE_DEFAULT_HEXSTRING

public static final short DK_ATTR_TYPE_DEFAULT_HEXSTRING

DK_ATTR_TYPE_DEFAULT_OTHER

public static final short DK_ATTR_TYPE_DEFAULT_OTHER

_groupSeqNo

public short _groupSeqNo
Constructor Detail

DKAttrDefICM

public DKAttrDefICM()
Constructs an attribute definition for ICM datastore

DKAttrDefICM

public DKAttrDefICM(dkDatastore ds)
Constructs an attribute definition for the given ICM datastore
Parameters:
ds - - an ICM datastore

DKAttrDefICM

public DKAttrDefICM(DKAttrDefICM attr)
A copy constructor for attribute definition for ICM datastore
Parameters:
attr - a DKAttrDefICM object
Method Detail

add

public void add()
         throws DKException,
                java.lang.Exception
Adds this attribute definition to the persistent store
Overrides:
add in class dkAbstractAttrDef
Throws:
if - an error occurs such as the name of the DKAttrDefICM object contains invalid characters. See setAttrGroupMemberName() for the detail information

del

public void del()
         throws DKException,
                java.lang.Exception
Deletes this attribute definition from the persistent store. This attribute can not be associated with an existing item-type, otherwise the delete operation will throw an exception.
Overrides:
del in class dkAbstractAttrDef
Throws:
if - tries to delete an attribute that already associates with an item type or delete an attribute that does not exist in the persistent store

update

public void update()
            throws DKException,
                   java.lang.Exception
Updates this attribute definition in the persistent store. You can not update an attribute if it is aleady assoicated with an item-type
Throws:
if - tries to update an attribute that already associates with an item type or update an attribute that does not exist in the persistent store

getIntId

public int getIntId()
Gets the integer identifier for this attribute. If this attribute is a part of an attribute group, then it will return 10 digits integer with the following values from right to left: bit 0 - bit 4 represents the attribute identifier bit 5 - bit 9 represents the group identifier, for example, if the return value is 100401001, 1004 indicates group identifier and 1001 indicates the attribute identifier. If this attribute doesn't belong to any group, then the call only returns attribute ID
Returns:
an integer attribute identifier as described above

getGroupId

public int getGroupId()
Get the group identifier for this attribute Returns zero, if this attribute is not part of an attribute group.
Returns:
an integer group identifier, or zero if this attribute is not part of a group.

getGroupMemberId

public int getGroupMemberId()
Gets the attribute identifier. Always return the attribute identifier only without the group identifier even if this attribute is a part of an attribute group.
Returns:
the attribute identifier
See Also:
getIntId(), getGroupId()

getEntityId

public int getEntityId()
                throws DKException,
                       java.lang.Exception
Returns the identifier of the item type in which this attribute belongs
Returns:
an item type identifier
Throws:
DKException - , Exception

setUserFlag

public void setUserFlag(int userFlag)
Sets the user flag information for the attribute
Parameters:
we - use this field to set the string type for the varchar or char attribute, either numeric, alphabetic, alpanumeric, etc. The valid user flags :
  • DK_CM_ATTR_ALPHA: The string contains alphabetic characters only
  • DK_CM_ATTR_ALPHANUM: The string contains alpha-numeric characters
  • DK_CM_ATTR_ALPHANUM_EXT: The string contains alpha-numeric and other special characters
  • DK_CM_ATTR_NUMERIC: The string only contains numeric characters
  • DK_CM_ATTR_OTHER: The string may follows application defined rules and the interpretation is left to the application

getUserFlag

public int getUserFlag()
Gets the user flag The returned value will be one of the following:

getStringType

public int getStringType()
Gets the string type value for this attribute override getStringType in class dkAbstractAttrDef
Overrides:
getStringType in class dkAbstractAttrDef
Returns:
the string type for this attribute, either numeric, alphabetic, alpanumeric, etc. The valid value is one of the following constants :
  • DK_CM_ATTR_ALPHA: The string contains alphabetic characters only
  • DK_CM_ATTR_ALPHANUM: The string contains alpha-numeric characters
  • DK_CM_ATTR_ALPHANUM_EXT: The string contains alpha-numeric and other special characters
  • DK_CM_ATTR_NUMERIC: The string only contains numeric characters
  • DK_CM_ATTR_OTHER: The string may follows application defined rules and the interpretation is left to the application

setStringType

public void setStringType(int stringType)
Sets the string type value for this attribute
Overrides:
setStringType in class dkAbstractAttrDef
Parameters:
stringType - the string type for this attribute. The valid value is one of the following constants : See the method getStringType() in this class to find more information on the valid values for string type.

getAttrGroupName

public java.lang.String getAttrGroupName()
Gets group name in which this attribute belongs to
Returns:
the attribute group name if this attribute belongs to a group, otherwise it returns an empty string

setAttrGroupName

public void setAttrGroupName(java.lang.String attrGroupName)
Sets group name in which this attribute belongs to
Parameters:
attrGroupName - - The attribute group name. This method is valid only if this attribute is a part of an attribute group. The valid characters of attribute group name are: 'a'-'z', 'A'-'Z', '0'-'9', '_','$', '#','@' Attribute group name can not begin with '0'-'9, '_', and the length of the name can not exceed 15 characters.

getName

public java.lang.String getName()
Gets the attribute name or its composite name. Composite name is in form of . format. For exampl, if an attribute "attr" is a part of an attribute group "group", then the composite name is "group.attr". Returns an attribute name if the attribute is not a part of an attribute group override getName in class dkAbstractAttrDef
Overrides:
getName in class dkAbstractAttrDef
Returns:
the attribute composite name or the attribute name.

setName

public void setName(java.lang.String attrName)
Sets the attribute name or its composite name. Composite name is in form of . format. If this attribute is not a part of an attribute group, then name is attribute name only. The valid characters of attribute group name are: 'a'-'z', 'A'-'Z', '0'-'9', '_','$', '#','@' Attribute group name can not begin with '0'-'9, '_', and the length of the name can not exceed 15 characters. override setName in class dkAbstractAttrDef
Overrides:
setName in class dkAbstractAttrDef
Parameters:
attrName - - the attribute name or composite name according to the format and explanation above
See Also:
getName()

getAttrGroupMemberName

public java.lang.String getAttrGroupMemberName()
Gets the attribute name only. It returns the attribute name only without the group name even if this attribute is a part of an attribute group.
Returns:
the attribute Name

setAttrGroupMemberName

public void setAttrGroupMemberName(java.lang.String attrGroupMemName)
Sets the attribute name only. The input parameter should be the attribute name only, not the composite name. The valid characters are: 'a'-'z', 'A'-'Z', '0'-'9', '_','$', '#','@' Attribute name can not begin with '0'-'9, '_', and the length of the name can not exceed 15 characters.
Parameters:
attribute - name

getDefaultType

public short getDefaultType()
Gets the default type for this attribute. Valid default types are:
Returns:
the default value type for this attribute
See Also:
setDefaultType(short)

setDefaultType

public void setDefaultType(short defaultType)
Sets the default type for this attribute. See the method getDefaultType() in this class to find more information on the valid values for default type.
Parameters:
defaultType - - the default type for this attribute

getDefaultValue

public java.lang.String getDefaultValue()
Gets the default value for this attribute. This method is only valid if a default type is specified for this attribute The default value of the numeric data type is 0. The default value of the fixed-length string data type is blanks. The default value of varying-length string data type is a string length of 0 The default value of date data type is the current date The default value of time data type is the current time The default value of timestamp data type is the current timestamp
Returns:
the default value for this attribute.
See Also:
setDefaultValue(String)

setDefaultValue

public void setDefaultValue(java.lang.String defaultValue)
Sets the default value for this attribute. This method is only valid if a default type is specified for this attribute. See the method getDefaultValue()in this class to find more information on the valid values for default value.
Parameters:
defaultValue - the default value for this attribute.

getTextIndexDef

public DKTextIndexDefICM getTextIndexDef()
Gets the text search index definition for this attribute. Returns null if this attribute is not defined as text searchable.
Returns:
the text search index definition object containing text indexing information, or null
See Also:
setTextIndexDef(com.ibm.mm.sdk.common.DKTextIndexDefICM), isTextSearchable()

setTextIndexDef

public void setTextIndexDef(DKTextIndexDefICM textIndexDef)
Sets the text search index definition for this attribute. Setting this value to null will remove the text index, as a result, it will make this attribute non text searchable. Only attriubtes with type string can be made text searchable.
Parameters:
textIndexDef - the text search index definition object containing the text indexing information.
Throws:
fi - the attribute type is not string see #getTextIndexDef() see #isTextSearchable()

isNullable

public boolean isNullable()
Checks if this attribute is nullable. The default setting for an attribute is not nullable. that is, the attribute can not have a null value. override isNullable in class dkAbstractAttrDef
Overrides:
isNullable in class dkAbstractAttrDef
Returns:
true, if this attribute is nullable

setNullable

public void setNullable(boolean nullable)
Sets the nullability property of this attribute. The boolean value true will set this this attribute to nullable, that is, it can have a null value. You can only set this property when you include this attribute as part of an item type definition. In different item-types, an attribute can be set to nullable in item-type Journal, but set to non-nullalbe in item-type Book. override setNullable in class dkAbstractAttrDef
Overrides:
setNullable in class dkAbstractAttrDef
Parameters:
nullable - - true or false, to indicate that this attribute can have a null value, or must have a non-null value
See Also:
isNullable()

isUnique

public boolean isUnique()
Returns true if this attribute value is always unique in this item-type. The default value is false
Returns:
boolean value true or false
See Also:
setUnique(boolean)

setUnique

public void setUnique(boolean unique)
Sets the uniqueness property of this attribute value. The boolean value true will set this attribute to always have unique value. You can only set this property when you include this attribute as part of an item type definition. In different item-types, an attribute can have different setting for unique property. For example, this attribute can be set to unique in item-type Journal, but set to non-unique in item-type Book.
Parameters:
unique - - true or false, to indicate that this attribute is unique or not unique
See Also:
isUnique()

isRMAttr

public boolean isRMAttr()
Checks if this attribute is a resource manager attribute. Returns true if this attribute is associated with a resource object stored in the resource manager. The default value is false, which means that this attribute is a regular attribute, not associated with a resource object.
Returns:
true or false
See Also:
setRMAttr(boolean)

setRMAttr

public void setRMAttr(boolean rmAttr)
Sets the resource manager property of this attribute to a boolean value true or false. True indicates that this attribute is assoicated with a resource object stored in the resource manager. You can only set this property when you include this attribute as part of an item type definition. The default property is false, that is, a regular attribute not assoicated with a resource object.
Parameters:
rmAttr - - a boolean value true or false
See Also:
isRMAttr()

isTextSearchable

public boolean isTextSearchable()
Returns true if this attribute is text searchable. Otherwise, returns false. The default value is non text searchable. that is, you can not specify a text search expression against this attribute. This method is only valid for attribute with type string. override isTextSearchable in class dkAbstractAttrDef
Overrides:
isTextSearchable in class dkAbstractAttrDef
Returns:
true or false. see #setTextSearchable(boolean)

setTextSearchable

public void setTextSearchable(boolean textSearchable)
Makes this attribute text searchable or non-text searchable. You can only set this property when you include this attribute as part of an item-type definition. In different item-types, an attribute can have different setting for text searchable property. For example, this attribute can be set to text searchable in item-type Journal, but set to non-text searchable in item-type Book. This method is only valid for attribute with type string. You also need to specify the text indexing properties for this attribute, see the method setTextIndexDef in this class. override setTextSearchable in class dkAbstractAttrDef
Overrides:
setTextSearchable in class dkAbstractAttrDef
Parameters:
textSearchable - - true or false, true makes this attribute text searchable
See Also:
isTextSearchable(), setTextIndexDef(com.ibm.mm.sdk.common.DKTextIndexDefICM)

getAttrFlag

public short getAttrFlag()
Gets the attribute flag information for this attribute
Returns:
short value for attrFlag User can use return value & one of the following constant value to tell this attribute's property DKConstantICM.DK_ICM_COMPONENT_ATTR_NULLABLE = x00001 DKConstantICM.DK_ICM_COMPONENT_ATTR_NOTUNIQUE = x00010 DKConstantICM.DK_ICM_COMPONENT_ATTR_RMATTR = x00100 DKConstantICM.DK_ICM_COMPONENT_ATTR_XMLATTR = x01000 DKConstantICM.DK_ICM_COMPONENT_ATTR_TEXTSEARCHABLE = x10000 For example, getAttrFlag() & DKConstantICM.DK_ICM_COMPONENT_ATTR_NULLABLE == DKConstantICM.DK_ICM_COMPONENT_ATTR_NULLABLE True indicates this attribute is nullable, otherwise this attribute is non-nullable.

setAttrFlag

public void setAttrFlag(short attrFlag)
Sets attribute flag information for this attribute
Parameters:
attrFlag - - a short value of the flags See getAttrFlag in this class to have the detail information

isReadable

public boolean isReadable()
Returns true if this attribute is readable. Otherwise, return false.
Returns:
a boolean value true or false
See Also:
setReadable(boolean)

setReadable

public void setReadable(boolean readable)
Sets the readable property of this attribute to true or false. True means that this attribute is readable
Parameters:
a - boolean value true or false. True makes this attribute readable
See Also:
isReadable()

isWriteable

public boolean isWriteable()
Returns true if this attribute is writeable. Otherwise, return false.
Returns:
a boolean value true or false, true indicates writeable.

setWriteable

public void setWriteable(boolean writeable)
Sets writeable property of this attribute to true or false. True means that this attribute is updatable, otherwise this attribute is read-only
Parameters:
writeable - a boolean true or false. True makes this attribute writeable

isRepresentative

public boolean isRepresentative()
Returns true if this attribute is a representative attribute for this item-type. If false, the attribute is not a representative attribute
Returns:
a boolean value true or false. False indicates that this attribute is not a representative attribute for this item type.

setRepresentative

public void setRepresentative(boolean isRepresentative)
Set the representative property of this attribute to true or false. True makes this attribute a representative attribute for this item-type. The default value is false. You can only set this property when you include this attribute as part of an item-type definition. If false, the attribute isnot a representative attribute.
Parameters:
isRepresentative - - a boolean value true or false. False makes this attribute non representative attribute for this item-type

isExcludeRow

public boolean isExcludeRow()
Returns true if this attribute is used in an expression to filter unwanted component instances in component type view definition. See the description of methods setViewCompareValue and setViewOperator in this class for more information on filtering instances in component view definition.
Returns:
a boolean value true or false.
See Also:
#setViewCompareValue(java.lang.string), setViewOperator(short)

setExcludeRow

public void setExcludeRow(boolean isExcludeRow)
Sets the excludeRow property of this attribute to true or false. True means that this attribute is used in an expression to filter unwanted component instances in the component view definition where this attribute belongs. False means that this attribute is not used in any expression to filter unwanted instances. See the description of methods setViewCompareValue and setViewOperator in this class for more information on filtering instances in a component view definition.
Parameters:
isExcludeRow - - a boolean true or false. The meaning is described above.
See Also:
#isExcluedRow(), setViewCompareValue(java.lang.String), setViewOperator(short)

getAttrViewFlag

public short getAttrViewFlag()
Gets the attribute view flag information. The flag indicates the properties set in this attribute, such as readable, writable, representative, excludeRow, etc. writeable, representative and exclude unwanted rows or not. User can use return value & one of the following constant value to tell this attribute's property DKConstantICM.DK_ICM_READ = x0001 DKConstantICM.DK_ICM_WRITE = x0010 DKConstantICM.DK_ICM_COMPONENT = x0100 DKConstantICM.DK_ICM_EXCLUDE_ROW = x1000 For example, getAttrViewFlag() & DKConstantICM.DK_ICM_COMPONENT == DKConstantICM.DK_ICM_COMPONENT True indicates this attribute is a representative attribute for this item-type.
Returns:
short value for attrViewFlag

setAttrViewFlag

public void setAttrViewFlag(short attrViewFlag)
Sets the attribute view flag to the given bit conbinations. See getAttrViewFlag for the detail information.
Parameters:
attrViewFlag - a short value with the desired combination of bit settings as described above

getIndexOrder

public short getIndexOrder()
Gets the index order information for this attribute The valid values are:
Returns:
a short value of the index order

setIndexOrder

public void setIndexOrder(short indexOrder)
Sets the index order information for this attribute
Parameters:
indexOrder - - the value of the index order The valid values are:
  • DKConstantICM.DK_ICM_INDEX_FLAG_ASCENDING: Gets attribute index in ascending order
  • DKConstantICM.DK_ICM_INDEX_FLAG_DESCENDING: Gets attribute index in desceding order

getViewSequenceNo

public short getViewSequenceNo()
Gets the position number of this attribute in this component view This helps user application display attributes in order of perference. This method is only applicable for component views.
Returns:
a short value of the position number of the attribute view sequence number

setViewSequenceNo

public void setViewSequenceNo(short viewSeqno)
Sets the position number for this attribute in this component view
Parameters:
viewSeqno. - User defined the order of an attribute within the component view as their perference

getQualifiedName

public java.lang.String getQualifiedName()
Gets the qualified name of this attribute. A qualified name includes the path and the name of the attribute. HTe path does not include the root component name. See the method setQualifiedName(java.lang.String) in this class for the detail format of qualified name.
Overrides:
getQualifiedName in class dkAbstractAttrDef
Returns:
a string value of the qualified name of this attribute.
See Also:
setQualifiedName(java.lang.String)

setQualifiedName

public void setQualifiedName(java.lang.String fullQualifyName)
Sets the qualified name for this attribute. A qualified name does not include the root component name. For example, if you have an item-type "book", which has a child component "chapter", which in turn has a child component "section" with attribute name "sectionName", then the qualified name of the attribute "sectionName" is "chapter/section/sectionName". If "publisherName" is an attribute in the root component "book", then the qualified name is the same "publisherName".
Overrides:
setQualifiedName in class dkAbstractAttrDef
Parameters:
fullQualifyName - - a string value of the qualified name with the format as described above.

parseQualifiedName

public java.lang.String[] parseQualifiedName(java.lang.String qualifiedName)
                                      throws DKUsageError,
                                             DKException,
                                             java.lang.Exception
Parses the given qualified name into an array of its parts For example, a qualified name "chapter/section/SectionName" parses to a string array {"chapter", "section", "SectionName"}.
Parameters:
qualifiedName - the qualified name of an attribute
Returns:
a string array of the parts
See Also:
parseQualifiedName(java.lang.String)

parseQualifiedName

public java.lang.String[] parseQualifiedName()
                                      throws DKUsageError,
                                             DKException,
                                             java.lang.Exception
Parses the qualified name of this attribute into an array of its parts.
Returns:
a string array of the parts
See Also:
parseQualifiedName(java.lang.String)

getComponentViewId

public int getComponentViewId()
Gets the component type view identifier to which this attribute belongs This methods is only applicable if this attribute is a part of a component type view.
Returns:
the component type view identifier
Throws:
if - error occurs

setComponentViewId

public void setComponentViewId(int compViewId)
Sets the component view identifier to which this attribute belongs
Parameters:
compViewId - the component type view identifier

getViewOperator

public short getViewOperator()
                      throws DKException,
                             java.lang.Exception
Gets the view operator for the component view where this attribute belongs. Only DKConstant.DK_CM_OPCODE_EQ is supported in this release. A view operator is used to create an expression to filter viewable components based on the value of this attribute. For more information about component view, see the descriptioin of method setViewCompareValue in this class.
Returns:
the component view operator. Currently, it always returns DKConstant.DK_CM_OPCODE_EQ by default.
Throws:
if - an error occurs
See Also:
getViewCompareValue(), setViewCompareValue(java.lang.String)

setViewOperator

public void setViewOperator(short viewOperator)
Sets the view operator for the component view where this attribute belongs Only DKConstant.DK_CM_OPCODE_EQ is supported in this release. Other values are ignored. The view operator is usred together with View compare value and this attribute name to construct an expression to filter viewable component instances from the component type view where this attribute belongs.
Parameters:
viewOperator - the component view operator. Currently, it only accepts DKConstant.DK_CM_OPCODE_EQ, which is the default. So, you do not need to call this method.
See Also:
getViewOperator(), setViewCompareValue(java.lang.String)

getViewCompareValue

public java.lang.String getViewCompareValue()
Gets the compare value associated with the view operator for the component view where this attribute belongs.
Returns:
the component view compare value
See Also:
setViewCompareValue(java.lang.String)

setViewCompareValue

public void setViewCompareValue(java.lang.String viewCompareValue)
Sets the compare value associated with the view operator for the component view where this attribute belongs. The view compare value is used together with view operator and this attribute name to construct an expression to filter viewable component instances from the component view where this attribute belongs. For example, when definining a component view, if you only want to view component instances having attribute "zipCode" equals to "95120", then you set the viewCompareValue to "95120". This method is only applicable if you are defining a component type view using this attribute.
Parameters:
viewCompareValue - - the attribute compare value

getDescription

public java.lang.String getDescription(java.lang.String langCode)
                                throws DKException,
                                       java.lang.Exception
Gets the attribute description in the given language
Parameters:
langCode - attribute language code. The valid language codes are: "AFR", "ARA", "BEL", "BGR", "CAT", "CHT", "CHS", "CSY", "CZE", "DAN", "DEU", "DES", "ELL", "ENA", "ENG", "ENU", "FRB", "FRC", "ENP", "ESP", "FIN", "FRA", "FRS", "GAE", "HEB", "HRV", "HUN", "ISL", "ITA", "ITS", "JPN", "KOR", "MKD", "NLD", "NLB", "NON", "NOR", "PLK", "PTB", "PTG", "RMS", "ROM", "RUS", "SKY", "SLO", "SQI", "SRB", "SRL", "SVE", "THA", "TRK", "UKR", "URD"
Returns:
attribute description in the given language

setDescription

public void setDescription(java.lang.String desc,
                           java.lang.String langCode)
                    throws DKException,
                           java.lang.Exception
Sets the attribute description for the given language.
Parameters:
desc - - the attribute description
langCode - - the attribute language code e.g. ENU The valid language codes are: "AFR", "ARA", "BEL", "BGR", "CAT", "CHT", "CHS", "CSY", "CZE", "DAN", "DEU", "DES", "ELL", "ENA", "ENG", "ENU", "FRB", "FRC", "ENP", "ESP", "FIN", "FRA", "FRS", "GAE", "HEB", "HRV", "HUN", "ISL", "ITA", "ITS", "JPN", "KOR", "MKD", "NLD", "NLB", "NON", "NOR", "PLK", "PTB", "PTG", "RMS", "ROM", "RUS", "SKY", "SLO", "SQI", "SRB", "SRL", "SVE", "THA", "TRK", "UKR", "URD"

EIP Java APIs

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