public final class ConceptRange extends Range
| Constructor and Description |
|---|
ConceptRange(Project p,
Concept c)
Initializes map for special attributes.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(Instance i) |
void |
clear() |
Instance |
contains(java.lang.String name)
Returns the ConceptAttribute associated with the given String.
|
Attribute |
getAttribute(java.lang.Object obj)
Gets the attribute associated with the specified
Object obj. |
Concept |
getConcept() |
Instance |
getInstance(java.lang.String name)
Returns the ConceptAttribute associated with the given String.
|
java.util.Collection<Instance> |
getInstances()
Gets the current c attributes maintained by this range.
|
Attribute |
parseValue(java.lang.String s) |
void |
remove(java.lang.String name) |
void |
renameInstance(java.lang.String name,
java.lang.String name2) |
void |
setAllInstancesMultiple(AttributeDesc d)
Called when changing the description from having single to multiple values.
|
void |
setAllInstancesSingle(AttributeDesc d)
Called when changing the description from having multiple to single values.
|
void |
update(java.util.Observable o,
java.lang.Object arg) |
getProject, setProjectpublic Instance getInstance(java.lang.String name) throws java.lang.Exception
name - the identifier for which the corresponding ConceptAttribute
should be returnedjava.lang.Exception - if name is emptypublic boolean add(Instance i)
i - the instance to be added to this rangepublic Instance contains(java.lang.String name)
name - the name of the instance to be returnedpublic java.util.Collection<Instance> getInstances()
public Attribute getAttribute(java.lang.Object obj)
Object obj.
obj is expected to be of type String. Returns result of
getInstance(String) if obj is of type String,
result of Project.getSpecialAttribute(String) if obj is of type
SpecialAttribute, else returns null. Is needed for
MultipleRange.getAttribute in class Rangeobj - representing String or SpecialAttributepublic Concept getConcept()
public void update(java.util.Observable o,
java.lang.Object arg)
public void renameInstance(java.lang.String name,
java.lang.String name2)
name - the old name of the instancename2 - new name of the instancepublic Attribute parseValue(java.lang.String s) throws java.lang.Exception
s - the string which should be used for parsingjava.text.ParseException - if string does not fit descriptionjava.lang.Exceptionpublic void setAllInstancesSingle(AttributeDesc d)
public void setAllInstancesMultiple(AttributeDesc d)
public void clear()
public void remove(java.lang.String name)
name -