com.partnersoft.data.cog
Class CogDatatype

java.lang.Object
  extended by com.partnersoft.data.cog.CogDatatype
All Implemented Interfaces:
java.lang.Comparable
Direct Known Subclasses:
CogListType, CogMixedType, CogNamingType, CogPrimitiveType, CogStructureType, CogStructureTypeField

public abstract class CogDatatype
extends java.lang.Object
implements java.lang.Comparable

This represents a defined field or class, with name, description, validation rules, GUI settings, permissions, etc.

Author:
Paul Reavis Copyright 2003 Partner Software, Inc.

Constructor Summary
CogDatatype()
           
 
Method Summary
 int compareTo(java.lang.Object nother)
           
abstract  java.lang.Object createValue(CogDataDictionary dataDictionary)
          Create a new Cog that fits this datatype, with appropriate defaults, etc.
 java.lang.String getCategory()
          A name for the general category that this datatype belongs in.
 java.lang.String getDescription()
          A longer description for the datetype or field.
 java.lang.String getLabel()
          A user-friendly label for this datatype.
 java.lang.String getName()
          A unique name for the datatype.
 int getOrder()
          An order value, generally for sorting on reports and edit screens.
 Naming getProperties()
          These are various configuration values used for validation, screen representation, etc.
 java.util.Set getReadOnlyGroups()
          This is the list of permission groups that can only read data in this datatype.
 java.util.Set getReadWriteGroups()
          This is the list of permission groups that can both read and write data in this datatype.
 java.util.ArrayList getValidationRules()
          These are named validation rules that are applied against entered values.
 void setCategory(java.lang.String argCategory)
           
 void setDescription(java.lang.String argDescription)
           
 void setLabel(java.lang.String argLabel)
           
 void setName(java.lang.String argName)
           
 void setOrder(int newOrder)
           
 void setProperties(Naming argProperties)
           
 void setReadOnlyGroups(java.util.Set argReadOnlyGroups)
           
 void setReadWriteGroups(java.util.Set argReadWriteGroups)
           
 void setValidationRules(java.util.ArrayList argValidationRules)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CogDatatype

public CogDatatype()
Method Detail

createValue

public abstract java.lang.Object createValue(CogDataDictionary dataDictionary)
Create a new Cog that fits this datatype, with appropriate defaults, etc. A data dictionary is provided for resolving datatypes of properties or contents.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getName

public java.lang.String getName()
A unique name for the datatype. It is highly recommended that the name start with a letter and not include spaces or strange characters, since the name will be used as a variable name in scripts, as a tag name in XML and as a field name in databases.


setName

public void setName(java.lang.String argName)

getLabel

public java.lang.String getLabel()
A user-friendly label for this datatype. Generally used in reports and in GUIs.


setLabel

public void setLabel(java.lang.String argLabel)

getCategory

public java.lang.String getCategory()
A name for the general category that this datatype belongs in. Used to separate fields on reports and into tabs on GUIs.


setCategory

public void setCategory(java.lang.String argCategory)

getDescription

public java.lang.String getDescription()
A longer description for the datetype or field. Used in help displays.


setDescription

public void setDescription(java.lang.String argDescription)

getValidationRules

public java.util.ArrayList getValidationRules()
These are named validation rules that are applied against entered values.


setValidationRules

public void setValidationRules(java.util.ArrayList argValidationRules)

getReadOnlyGroups

public java.util.Set getReadOnlyGroups()
This is the list of permission groups that can only read data in this datatype.


setReadOnlyGroups

public void setReadOnlyGroups(java.util.Set argReadOnlyGroups)

getReadWriteGroups

public java.util.Set getReadWriteGroups()
This is the list of permission groups that can both read and write data in this datatype.


setReadWriteGroups

public void setReadWriteGroups(java.util.Set argReadWriteGroups)

getProperties

public Naming getProperties()
These are various configuration values used for validation, screen representation, etc.


setProperties

public void setProperties(Naming argProperties)

getOrder

public int getOrder()
An order value, generally for sorting on reports and edit screens.


setOrder

public void setOrder(int newOrder)

compareTo

public int compareTo(java.lang.Object nother)
Specified by:
compareTo in interface java.lang.Comparable