Class AnnotRel


public class AnnotRel
extends InsRel

8 Dec 1999
David van Zeventer

Field Summary
static int HOURS
static int MILLIS
static int MINUTES
static int SECONDS
Fields inherited from class org.mmbase.module.corebuilders.InsRel
classname, relnumber, usesdir
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
Fields inherited from class org.mmbase.module.core.MMTable
mmb, tableName
Constructor Summary
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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


public static final int HOURS


public static final int MINUTES


public static final int SECONDS


public static final int MILLIS
Constructor Detail


public AnnotRel()
Method Detail


public void setDefaults(MMObjectNode node)
Sets defaults for a node. Initializes all numeric fields to 0, and sets the annotation type to MILLIS.
setDefaults in class InsRel
node - The node to set the defaults of.


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.
getGUIIndicator in class InsRel
node - The node to display
field - the name field of the field to display
the display of the node's field as a String, null if not specified


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.
sp - The scanpage
command - the command to execute
cmds - the commands (PRC-CMD) to process
vars - variables (PRC-VAR) to use
the result value as a String


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.
replace in class MMObjectBuilder
sp - The scanpage
tok - the command to execute
the result value as a String


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.
setValue in class MMObjectBuilder
node - the node whose fields are changed
field - the fieldname that is changed
true if the call was handled.


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.
getValue in class MMObjectBuilder
Following copied from class: org.mmbase.module.core.MMObjectBuilder
node - the node whos efields are queries
field - the fieldname that is requested
the result of the 'function', or null if no valid functions could be determined.

MMBase 2001