stella.util
Class SubTargets

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by stella.parameter.AbstractParameter
                  extended by stella.parameter.TargetList
                      extended by stella.util.SubTargets
All Implemented Interfaces:
Cloneable, ClusterDepending, Parameter, TargetProviding<ParsedTarget>, ExitCleaning, Initializable, LocalizedSupplying, PropertySupplying, Reloadable, ResourceSupplying

public class SubTargets
extends TargetList
implements ClusterDepending

Takes a huge list of possible targets and applies a general filtering on them. The general filters are global constraints and are reliably satisifed if only target parameters are considered.


Nested Class Summary
 
Nested classes/interfaces inherited from class stella.parameter.TargetList
TargetList.Check, TargetList.Invoke, TargetList.TargetDump
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private  Collection global
          Global constraints, if any.
static String KEY_CONSTRAINTS
          A list of global constraints.
static String KEY_VALID
          The directory receiving all surviving targets.
private  ParameterClustering set
          The entire parameter cluster grabbed via the wrapping parameter.
 
Fields inherited from class stella.parameter.TargetList
DEFNAME, KEY_CHAINFILE, KEY_DUMP, KEY_HISTORYDB, KEY_IGNORESERIAL, KEY_REMOVE, KEY_STELLA, KEY_TARGETDB, KEY_TARGETFILE
 
Fields inherited from class stella.parameter.AbstractParameter
KEY_FORMAT, KEY_NAME, KEY_PRESERVE, UNKNOWN
 
Fields inherited from class util.PropertyBundles
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES
 
Fields inherited from class util.PropertyResources
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset
 
Fields inherited from class util.PropertyContainer
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR
 
Fields inherited from interface stella.TargetProviding
SERIAL, XML
 
Fields inherited from interface util.PropertySupplying
CONFIG, KEY_CLASS
 
Fields inherited from interface util.ResourceSupplying
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Constructor Summary
SubTargets(Map prop)
          Constructs a new sub target list.
 
Method Summary
protected  boolean checkGlobalConstraints(ParameterClustering set, TargetDefinition target)
          Checks, if the target is observable under all global constraints.
 void exit()
          Exits this parameter.
 void init()
          Initializes the show list.
 void registerCluster(ParameterClustering cluster)
          Registers the parameter cluster.
 
Methods inherited from class stella.parameter.TargetList
add, addTarget, clear, get, getActiveTargets, getAllNames, getAllTargets, getCompletedTargets, getFromActive, getFromAll, reload, remove, removeTarget, rescanned, restore, restoreTargets, set
 
Methods inherited from class stella.parameter.AbstractParameter
createParameter, delivers, getFormatted, getFormatted, getName, getPreserveFile, getString, getString, register, setName, toString
 
Methods inherited from class util.PropertyBundles
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource
 
Methods inherited from class util.PropertyResources
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, keyCreate, keyCreate, reload, setApplet
 
Methods inherited from class util.PropertyContainer
augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, removeProperty, setObject, setProperties, setProperty, stringProperties
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface util.PropertySupplying
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties
 
Methods inherited from interface util.ResourceSupplying
getResource, getResourceAsStream, getResources
 

Field Detail

KEY_CONSTRAINTS

public static final String KEY_CONSTRAINTS
A list of global constraints.

See Also:
Constant Field Values

KEY_VALID

public static final String KEY_VALID
The directory receiving all surviving targets.

See Also:
Constant Field Values

set

private ParameterClustering set
The entire parameter cluster grabbed via the wrapping parameter.


global

private Collection global
Global constraints, if any.

Constructor Detail

SubTargets

public SubTargets(Map prop)
Constructs a new sub target list.

Method Detail

init

public void init()
Initializes the show list.

Specified by:
init in interface Initializable
Overrides:
init in class TargetList

registerCluster

public void registerCluster(ParameterClustering cluster)
Registers the parameter cluster. Additionally we roam thru our display key to identify all parameters that should be displayed.

Specified by:
registerCluster in interface ClusterDepending

checkGlobalConstraints

protected boolean checkGlobalConstraints(ParameterClustering set,
                                         TargetDefinition target)
Checks, if the target is observable under all global constraints.


exit

public void exit()
Exits this parameter. If the KEY_VALID key points to a directory, all targets hosted by this parameter are dumped as xml-files into the specified directory.

Specified by:
exit in interface ExitCleaning
Overrides:
exit in class TargetList