|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.validation.model.Category
public class Category
A constraint category, defining a hierarchical organization of constraints. Categories can be individually and separately (no dependency on the hierarchy) enabled or disabled by the user. Enablement indicates whether the constraints in the category should be applied to the user's models.
Categories are naturally sorted by name
for display
purposes.
This class is intended to be used by clients of the validation framework.
Method Summary | |
---|---|
void |
addConstraint(IConstraintDescriptor constraint)
Adds a constraint to me. |
int |
compareTo(Category other)
|
boolean |
equals(Object other)
|
Category |
getChild(String childId)
Obtains the child category of mine that has the specified childId . |
SortedSet<Category> |
getChildren()
Obtains my children. |
Set<IConstraintDescriptor> |
getConstraints()
Obtains my constraints. |
Category |
getDescendent(String descendentPath)
Obtains the descendent category of mine that has the specified descendentPath relative to my path. |
String |
getDescription()
Obtains a string which (briefly) describes my purpose to the user. |
String |
getId()
Obtains my ID, which is unique within my parent's ID (or just unique within the global namespace if I have no parent). |
String |
getName()
Obtains my user-presentable name. |
Category |
getParent()
Obtains my parent category, or null if I am a top-level
category. |
String |
getPath()
Obtains my path, which is my fully-qualified slash-separated ID that is unique within the global namespace. |
String |
getQualifiedName()
Obtains my qualified name, which includes my ancestors' names separated by slashes. |
int |
hashCode()
|
boolean |
isMandatory()
Queries whether I am a mandatory category, which the user may not deselect. |
void |
removeConstraint(IConstraintDescriptor constraint)
Removes a constraint from me. |
void |
setDescription(String description)
Sets my localized description. |
void |
setMandatory(boolean b)
Sets whether I am mandatory. |
void |
setName(String name)
Sets my localized name. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public final String getId()
public final String getPath()
public final String getName()
public final String getQualifiedName()
public String getDescription()
public Set<IConstraintDescriptor> getConstraints()
IConstraintDescriptor
s that are members of me as an
unmodifiable setpublic void addConstraint(IConstraintDescriptor constraint)
constraint
- my constraintpublic void removeConstraint(IConstraintDescriptor constraint)
constraint
- a constraintpublic Category getParent()
null
if I am a top-level
category.
public SortedSet<Category> getChildren()
Category
s that are
my children, sorted by name
. May be an empty setpublic Category getChild(String childId)
childId
.
childId
- the ID to find
null
if not foundpublic Category getDescendent(String descendentPath)
descendentPath
relative to my path.
descendentPath
- the relative path to find
null
if not foundgetPath()
public final void setName(String name)
name
- my name (may not be null
)public void setDescription(String description)
description
- my descriptionpublic boolean isMandatory()
public void setMandatory(boolean b)
b
- whether I am mandatorypublic int hashCode()
hashCode
in class Object
public boolean equals(Object other)
equals
in class Object
public int compareTo(Category other)
compareTo
in interface Comparable<Category>
public String toString()
toString
in class Object
|
Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |