|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectedu.berkeley.guir.ptk.PTK
edu.berkeley.guir.ptk.abstraction.Abstractor
Abstractor is the based class that defines the functionality for abstraction.
The doAbstract method determines how an event's data will be
abstracted (i.e., modified to answer a question notification setters
and/or an output care to ask about the data. This is the method you should
implement when you extend this class.
See the package comments for more information on how to write an Abstractor, customize an existing one, and more.
| Field Summary | |
java.lang.String[] |
data_ids_I_want
An array of data IDs (as Strings) that specify which data withint an Event this Abstractor can to abstract. |
boolean |
replace_data
Flag that can be used to specify if an abstractor should remove the original data from an event and replace it with the new data; set to false by default, which means that the original data in an event will be left as is and abstracted data will be added to the event. |
| Fields inherited from class edu.berkeley.guir.ptk.PTK |
debug, MAX_DEBUG, MED_DEBUG, MIN_DEBUG, NO_DEBUG |
| Constructor Summary | |
Abstractor()
|
|
| Method Summary | |
void |
addMetadataIWant(Metadata mds)
Performs a deep copy of the MetadataItems in the array passed in to the metadata_I_want data field. |
boolean |
canIAbstract(Event e)
Compares the given metadata items to this Abstractor's metadata. |
abstract boolean |
doAbstract(Event e,
History h)
Performs the abstraction of the event e as specified by the class that implements this interface. |
Metadata[] |
getAllMetadata()
Returns all Metadata objects that indicate all input events the abstractor can abstract (used for connections to multiple inputs). |
Metadata |
getFirstMetadata()
Returns only the first Metadata object; for abstractors that connect to only a single input, the first will be the ONLY Metadata object. |
| Methods inherited from class edu.berkeley.guir.ptk.PTK |
getMAX, getMED, getMIN, getNO, printDebug, printDebug, printError |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public java.lang.String[] data_ids_I_want
public boolean replace_data
if (replace_data) e.removeAllData();. Library abstractors
already include this line.
| Constructor Detail |
public Abstractor()
| Method Detail |
public abstract boolean doAbstract(Event e,
History h)
e - h -
public boolean canIAbstract(Event e)
public void addMetadataIWant(Metadata mds)
public Metadata getFirstMetadata()
public Metadata[] getAllMetadata()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||