de.fh_mannheim.mm.dms.framework
Class Category

java.lang.Object
  extended byde.fh_mannheim.mm.dms.framework.Category
All Implemented Interfaces:
IElement

public class Category
extends java.lang.Object
implements IElement

Describes a category.

Version:
$Revision: 1.7 $
Author:
Jan Löffler, mail@jlsoft.de

Field Summary
static int UNKNOWN
          UKNOWN is set as initial value for id of category
 
Constructor Summary
Category()
          Constructor.
Category(int nID, java.lang.String strShortname, java.lang.String strName, java.lang.String strDescription, java.lang.String strKeywords)
          Constructor.
Category(java.lang.String strName)
          Constructor.
Category(java.lang.String strShortname, java.lang.String strName, java.lang.String strDescription, java.lang.String strKeywords)
          Constructor.
 
Method Summary
 boolean equals(java.lang.Object other)
          Compares two category objects.
 java.lang.String getDescription()
          Get description of category.
 int getID()
          Get ID of category.
 java.lang.String getKeywords()
          Get keywords of category.
 java.lang.String getName()
          Get name of category.
 java.lang.String getShortname()
          Get shortname of category.
 void setDescription(java.lang.String strDescription)
          Set description of category.
 void setID(int nCategoryID)
          Set ID of category.
 void setKeywords(java.lang.String strKeywords)
          Set keywords of category.
 void setName(java.lang.String strName)
          Set name of category.
 void setShortname(java.lang.String strShortname)
          Set shortname of category.
 org.w3c.dom.Element toElement(org.w3c.dom.Document doc)
          Write information of category in a xml element.
 org.w3c.dom.Element toElement(org.w3c.dom.Element element, org.w3c.dom.Document doc)
          Write information of category in a xml element.
 java.lang.String toString()
          Write information of category in a string.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNKNOWN

public static final int UNKNOWN
UKNOWN is set as initial value for id of category

See Also:
Constant Field Values
Constructor Detail

Category

public Category()
Constructor.


Category

public Category(java.lang.String strShortname,
                java.lang.String strName,
                java.lang.String strDescription,
                java.lang.String strKeywords)
Constructor.

Parameters:
strShortname - Shortname of category
strName - Name of category
strDescription - Description of category
strKeywords - Keywords

Category

public Category(java.lang.String strName)
Constructor.

Parameters:
strName - Name of category

Category

public Category(int nID,
                java.lang.String strShortname,
                java.lang.String strName,
                java.lang.String strDescription,
                java.lang.String strKeywords)
Constructor.

Parameters:
nID - ID of category
strShortname - Shortname of category
strName - Name of category
strDescription - Description of category
strKeywords - Keywords
Method Detail

equals

public boolean equals(java.lang.Object other)
Compares two category objects.

Parameters:
other - Category to compare
Returns:
true, if equal

getID

public int getID()
Get ID of category.

Returns:
ID of category

getDescription

public java.lang.String getDescription()
Get description of category.

Returns:
Description of category

getName

public java.lang.String getName()
Get name of category.

Returns:
name of category

getKeywords

public java.lang.String getKeywords()
Get keywords of category.

Returns:
keywords of category

getShortname

public java.lang.String getShortname()
Get shortname of category.

Returns:
shortname of category

setKeywords

public void setKeywords(java.lang.String strKeywords)
Set keywords of category.

Parameters:
strKeywords - Keywords of category

setID

public void setID(int nCategoryID)
Set ID of category.

Parameters:
nCategoryID - ID of category

setName

public void setName(java.lang.String strName)
Set name of category.

Parameters:
strName - Name of category

setShortname

public void setShortname(java.lang.String strShortname)
Set shortname of category.

Parameters:
strShortname - Shortname of category

setDescription

public void setDescription(java.lang.String strDescription)
Set description of category.

Parameters:
strDescription - Description of category

toElement

public org.w3c.dom.Element toElement(org.w3c.dom.Document doc)
Write information of category in a xml element.

Specified by:
toElement in interface IElement
Parameters:
doc - XML Document
Returns:
element

toElement

public org.w3c.dom.Element toElement(org.w3c.dom.Element element,
                                     org.w3c.dom.Document doc)
Write information of category in a xml element.

Specified by:
toElement in interface IElement
Parameters:
element - Root element
doc - XML Document
Returns:
element

toString

public java.lang.String toString()
Write information of category in a string.

Specified by:
toString in interface IElement
Returns:
information