public abstract class AbstractSelector extends java.lang.Object implements java.lang.Comparable<AbstractSelector>
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
_canonicalName |
protected java.lang.String |
_description |
protected java.lang.String |
_displayName |
protected java.lang.String |
_name |
protected java.util.Map<java.lang.String,java.lang.String> |
_params |
Constructor and Description |
---|
AbstractSelector()
****************************************************************************
|
AbstractSelector(java.lang.String name) |
AbstractSelector(java.lang.String name,
java.util.Map<java.lang.String,java.lang.String> params) |
AbstractSelector(java.lang.String name,
java.lang.String desc) |
AbstractSelector(java.lang.String name,
java.lang.String desc,
java.util.Map<java.lang.String,java.lang.String> params) |
Modifier and Type | Method and Description |
---|---|
void |
addKey(java.lang.String key)
Adds a key - ie.
|
void |
addParam(java.lang.String key,
java.lang.String value)
Adds a single parameter passed to the selector's parameters
|
void |
addParams(java.util.Map<java.lang.String,java.lang.String> paramMap)
Adds (does not replace) the parameters in the map passed to the selectors
parameters
|
int |
compareTo(AbstractSelector other) |
boolean |
equals(java.lang.Object other)
AbstractSelectors are considered equal if their canonical names and name fields
are equal
|
protected <T> java.util.Set<T> |
evaluate(java.util.List<java.util.Set<T>> setList,
java.lang.String expression)
Evaluates a list of Sets against an expression.
|
java.lang.String |
getCanonicalName() |
java.lang.String |
getClassName() |
java.lang.String |
getDescription() |
java.lang.String |
getDisplayName() |
java.lang.String |
getInformation(java.lang.String outerTag)
Gets a 'dump' of this selector object as an XML'd String
|
java.util.Set<java.lang.String> |
getKeys() |
java.lang.String |
getName() |
protected java.util.Set<java.lang.String> |
getParamKeys() |
java.util.Map<java.lang.String,java.lang.String> |
getParams() |
java.lang.String |
getParamValue(java.lang.String key)
Retrieves the value of the specified parameter
|
int |
hashCode() |
protected <T> java.util.Set<T> |
intersection(java.util.Set<T> set1,
java.util.Set<T> set2)
Performs an intersection over two Sets
|
void |
reconstitute(Element e)
Fills the members of this object with values found in an XML description
|
void |
setCanonicalName(java.lang.String name)
Stores the full class name of this 'selector'
|
void |
setDescription(java.lang.String desc)
Sets the description of this 'selector'
|
void |
setDisplayName(java.lang.String name)
Sets the user-friendly display name of this 'selector'
|
void |
setKeyValue(java.lang.String key,
java.lang.String value)
Sets the value of a key (at specification design time)
|
void |
setName(java.lang.String name)
Stores the class name of this 'selector'
|
void |
setParams(java.util.Map<java.lang.String,java.lang.String> paramsMap)
Sets (replaces) the parameters with the map passed
|
java.lang.String |
toString() |
protected java.lang.String |
toXML() |
protected <T> java.util.Set<T> |
union(java.util.Set<T> set1,
java.util.Set<T> set2)
Performs an union over two Sets
|
protected static java.util.Map<java.lang.String,java.lang.String> |
unmarshalParams(Element eParams)
Unpacks the xml describing the parameters to a HashMap object
|
protected java.lang.String _name
protected java.lang.String _canonicalName
protected java.lang.String _displayName
protected java.lang.String _description
protected java.util.Map<java.lang.String,java.lang.String> _params
public AbstractSelector()
public AbstractSelector(java.lang.String name)
public AbstractSelector(java.lang.String name, java.lang.String desc)
public AbstractSelector(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> params)
public AbstractSelector(java.lang.String name, java.lang.String desc, java.util.Map<java.lang.String,java.lang.String> params)
protected java.util.Set<java.lang.String> getParamKeys()
public java.lang.String getName()
public java.lang.String getDisplayName()
public java.lang.String getDescription()
public java.util.Set<java.lang.String> getKeys()
public java.util.Map<java.lang.String,java.lang.String> getParams()
public java.lang.String getClassName()
public java.lang.String getCanonicalName()
public java.lang.String getParamValue(java.lang.String key)
key
- the name of the parameterpublic void setName(java.lang.String name)
name
- the name to setpublic void setCanonicalName(java.lang.String name)
name
- the name to setpublic void setDisplayName(java.lang.String name)
name
- the name to setpublic void setDescription(java.lang.String desc)
desc
- the description value to setpublic void setParams(java.util.Map<java.lang.String,java.lang.String> paramsMap)
paramsMap
- the new parameter map of the form [name, value] (both Strings)public void addParams(java.util.Map<java.lang.String,java.lang.String> paramMap)
paramMap
- the new parameter map of the form [name, value] (both Strings)public void addParam(java.lang.String key, java.lang.String value)
key
- the name of the parametervalue
- the value of the parameterpublic void addKey(java.lang.String key)
key
- the attribute namepublic void setKeyValue(java.lang.String key, java.lang.String value)
key
- the attribute namevalue
- the value to setpublic boolean equals(java.lang.Object other)
equals
in class java.lang.Object
other
- the object to compare to thispublic int hashCode()
hashCode
in class java.lang.Object
public int compareTo(AbstractSelector other)
compareTo
in interface java.lang.Comparable<AbstractSelector>
protected <T> java.util.Set<T> evaluate(java.util.List<java.util.Set<T>> setList, java.lang.String expression)
T
- the object type contained in each setsetList
- the list of setsexpression
- the expression containing the operatorsprotected <T> java.util.Set<T> intersection(java.util.Set<T> set1, java.util.Set<T> set2)
T
- the object type contained in each setset1
- Set Aset2
- Set Bprotected <T> java.util.Set<T> union(java.util.Set<T> set1, java.util.Set<T> set2)
T
- the object type contained in each setset1
- Set Aset2
- Set Bpublic java.lang.String toString()
toString
in class java.lang.Object
protected java.lang.String toXML()
protected static java.util.Map<java.lang.String,java.lang.String> unmarshalParams(Element eParams)
eParams
- Element
public java.lang.String getInformation(java.lang.String outerTag)
outerTag
- a value for the surrounding tag (one of the extended classes)reconstitute(Element)
public void reconstitute(Element e)
e
- a JDOM Element containing the valuesgetInformation(String)
Copyright © 2004-2014 The YAWL Foundation.