|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.PropertyContainer
util.PropertyResources
stella.AbstractTarget
stella.xml.ParsedTarget
public class ParsedTarget
An DOM-based description of a target. This TargetDefinition can be
parsed from and to an xml-file, see TargetFragment, but has no
document specific elements in it. This class should be used in the STELLA
observations. It is fed and can be exported to xml-files. For details of the
xml-format, see DOMTarget.
| Nested Class Summary | |
|---|---|
static class |
ParsedTarget.Constraint
Defines one constraint for target selection. |
private class |
ParsedTarget.RateThread
A thread that waits for an expression to be fulfilled, then queries its constraints and rates an observation as successful, if everthing is fulfilled. |
| Nested classes/interfaces inherited from class stella.AbstractTarget |
|---|
AbstractTarget.Aim, AbstractTarget.ConstraintAdapter, AbstractTarget.FitsEntry, AbstractTarget.PickAdapter, AbstractTarget.Setup, AbstractTarget.TargetComparator |
| Nested classes/interfaces inherited from class util.PropertyResources |
|---|
PropertyResources.URLResource |
| Nested classes/interfaces inherited from interface stella.HistoryAware |
|---|
HistoryAware.Pick |
| Field Summary | |
|---|---|
private boolean |
abort
A flag stating that the target should be aborted. |
private Map<String,List<String>> |
aborting
Errors for immediate abort. |
private Map<Object,Object> |
astronomy
The map of astronomical objects found in the target. |
private Map<String,List<String>> |
blocking
Errors blocking the target. |
private ExpressionEvaluator |
canrate
The expression to fulfill for a rating to take place. |
private List<Appointable.Constraint> |
constraints
A list of constraints. |
private List<String> |
daughternames
The daugther targets. |
private List<TargetDefinition> |
daughters
The daugther targets. |
private double |
daymerit
The daily high merit. |
private long |
daytime
and its date. |
private boolean |
dbread
For converting to xml, this field is true if target comes from db. |
private boolean |
dbwrite
If true, task database is updated on execution add. |
private static double |
DEFACCELERATE
The default parameter name giving the remaining night-time. |
private static int |
DEFDELAYMAX
Default number of delays. |
private static long |
DEFDELAYTIME
Default time of delays. |
private static String |
DEFIMAGETYPE
The default parameter name giving the remaining night-time. |
private static String |
DEFNIGHT
The default parameter name giving the remaining night-time. |
private static boolean |
DEFOBSBAD
The default resources. |
private static boolean |
DEFOBSGOOD
The default resources. |
private static int |
DEFRATERETRY
The maximum number of retries to rate a target. |
private static long |
DEFRATEWAIT
The wait time between individual rate attempts. |
private static int |
DEFRETRYMAX
Default number of retries. |
private int |
delaycount
The number of actual delays. |
private Map<String,List<String>> |
delaying
Errors delaying the target. |
private Map<String,Integer> |
delaymax
The maximum number of delayed retries allowed. |
private static List<TimerTask> |
delays
The timer to allow re-enabling of the target. |
private Map<String,Long> |
delaytime
The delay time until target is re-enabled. |
private static Timer |
delaytimer
The timer to allow re-enabling of the target. |
private String |
description
The abstract of the observing program. |
private ExpressionEvaluator |
duration
The duration of the observation, if explicetly given. |
private List<javax.mail.Address> |
email
A list of e-mail addresses. |
private boolean |
enabled
True if target is enabled. |
private boolean |
finished
Signals that this target has been finished. |
private Map<Object,Object> |
fitsheader
The map of fits-header entries found. |
private List<Meriting> |
gains
The gains of the target. |
private boolean |
hdbread
For converting to xml, this field is true if history comes from db. |
private boolean |
hdbwrite
If true, history database is updated on execution add. |
private double |
himerit
The highest merit achieved. |
private List<HistoryAware.Pick> |
history
The pick history of the target. |
private int |
historymax
The maximum size of the history list. |
private boolean |
historyover
If true, program is completed. |
private long |
hitime
The highest merit time. |
private static HistorySql |
hsql
The history database. |
private Map<String,List<String>> |
ignoring
Errors ignored. |
private String |
imagetype
The image type. |
private UserProfile.Affil |
institution
The institution the user belongs to (aka the time requestor). |
static String |
KEY_ACCELERATE
The key to the optional acceleration. |
static String |
KEY_CALCULATOR
The key to the properties of the exposure time calculator. |
static String |
KEY_HISTORYDB
If special history-db properties are required. |
static String |
KEY_IMAGETYPE
The key to the parameter name of the remaining night-time. |
static String |
KEY_NIGHT
The key to the parameter name of the remaining night-time. |
static String |
KEY_OBSBAD
Defaults to false. |
static String |
KEY_OBSGOOD
Defaults to false. |
static String |
KEY_RATERETRY
The maximum number of retries to rate a target. |
static String |
KEY_RATEWAIT
The wait time between individual rate attempts. |
static String |
KEY_TASKDB
If special task-db properties are required. |
private Appointable.Constraint<Number> |
lastfail
The constraint that made observing impossible. |
private double |
lastmerit
The last merit achieved. |
private Set<UserProfile.Notifies> |
notify
A list of notification triggers. |
private TargetDefinition |
parent
The parent target. |
private boolean |
picked
True when the target gets picked. |
private String |
proposal
The proposal id. |
private List<Appointable.Constraint> |
rate
The list of rating constraints, if given. |
private static ThreadGroup |
rategroup
The rate thread groups. |
private ExpressionEvaluator |
requires
The condition required for target selection. |
private boolean |
retry
A flag stating that the target should be retried immediately. |
private int |
retrycount
The number of actual retries. |
private Map<String,List<String>> |
retrying
Errors sparking an immediate retry. |
private Map<String,Integer> |
retrymax
The maximum number of immediate retries allowed. |
private static long |
serialVersionUID
Sometimes this must be changed!. |
private Map<Object,Object> |
setup
The map of setups found in the target. |
private Date |
submitted
If known, the submission date. |
private TargetDefinition |
successor
The successor target. |
private String |
successorname
The successor target. |
private File |
targetfile
The target file when stored as an xml-file. |
private String |
targetname
The target name. |
private String |
targettype
The target type. |
private List<String> |
team
The cois user. |
private List<Meriting> |
timeslots
The time slot(s) of the target. |
private String |
title
The abstract of the observing program. |
private boolean |
triumph
True until an error signals unsuccessful target execution. |
private static TaskSql |
tsql
The task database. |
private String |
user
The target user. |
| Fields inherited from class stella.AbstractTarget |
|---|
expo |
| 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 util.ResourceSupplying |
|---|
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME |
| Fields inherited from interface util.PropertySupplying |
|---|
CONFIG, KEY_CLASS |
| Constructor Summary | |
|---|---|
ParsedTarget()
|
|
ParsedTarget(Map<String,String> prop)
Constructs a new xml target. |
|
| Method Summary | |
|---|---|
void |
addExecution(ParameterClustering condition,
Date start,
long duration,
String unique,
String rem)
Adds a pick to this target. |
private boolean |
checkOver(ParameterClustering condition,
List merits)
Checks the list of merits for possible end point-defining merits. |
void |
clearHistory()
Deletes the entire history. |
int |
compareTo(Object o)
Compares two parsed targets. |
boolean |
equals(Object that)
Compares this target definition for equality. |
void |
errorDaughter(ErrorEvent success,
ErrorFinalizing finish,
ParameterClustering set)
Signals that an error has occured in a daughter of this target. |
void |
errorMain(ErrorEvent success,
ErrorFinalizing finish,
ParameterClustering set)
Signals that an error has occured in this target. |
void |
errorSuccessor(ErrorEvent success,
ErrorFinalizing finish,
ParameterClustering set)
Signals that an error has occured in the successor to this target. |
double |
getActualMerit(ParameterClustering condition,
Collection oftargets,
long within)
Returns the actual value of the merit of this target. |
protected Map |
getAstronomicalData()
Returns all stars in this target. |
List<Appointable.Constraint> |
getConstraints()
Returns the list of ParsedTarget.Constraint objects this target is subject to. |
Date |
getDailyDate()
The date of the high daily merit. |
double |
getDailyMerit()
The highest merit in the last 24 hours. |
boolean |
getDatabaseRead()
Returns the history database-access boolean. |
boolean |
getDatabaseWrite()
Returns the history database-access boolean. |
List<TargetDefinition> |
getDaughters()
Returns the list of daughter targets or null if this target does not have any. |
protected Map[] |
getDelayAndRetry()
Returns the mapping to the maximum number of retries, delays and the delay time. |
String |
getDescription()
Returns the observing program description. |
String |
getDescriptionID()
Returns the observing program id. |
protected ExpressionEvaluator |
getDuration()
Returns the expression that is used to calculate the execution time of the target. |
List<javax.mail.Address> |
getEmailAddresses()
Returns the e-mail addresses linked to this target. |
List<HistoryAware.Pick> |
getEntireHistory()
Returns the entire history the target is aware of. |
protected Map[] |
getErrors()
Returns an array of mappings of exception targets to error names. |
HistoryAware.Pick |
getFailure(int index)
Returns the date of the failed pick with the given index. |
int |
getFailureCount()
Returns the number of failed observations this target had. |
File |
getFile()
Returns the file name stored in the DOM. |
HistoryAware.Pick |
getFirstFailure()
Return the date of the first failed observation. |
HistoryAware.Pick |
getFirstPick()
Returns the first pick. |
HistoryAware.Pick |
getFirstSuccess()
Returns the pick of the first successful observation. |
protected Map |
getFitsHeader()
Returns all fits header in this target. |
Date |
getHighestDate()
The date of the highest merit. |
double |
getHighestMerit()
The highest merit ever achieved. |
boolean |
getHistoryDatabaseRead()
Returns the history database-access boolean. |
boolean |
getHistoryDatabaseWrite()
Returns the history database-access boolean. |
int |
getHistoryMax()
Returns the maximum size of the history. |
Object |
getImageType()
Returns the image type or the default value, if it was not set. |
UserProfile.Affil |
getInstitution()
Returns the institution the target time should account to. |
Appointable.Constraint |
getLastFail()
If anybody want to query why we have been unobservable, use this method. |
HistoryAware.Pick |
getLastFailure()
Returns the date of the last failed observation. |
double |
getLastMerit()
If anybody wants to query the last merit the target achieved and not want to wander through the TargetMerit parameter. |
HistoryAware.Pick |
getLastPick()
Returns the last pick. |
HistoryAware.Pick |
getLastSuccess()
Returns the pick of the last successful observation. |
protected List[] |
getMerits()
Returns the timeslot and gain merits as an array. |
String |
getName()
Returns the Target description of the object. |
Set<UserProfile.Notifies> |
getNotify()
Return the list of notification as tag-names. |
long |
getObservingTime(ParameterClustering set)
Returns an estimate of the observing time required for this target. |
HistoryAware.Pick |
getPick(int nr)
Returns the specified pick. |
int |
getPickCount()
Returns the number of picks in the history. |
TargetDefinition |
getPrecursor()
Returns the parent target. |
protected List<Appointable.Constraint> |
getRateConstraints()
Returns the list of ParsedTarget.Constraint objects this target is subject to
at rating. |
protected ExpressionEvaluator |
getRateRequires()
Returns the expression that must evaluate to true for this target to get evaluated after an observation. |
long |
getRemainingTime(ParameterClustering set)
Returns the remaining time of the observation time for this target. |
private long |
getRemainingTime(ParameterClustering set,
boolean info)
Returns the remaining time of the observation time for this target. |
protected ExpressionEvaluator |
getRequires()
Returns the expression that must evaluate to true for this target to get picked. |
Map<Object,Object> |
getSetups()
Returns the list of Setup objects of this target. |
Date |
getSubmitted()
The date the target was originally submitted. |
HistoryAware.Pick |
getSuccess(int index)
Returns the date of the succesful pick with the given index. |
int |
getSuccessCount()
Returns the number of succesful observations this target had. |
TargetDefinition |
getSuccessor()
Returns the successor target, if this target has one. |
URL |
getTargetResource()
Return the file name stored in the DOM as an url-rsource. |
Object |
getTargetSpecific(Object idobj)
Returns a special object of target-specific definitions. |
List<String> |
getTeam()
Returns the list of coi or null if none given. |
String |
getTitle()
Returns the observing program description. |
Object |
getType()
Returns the string value of the DTDConstants.TARGETTYPE
attribute. |
String |
getUser()
Returns the target user. |
int |
hashCode()
For entries in hash-tables. |
boolean |
isAbort(ParameterClustering set)
Checks if the target should be aborted. |
boolean |
isEnabled()
Test the access attribute of the Object element in the given target-DOM. |
boolean |
isFinished()
Returns the finished flag. |
boolean |
isNotify(UserProfile.Notifies condition)
Returns true if the condition passed over is found in the notification list. |
boolean |
isObservable(ParameterClustering condition)
Determines if this target is currently observable. |
boolean |
isPicked()
Returns true if this target is currently picked. |
boolean |
isProgramCompleted()
Returns true if the observing program on this target is over. |
boolean |
isProgramOver(ParameterClustering condition)
Checks if a target has completed is life-cycle within an observing program. |
boolean |
isRetry(ParameterClustering set)
Checks if the target should be retried. |
private void |
processError(ErrorEvent success,
ErrorFinalizing finish,
ParameterClustering set,
List blocklist,
List delaylist,
Integer delmax,
Long deltime,
List retrylist,
Integer retmax,
List ignorelist,
List abortlist)
Depending on the target the termination acts on, the different abort sections are loaded. |
private void |
readObject(ObjectInputStream stream)
On deserialization, first read the hidden object definitions, then the properties of this target. |
boolean |
resolveChildren(Collection<? extends TargetDefinition> alltargets)
Resolve all children. |
protected void |
setAstronomicalData(Map astro)
Sets the map of astronomical targets. |
protected void |
setConstraints(List<Appointable.Constraint> prevent)
Sets the target constraints. |
void |
setDatabaseAccess(boolean read,
boolean write)
Sets the database-access flags for read and write. |
void |
setDaughtersByName(List<String> dau)
Sets this target's daughters. |
protected void |
setDelayAndRetry(Map<String,Integer> delmax,
Map<String,Long> delfor,
Map<String,Integer> retmax)
Sets the maximum number of retries, the maximum number of delays and the delay time. |
protected void |
setDescription(String program)
Sets the observing program description. |
protected void |
setDuration(ExpressionEvaluator durcalc)
Sets the estimated duration of target execution. |
protected void |
setEmailAddresses(List<javax.mail.Address> address)
Sets the list of e-mail addresses. |
void |
setEnabled(boolean to)
Sets the access attribute to enabled. |
protected void |
setErrors(Map<String,List<String>> blockmap,
Map<String,List<String>> delaymap,
Map<String,List<String>> abortmap,
Map<String,List<String>> retrymap,
Map<String,List<String>> ignoremap)
Sets the error maps. |
void |
setFinished(boolean isready)
Sets the finished flag. |
protected void |
setFitsHeader(Map fits)
Sets the map of fits headers. |
void |
setHistory(List<HistoryAware.Pick> past,
int max)
Sets the target history and its maximum size. |
void |
setHistoryDatabaseAccess(boolean read,
boolean write)
Sets the history database-access flags for read and write. |
static void |
setHistorySql(HistorySql h)
Sets the history database. |
protected void |
setImageType(String itype)
Sets the image type. |
protected void |
setInstitution(UserProfile.Affil who)
Sets the target institute. |
void |
setLoggingForFailedConstraints(boolean to)
We set the volatile flag for extensive logging on reasons why this target is not observable during night run. |
void |
setLoggingForObservingTime(boolean to)
Announce interest on logging the target's remaining observing time |
protected void |
setMerits(List<Meriting> multiplicative,
List<Meriting> additive)
Sets the target merits. |
protected void |
setNotify(Set<UserProfile.Notifies> triggers)
Sets the list of notification triggers. |
void |
setPicked(boolean ispicked)
Signals that this target has been selected for observing. |
void |
setPrecursor(TargetDefinition anchestor)
Sets the parent target of this target. |
void |
setProgramCompleted(boolean over)
Returns true if the observing program on this target is over. |
protected void |
setRateConstraints(List<Appointable.Constraint> prevent)
Sets the target constraints. |
protected void |
setRateRequires(ExpressionEvaluator necessary)
Sets the boolean condition that is check for target availability prior to any other parameter constraints. |
protected void |
setRequires(ExpressionEvaluator necessary)
Sets the boolean condition that is check for target availability prior to any other parameter constraints. |
protected void |
setSetups(Map instrumentation)
Sets the map of setups. |
void |
setSubmitted(Date submit)
Sets the target submission date. |
void |
setSuccessorByName(String suck)
Sets this target's successor. |
protected void |
setTargetFile(File xml)
Sets the target xml-file. |
void |
setTargetName(String name,
String id)
Sets the target name. |
protected void |
setTargetType(String type)
Sets the target type. |
static void |
setTaskSql(TaskSql t)
Sets the task database. |
protected void |
setTeam(List<String> who)
Sets the target cois. |
protected void |
setTitle(String program)
Sets the observing program title. |
protected void |
setUser(String who)
Sets the target user. |
String |
toString()
Returns a string representation of the DOM-Target. |
private void |
writeObject(ObjectOutputStream stream)
We customize object serialization. |
| Methods inherited from class util.PropertyResources |
|---|
clone, createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, init, keyCreate, keyCreate, loadResource, 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, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, 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 |
| Field Detail |
|---|
private static final long serialVersionUID
public static final String KEY_IMAGETYPE
public static final String KEY_NIGHT
public static final String KEY_ACCELERATE
public static final String KEY_CALCULATOR
public static final String KEY_RATERETRY
public static final String KEY_RATEWAIT
public static final String KEY_HISTORYDB
public static final String KEY_TASKDB
public static final String KEY_OBSBAD
public static final String KEY_OBSGOOD
private static final String DEFIMAGETYPE
private static final String DEFNIGHT
private static final double DEFACCELERATE
private static final int DEFRETRYMAX
private static final int DEFDELAYMAX
private static final long DEFDELAYTIME
private static final int DEFRATERETRY
private static final long DEFRATEWAIT
private static final boolean DEFOBSBAD
private static final boolean DEFOBSGOOD
private boolean finished
private boolean picked
private boolean triumph
private boolean abort
private boolean retry
private int retrycount
private int delaycount
private Appointable.Constraint<Number> lastfail
private double lastmerit
private double himerit
private long hitime
private double daymerit
private long daytime
private boolean enabled
private String targettype
private Date submitted
private String imagetype
#KEY_IMAGETPYE.
private String targetname
private String proposal
private String title
private String description
private File targetfile
private String user
private List<String> team
private List<javax.mail.Address> email
private Set<UserProfile.Notifies> notify
private UserProfile.Affil institution
private List<HistoryAware.Pick> history
private int historymax
private boolean historyover
private boolean dbwrite
private boolean dbread
private boolean hdbwrite
private boolean hdbread
private Map<String,List<String>> blocking
private Map<String,List<String>> delaying
private Map<String,Integer> delaymax
private Map<String,Long> delaytime
private Map<String,List<String>> retrying
private Map<String,Integer> retrymax
private Map<String,List<String>> ignoring
private Map<String,List<String>> aborting
private ExpressionEvaluator requires
private List<Appointable.Constraint> constraints
private List<Meriting> gains
private List<Meriting> timeslots
private ExpressionEvaluator canrate
private List<Appointable.Constraint> rate
private ExpressionEvaluator duration
private TargetDefinition parent
private String successorname
private TargetDefinition successor
resolveChildren(java.util.Collection extends stella.TargetDefinition>).
private List<String> daughternames
private List<TargetDefinition> daughters
resolveChildren(java.util.Collection extends stella.TargetDefinition>).
private Map<Object,Object> setup
private Map<Object,Object> astronomy
private Map<Object,Object> fitsheader
private static transient Timer delaytimer
private static transient List<TimerTask> delays
private static transient ThreadGroup rategroup
private static transient HistorySql hsql
private static transient TaskSql tsql
| Constructor Detail |
|---|
public ParsedTarget()
public ParsedTarget(Map<String,String> prop)
KEY_NIGHT, the
KEY_ACCELERATE and the KEY_CALCULATOR.
| Method Detail |
|---|
private void writeObject(ObjectOutputStream stream)
throws IOException
IOException
private void readObject(ObjectInputStream stream)
throws IOException,
ClassNotFoundException
PropertyContainer.setProperties(java.util.Map) .
IOException
ClassNotFoundExceptionpublic void setLoggingForFailedConstraints(boolean to)
setLoggingForFailedConstraints in interface Observablepublic void setLoggingForObservingTime(boolean to)
Observable
setLoggingForObservingTime in interface Observablepublic static void setHistorySql(HistorySql h)
public static void setTaskSql(TaskSql t)
public int hashCode()
hashCode in class Objectpublic String getName()
getName in interface TargetDefinitionpublic Object getImageType()
getImageType in interface TargetDefinitionpublic String getTitle()
getTitle in interface TargetDefinitionpublic String getDescription()
getDescription in interface TargetDefinitionpublic String getDescriptionID()
getDescriptionID in interface TargetDefinitionpublic File getFile()
public URL getTargetResource()
getTargetResource in interface TargetDefinitionpublic String getUser()
getInstitution() is defined.
getUser in interface TargetDefinitionpublic List<String> getTeam()
getTeam in interface TargetDefinitionpublic List<javax.mail.Address> getEmailAddresses()
getEmailAddresses in interface TargetDefinitionpublic Set<UserProfile.Notifies> getNotify()
public UserProfile.Affil getInstitution()
getUser(), which is a required element should be
used for time allocation.
getInstitution in interface TargetDefinitionpublic Object getType()
DTDConstants.TARGETTYPE
attribute. This is a required attribute to the object tag and states the
sequence type to load for this target.
getType in interface TargetDefinitionpublic TargetDefinition getSuccessor()
getSuccessor in interface TargetDefinitionpublic void setSuccessorByName(String suck)
TargetDefinition.
public List<TargetDefinition> getDaughters()
getDaughters in interface TargetDefinitionpublic void setDaughtersByName(List<String> dau)
public boolean resolveChildren(Collection<? extends TargetDefinition> alltargets)
daughternames and
successorname) into living target definition references.
public TargetDefinition getPrecursor()
getPrecursor in interface TargetDefinitionpublic void setPrecursor(TargetDefinition anchestor)
setPrecursor in interface TargetDefinitionpublic Object getTargetSpecific(Object idobj)
DTDConstants.SETUP section. The object returned is a
Setup instance.DTDConstants.OBJECT section. The object returned is a
AbstractTarget.Aim instance.DTDConstants.FITSHEADER section. The object returned is a
Collection of FitsEntry instances.DTDConstants.CONSTANT section.
getTargetSpecific in interface TargetDefinitionidobj - An identifier, most likely a string.
public void setEnabled(boolean to)
setEnabled in interface Handablepublic boolean isEnabled()
isEnabled in interface Handablepublic void setFinished(boolean isready)
setFinished in interface Handablepublic boolean isFinished()
isFinished in interface Handablepublic void setPicked(boolean ispicked)
DTDConstants.PICK section when this method is called with a
false argument. Additionally, this method clears some flags:
setPicked in interface HandableHandable.errorMain(stella.ErrorEvent, stella.ErrorFinalizing, stella.ParameterClustering)public boolean isPicked()
setPicked(boolean) method.
isPicked in interface HandableHandable.setPicked(boolean)public boolean isNotify(UserProfile.Notifies condition)
isNotify in interface Handablecondition - An object-specific identifier for user notifiaction.
public void errorMain(ErrorEvent success,
ErrorFinalizing finish,
ParameterClustering set)
DTDConstants.IGNORE list, the
observation is considered successful, i.e. the error encounter is
spurious.DTDConstants.RETRY list and its
current retry-count has not reached the maximum retries, it is
rescheduled immediately, if it is still observable. If the maximum
retries are reached, the target is disabled.DTDConstants.DELAY list and its
current delay-count has not reached its maximum, the target is disabled
for the stated amount of time and may be picked afterwards. If the
maximum retries are reached, the target is disabled.DTDConstants.BLOCK list
or is unknown, further target picking is disabled.DTDConstants.ABORT section, the
abort flag is raised.
errorMain in interface Handablesuccess - The ErrorEvent outcome of the last sequence.at - The target which was executed and produced the outcome.processError(stella.ErrorEvent, stella.ErrorFinalizing, stella.ParameterClustering, java.util.List, java.util.List, java.lang.Integer, java.lang.Long, java.util.List, java.lang.Integer, java.util.List, java.util.List)
public void errorDaughter(ErrorEvent success,
ErrorFinalizing finish,
ParameterClustering set)
DTDConstants.IGNORE list, the
observation is considered successful, i.e. the error encounter is
spurious.DTDConstants.RETRY list and its
current retry-count has not reached the maximum retries, it is
rescheduled immediately, if it is still observable. If the maximum
retries are reached, the target is disabled.DTDConstants.DELAY list and its
current delay-count has not reached its maximum, the target is disabled
for the stated amount of time and may be picked afterwards. If the
maximum retries are reached, the target is disabled.DTDConstants.BLOCK list
or is unknown, further target picking is disabled.DTDConstants.ABORT section, the
abort flag is raised.
errorDaughter in interface Handablesuccess - The ErrorEvent outcome of the last sequence.at - The target which was executed and produced the outcome.processError(stella.ErrorEvent, stella.ErrorFinalizing, stella.ParameterClustering, java.util.List, java.util.List, java.lang.Integer, java.lang.Long, java.util.List, java.lang.Integer, java.util.List, java.util.List)
public void errorSuccessor(ErrorEvent success,
ErrorFinalizing finish,
ParameterClustering set)
DTDConstants.IGNORE list, the
observation is considered successful, i.e. the error encounter is
spurious.DTDConstants.RETRY list and its
current retry-count has not reached the maximum retries, it is
rescheduled immediately, if it is still observable. If the maximum
retries are reached, the target is disabled.DTDConstants.DELAY list and its
current delay-count has not reached its maximum, the target is disabled
for the stated amount of time and may be picked afterwards. If the
maximum retries are reached, the target is disabled.DTDConstants.BLOCK list
or is unknown, further target picking is disabled.DTDConstants.ABORT section, the
abort flag is raised.
errorSuccessor in interface Handablesuccess - The ErrorEvent outcome of the last sequence.at - The target which was executed and produced the outcome.processError(stella.ErrorEvent, stella.ErrorFinalizing, stella.ParameterClustering, java.util.List, java.util.List, java.lang.Integer, java.lang.Long, java.util.List, java.lang.Integer, java.util.List, java.util.List)
private void processError(ErrorEvent success,
ErrorFinalizing finish,
ParameterClustering set,
List blocklist,
List delaylist,
Integer delmax,
Long deltime,
List retrylist,
Integer retmax,
List ignorelist,
List abortlist)
DTDConstants.EXCEPTION section handed over. In particular, this
method deals with the DTDConstants.DELAY and the
DTDConstants.RETRY and the DTDConstants.ABORT section.
Note that this method no longer adds a pick entry to the document, this
is done whenever the addExecution(stella.ParameterClustering, java.util.Date, long, java.lang.String, java.lang.String) method is called.
public Date getSubmitted()
getSubmitted in interface HistoryAwarepublic boolean isProgramCompleted()
Appointable.isProgramOver(stella.ParameterClustering) method in the sense
that a program completion is not bound to current observing
circumstances, thus the normal action is that an appointable target whose
program is over, may set this flag for fast replies.
isProgramCompleted in interface HistoryAware
public void addExecution(ParameterClustering condition,
Date start,
long duration,
String unique,
String rem)
setPicked(boolean) method with true and the call to this
method, either a successful or non-successful pick is added. If the
current size of the history is already at the maximum history, first the
one pick is removed from the list. The first successful and unsuccessful
pick is always retained, the pick removed is the oldest one that is not
the first successful or unsuccessful pick.
addExecution in interface HistoryAwarestart - The actual observation start.duration - The duration of target observation, ms.rem - An optional comment.public List<HistoryAware.Pick> getEntireHistory()
getEntireHistory in interface HistoryAwarepublic int getPickCount()
getPickCount in interface HistoryAwarepublic HistoryAware.Pick getPick(int nr)
getPick in interface HistoryAwarepublic HistoryAware.Pick getFirstPick()
getFirstPick in interface HistoryAwarepublic HistoryAware.Pick getLastPick()
getLastPick in interface HistoryAwarepublic int getSuccessCount()
getSuccessCount in interface HistoryAwarepublic int getFailureCount()
getFailureCount in interface HistoryAwarepublic HistoryAware.Pick getFirstSuccess()
getFirstSuccess in interface HistoryAwarepublic HistoryAware.Pick getLastSuccess()
getLastSuccess in interface HistoryAwarepublic HistoryAware.Pick getSuccess(int index)
getSuccess in interface HistoryAwareindex - The index of the queried observation. Numbering starts with
zero.
public HistoryAware.Pick getFirstFailure()
getFirstFailure in interface HistoryAwarepublic HistoryAware.Pick getLastFailure()
getLastFailure in interface HistoryAwarepublic HistoryAware.Pick getFailure(int index)
getFailure in interface HistoryAwareindex - The index of the queried observation. Numbering starts with
zero.
public void clearHistory()
public boolean isObservable(ParameterClustering condition)
DTDConstants.REQUIRES
section is true, evaluated according to the parameters found in the
parameter cluster handed over.DTDConstants.CONSTRAINTs are fullfilled.
isObservable in interface Appointablecondition - The actual observing conditions. Conditions related to the
target
public double getActualMerit(ParameterClustering condition,
Collection oftargets,
long within)
TargetFragment expansion, at least one DTDConstants.GAIN
and one DTDConstants.TIMESLOT Meriting instance is
described. During initialization of the target, the timeslots
and gains are initialized. To calculate the total merit, all
gains are added and then multiplied with the timeslot. The resulting
double is returned.
getActualMerit in interface Appointablecondition - A set of actual observing conditionsoftargets - All targets relavant for this target.within - The timespan within the merit should be maximized.
public Appointable.Constraint getLastFail()
getLastFail in interface Appointablepublic double getLastMerit()
TargetMerit parameter.
getLastMerit in interface Appointablepublic double getHighestMerit()
getHighestMerit in interface Appointablepublic Date getHighestDate()
getHighestDate in interface Appointablepublic double getDailyMerit()
getDailyMerit in interface Appointablepublic Date getDailyDate()
getDailyDate in interface Appointablepublic boolean isProgramOver(ParameterClustering condition)
EndpointDefining instance for completeness. As soon as a program
is over, also the HistoryAware implementation part toggles to
program over.
isProgramOver in interface Appointable
private boolean checkOver(ParameterClustering condition,
List merits)
public long getRemainingTime(ParameterClustering set)
DTDConstants.CONSTRAINT list and determines
for each DTDConstants.VARIABLE parameter a remaining time via the
parameter's Increasing or Decreasing property. Even if
the parameter neither implements one of this interfaces, it can still
deliver a remaining time of zero, if the current parameter reading is out
of bounds.
getRemainingTime in interface Appointable
private long getRemainingTime(ParameterClustering set,
boolean info)
DTDConstants.CONSTRAINT list and determines
for each DTDConstants.VARIABLE parameter a remaining time via the
parameter's Increasing or Decreasing property. Even if
the parameter neither implements one of this interfaces, it can still
deliver a remaining time of zero, if the current parameter reading is out
of bounds.
public long getObservingTime(ParameterClustering set)
DTDConstants.DURATION element is given, it is parsed and this
value is returned. If no such element is given, all the exposure times
found in the setup sections of this target are evaluated and added
together. If this is a parent target class without a setup section, zero
is returned.
getObservingTime in interface Appointablepublic boolean isAbort(ParameterClustering set)
isAbort in interface Appointablepublic boolean isRetry(ParameterClustering set)
DTDConstants.RETRY clause
of the DTDConstants.EXCEPTION element, and the number of retries
have not reached the maximum retry count. Retry is also prohibited if the
current observation conditions block the target from observation.
isRetry in interface Appointablepublic String toString()
toString in class PropertyContainerpublic boolean equals(Object that)
equals in class Objectpublic int compareTo(Object o)
compareTo in interface Comparableprotected void setTargetType(String type)
public void setSubmitted(Date submit)
public void setTargetName(String name,
String id)
protected void setImageType(String itype)
protected void setTargetFile(File xml)
protected void setUser(String who)
protected void setTeam(List<String> who)
protected void setEmailAddresses(List<javax.mail.Address> address)
protected void setNotify(Set<UserProfile.Notifies> triggers)
protected void setTitle(String program)
protected void setDescription(String program)
protected void setInstitution(UserProfile.Affil who)
public void setDatabaseAccess(boolean read,
boolean write)
public void setHistoryDatabaseAccess(boolean read,
boolean write)
public void setHistory(List<HistoryAware.Pick> past,
int max)
past - The pick history of the target, good and bad picks.max - The maximum size of the history list.db - The history-db access boolean.public void setProgramCompleted(boolean over)
Appointable.isProgramOver(stella.ParameterClustering) method in the sense
that a program completion is not bound to current observing
circumstances, thus the normal action is that an appointable target whose
program is over, may set this flag for fast replies.
public int getHistoryMax()
public boolean getDatabaseWrite()
public boolean getDatabaseRead()
public boolean getHistoryDatabaseWrite()
public boolean getHistoryDatabaseRead()
protected void setErrors(Map<String,List<String>> blockmap,
Map<String,List<String>> delaymap,
Map<String,List<String>> abortmap,
Map<String,List<String>> retrymap,
Map<String,List<String>> ignoremap)
protected Map[] getErrors()
protected void setDelayAndRetry(Map<String,Integer> delmax,
Map<String,Long> delfor,
Map<String,Integer> retmax)
delmax - Mapping of exception target to maximum delays.delfor - Mapping of exception target to delay times.retmax - Mapping of exception target to maximum retries.protected Map[] getDelayAndRetry()
protected void setRequires(ExpressionEvaluator necessary)
protected ExpressionEvaluator getRequires()
protected void setConstraints(List<Appointable.Constraint> prevent)
public List<Appointable.Constraint> getConstraints()
ParsedTarget.Constraint objects this target is subject to.
protected void setMerits(List<Meriting> multiplicative,
List<Meriting> additive)
protected List[] getMerits()
protected void setRateRequires(ExpressionEvaluator necessary)
protected ExpressionEvaluator getRateRequires()
protected void setRateConstraints(List<Appointable.Constraint> prevent)
protected List<Appointable.Constraint> getRateConstraints()
ParsedTarget.Constraint objects this target is subject to
at rating.
protected void setDuration(ExpressionEvaluator durcalc)
protected ExpressionEvaluator getDuration()
protected void setSetups(Map instrumentation)
public Map<Object,Object> getSetups()
Setup objects of this target.
protected void setAstronomicalData(Map astro)
protected Map getAstronomicalData()
protected void setFitsHeader(Map fits)
protected Map getFitsHeader()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||