com.sri.emo.dbobj
Class PartDescriptor

java.lang.Object
  extended by com.sri.emo.dbobj.PartDescriptor

public class PartDescriptor
extends Object

Encapsulation of a part of a node. Parts can be other nodes or (owned) attributes, and have various characteristics.


Field Summary
static String DELIMITER
           
static boolean IS_NODE_OBJECT
           
static boolean IS_OWNED
           
static int MULTIPLE_ITEM_ALLOWED
           
static String PART_DISPAY_NAME
           
static String PART_HELP_STRING
           
static int PICKLIST_SINGLE_ITEM
           
static int SINGLE_ITEM_ALLOWED
          cardinalities
static int SUMMARY_SINGLE_ITEM
           
 
Constructor Summary
PartDescriptor(String label, boolean isNodeObject, String attributeType, int partNum, int areManyAllowed)
          constructor for attributes which have no summary
PartDescriptor(String label, boolean isNodeObject, String attributeType, int partNum, int areManyAllowed, String relation)
          constructor for attributes which HAVE summary
PartDescriptor(String label, boolean isNodeObject, String relation, int partNum, String typeNode)
          constructor for shared nodes
 
Method Summary
 boolean areMultipleAttributesAllowed()
           
 String getAttribLimit()
           
 String getCardinalityString()
           
 IPartHandler getCustomHandler()
           
 String getDisplayTitleOfParentNodeType(int requestingUid)
          return display title of node type of parent node, or empty string "" if not found
 String getParentObjectType()
           
 List getPicklist(int userId)
           
 String[][] getPicklistArray(int userId)
           
 boolean hasCustomHandler()
           
 boolean hasPicklist()
           
 boolean isAttribute()
           
 boolean isNode()
           
 boolean isSummary()
           
 String label()
          the label for this part which will appear in displays
 int numDisplayLines()
           
 int partNum()
           
 String relation()
           
 void setCardinality(int cardinality)
           
 void setCustomHandler(IPartHandler customHandler)
           
 void setParentObjectType(String parentObjectType)
           
 String typeOfPart()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IS_NODE_OBJECT

public static final boolean IS_NODE_OBJECT
See Also:
Constant Field Values

IS_OWNED

public static final boolean IS_OWNED
See Also:
Constant Field Values

PART_DISPAY_NAME

public static final String PART_DISPAY_NAME
See Also:
Constant Field Values

PART_HELP_STRING

public static final String PART_HELP_STRING
See Also:
Constant Field Values

SINGLE_ITEM_ALLOWED

public static final int SINGLE_ITEM_ALLOWED
cardinalities

See Also:
Constant Field Values

MULTIPLE_ITEM_ALLOWED

public static final int MULTIPLE_ITEM_ALLOWED
See Also:
Constant Field Values

PICKLIST_SINGLE_ITEM

public static final int PICKLIST_SINGLE_ITEM
See Also:
Constant Field Values

SUMMARY_SINGLE_ITEM

public static final int SUMMARY_SINGLE_ITEM
See Also:
Constant Field Values

DELIMITER

public static final String DELIMITER
See Also:
Constant Field Values
Constructor Detail

PartDescriptor

public PartDescriptor(String label,
                      boolean isNodeObject,
                      String relation,
                      int partNum,
                      String typeNode)
constructor for shared nodes


PartDescriptor

public PartDescriptor(String label,
                      boolean isNodeObject,
                      String attributeType,
                      int partNum,
                      int areManyAllowed)
constructor for attributes which have no summary


PartDescriptor

public PartDescriptor(String label,
                      boolean isNodeObject,
                      String attributeType,
                      int partNum,
                      int areManyAllowed,
                      String relation)
constructor for attributes which HAVE summary

Parameters:
relation - is the object name for items to summarize
Method Detail

isNode

public boolean isNode()

isAttribute

public boolean isAttribute()

label

public String label()
the label for this part which will appear in displays


relation

public String relation()

typeOfPart

public String typeOfPart()

partNum

public int partNum()

getDisplayTitleOfParentNodeType

public String getDisplayTitleOfParentNodeType(int requestingUid)
return display title of node type of parent node, or empty string "" if not found


getPicklistArray

public String[][] getPicklistArray(int userId)
                            throws Exception
Returns:
array of values in picklist; return null if attribute has no picklist
Throws:
Exception

getPicklist

public List getPicklist(int userId)
                 throws Exception
Throws:
Exception

hasPicklist

public boolean hasPicklist()
Returns:
true if this attribute has a picklist

isSummary

public boolean isSummary()
Returns:
true if this attribute is a summary

areMultipleAttributesAllowed

public boolean areMultipleAttributesAllowed()
Returns:
true if this attribute allows multiple entries

getParentObjectType

public String getParentObjectType()

setParentObjectType

public void setParentObjectType(String parentObjectType)

getAttribLimit

public String getAttribLimit()

hasCustomHandler

public boolean hasCustomHandler()

getCustomHandler

public IPartHandler getCustomHandler()
Returns:
the custom editting handler or null if this part does not have one

setCustomHandler

public void setCustomHandler(IPartHandler customHandler)

setCardinality

public void setCardinality(int cardinality)
Parameters:
cardinality - use internal int flags
See Also:
and related constants

numDisplayLines

public int numDisplayLines()

getCardinalityString

public String getCardinalityString()


Copyright © 2004-2006 Codeguild, Inc.. All Rights Reserved.