org.mmbase.module.builders
Class AnnotRel
java.lang.Object
|
+--org.mmbase.module.core.MMTable
|
+--org.mmbase.module.core.MMObjectBuilder
|
+--org.mmbase.module.corebuilders.InsRel
|
+--org.mmbase.module.builders.AnnotRel
- public class AnnotRel
- extends InsRel
- Version:
- 8 Dec 1999
- Author:
- David van Zeventer
| Fields inherited from class org.mmbase.module.core.MMObjectBuilder |
broadcastChanges, className, database, debug, description, descriptions, fields, NODE_MAX_SIZE, nodeCache, obj2type, OBJ2TYPE_MAX_SIZE, oType, replaceCache, searchAge, sortedDBLayout, TEMPNODE_DEFAULT_SIZE, TemporaryNodes, virtual |
|
Method Summary |
java.lang.String |
getGUIIndicator(java.lang.String field,
MMObjectNode node)
What should a GUI display for this node/field combo. |
java.lang.Object |
getValue(MMObjectNode node,
java.lang.String field)
Provides additional functionality when obtaining field values. |
boolean |
process(scanpage sp,
java.util.Hashtable cmds,
java.util.Hashtable vars)
The hook that passes all form related pages to the correct handler. |
java.lang.String |
replace(scanpage sp,
java.util.StringTokenizer command)
Obtains a string value by performing the provided command. |
void |
setDefaults(MMObjectNode node)
Sets defaults for a node. |
boolean |
setValue(MMObjectNode node,
java.lang.String field)
Provides additional functionality when setting field values. |
| Methods inherited from class org.mmbase.module.corebuilders.InsRel |
deleteRelationCache, deleteRelationCache, getAllRelationsVector, getGuessedNumber, getRelated, getRelated, getRelated, getRelated, getRelated, getRelated, getRelatedVector, getRelatedVector, getRelation, getRelations, getRelations, getRelations, getRelationsVector, getRelationsVector, hasRelations, init, insert, insert, reldefCorrect, removeNode |
| Methods inherited from class org.mmbase.module.core.MMObjectBuilder |
addField, addLocalObserver, addRemoteObserver, buildSet, checkAddTmpField, commit, convertMMNode2SQL, count, create, createAlias, created, debug, deleteNodeCache, executeFunction, fieldLocalChanged, getAge, getAliasedNode, getCacheNumbers, getCacheSize, getCacheSize, getClassName, getDBByte, getDBKey, getDBState, getDBText, getDBType, getDefaultTeaser, getDefaultUrl, getDescription, getDescriptions, getDutchSName, getEditFields, getField, getFieldNames, getFields, getFullTableName, getFunctionParameters, getGUIIndicator, getHardNode, getHTML, getInitParameter, getInitParameters, getList, getMachineName, getMaintainer, getNewNode, getNewTmpNode, getNextField, getNode, getNode, getNodeType, getNumberFromName, getPluralName, getPluralName, getPluralNames, getRelations_main, getSearchAge, getShort, getShortedByte, getShortedText, getSingularName, getSingularName, getSingularNames, getSmartPath, getSortedFields, getSortedListFields, getTableName, getTmpNode, getURLEncode, getVersion, getWAP, getXMLPath, getXMLSetup, hostname_function, init_obj2type, insert, insertDone, isNodeCached, isVirtual, isXMLConfig, nodeLocalChanged, nodeRemoteChanged, preCommit, preEdit, process, putTmpNode, readSearchResults, removeField, removeRelations, removeTmpNode, search, search, search, searchIn, searchIn, searchIn, searchNumbers, searchVector, searchVector, searchVector, searchVector, searchVectorIn, searchVectorIn, searchVectorIn, searchVectorIn, searchWithWhere, sendFieldChangeSignal, setClassName, setDBLayout_xml, setDBLayout, setDebug, setDescription, setDescriptions, setDutchSName, setInitParameter, setMaintainer, setMMBase, setPluralNames, setSearchAge, setSingularNames, setTableName, setVersion, setXmlConfig, setXMLPath, setXMLValues, signalNewObject, testValidData, toXML, waitUntilNodeChanged, wrap |
| Methods inherited from class org.mmbase.module.core.MMTable |
size |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HOURS
public static final int HOURS
MINUTES
public static final int MINUTES
SECONDS
public static final int SECONDS
MILLIS
public static final int MILLIS
AnnotRel
public AnnotRel()
setDefaults
public void setDefaults(MMObjectNode node)
- Sets defaults for a node.
Initializes all numeric fields to 0, and sets the annotation type to
MILLIS.
- Overrides:
setDefaults in class InsRel
- Parameters:
node - The node to set the defaults of.
getGUIIndicator
public java.lang.String getGUIIndicator(java.lang.String field,
MMObjectNode node)
- What should a GUI display for this node/field combo.
Displays the pos, end, and length fields as time-values,
and the annotation type field as a descriptive string.
- Overrides:
getGUIIndicator in class InsRel
- Parameters:
node - The node to displayfield - the name field of the field to display- Returns:
- the display of the node's field as a
String, null if not specified
process
public boolean process(scanpage sp,
java.util.Hashtable cmds,
java.util.Hashtable vars)
- The hook that passes all form related pages to the correct handler.
This method is not supported.
- Parameters:
sp - The scanpagecommand - the command to executecmds - the commands (PRC-CMD) to processvars - variables (PRC-VAR) to use- Returns:
- the result value as a
String
replace
public java.lang.String replace(scanpage sp,
java.util.StringTokenizer command)
- Obtains a string value by performing the provided command.
This method is not supported.
- Overrides:
replace in class MMObjectBuilder
- Parameters:
sp - The scanpagetok - the command to execute- Returns:
- the result value as a
String
setValue
public boolean setValue(MMObjectNode node,
java.lang.String field)
- Provides additional functionality when setting field values.
This method makes sure that the pos, end, and length values have the
correct value.
- Overrides:
setValue in class MMObjectBuilder
- Parameters:
node - the node whose fields are changedfield - the fieldname that is changed- Returns:
true if the call was handled.
getValue
public java.lang.Object getValue(MMObjectNode node,
java.lang.String field)
- Description copied from class:
MMObjectBuilder
- Provides additional functionality when obtaining field values.
This method is called whenever a Node of the builder's type fails at evaluating a getValue() request
(generally when a fieldname is supplied that doesn't exist).
It allows the system to add 'functions' to be included with a field name, such as 'html(body)' or 'time(lastmodified)'.
This method will parse the fieldname, determining functions and calling the
MMObjectBuilder.executeFunction(org.mmbase.module.core.MMObjectNode, java.lang.String, java.lang.String) method to handle it.
Functions in fieldnames can be given in the format 'functionname(fieldname)'. An old format allows 'functionname_fieldname' instead,
though this only applies to the text functions 'short', 'html', and 'wap'.
Functions can be nested, i.e. 'html(shorted(body))'.
Derived builders should override this method only if they want to provide virtual fieldnames. To provide addiitonal functions,
override MMObjectBuilder.executeFunction(org.mmbase.module.core.MMObjectNode, java.lang.String, java.lang.String) instead.
- Overrides:
getValue in class MMObjectBuilder
- Following copied from class:
org.mmbase.module.core.MMObjectBuilder
- Parameters:
node - the node whos efields are queriesfield - the fieldname that is requested- Returns:
- the result of the 'function', or null if no valid functions could be determined.
MMBase 2001