public abstract class FreeplaneScriptBaseClass
extends groovy.lang.Script
| Modifier and Type | Class and Description |
|---|---|
static class |
FreeplaneScriptBaseClass.ConfigProperties
Accessor for Freeplane's configuration: In scripts available
as "global variable"
config. |
| Constructor and Description |
|---|
FreeplaneScriptBaseClass() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
format(java.lang.Object object)
Applies default date-time format for dates or default number format for numbers.
|
java.lang.Object |
format(java.lang.Object object,
java.lang.String formatString)
uses formatString to return a FormattedObject.
|
java.lang.Object |
getProperty(java.lang.String property) |
java.lang.Object |
ifNull(java.lang.Object value,
java.lang.Object valueIfNull)
returns valueIfNull if value is null and value otherwise.
|
void |
initBinding() |
java.lang.Object |
invokeMethod(java.lang.String methodName,
java.lang.Object args) |
void |
loadUri(java.net.URI uri)
opens a
URI |
Proxy.NodeRO |
N(java.lang.String id)
Shortcut for node.map.node(id) - necessary for ids to other maps.
|
java.lang.Object |
parse(java.lang.String text)
parses text to the proper data type, if possible, setting format to the standard.
|
java.lang.Long |
round(java.lang.Double d)
rounds a number to integral type.
|
java.lang.Double |
round(java.lang.Double d,
int precision)
round to the given number of decimal places:
round(0.1234, 2) -> 0.12 |
void |
setBinding(groovy.lang.Binding binding) |
java.lang.String |
T(java.lang.String id)
Shortcut for node.map.node(id).text.
|
java.lang.String |
toString(java.lang.Object o)
formats according to the internal standard, that is the conversion will be reversible
for types that are handled special by the scripting api namely Dates and Numbers.
|
java.lang.Object |
V(java.lang.String id)
Shortcut for node.map.node(id).value.
|
public void initBinding()
public void setBinding(groovy.lang.Binding binding)
setBinding in class groovy.lang.Scriptpublic java.lang.Object getProperty(java.lang.String property)
getProperty in interface groovy.lang.GroovyObjectgetProperty in class groovy.lang.Scriptpublic java.lang.Object invokeMethod(java.lang.String methodName,
java.lang.Object args)
invokeMethod in interface groovy.lang.GroovyObjectinvokeMethod in class groovy.lang.Scriptpublic Proxy.NodeRO N(java.lang.String id)
public java.lang.String T(java.lang.String id)
public java.lang.Object V(java.lang.String id)
public java.lang.Object ifNull(java.lang.Object value,
java.lang.Object valueIfNull)
public java.lang.Long round(java.lang.Double d)
public java.lang.Double round(java.lang.Double d,
int precision)
round(0.1234, 2) -> 0.12public java.lang.Object parse(java.lang.String text)
public java.lang.Object format(java.lang.Object object,
java.lang.String formatString)
IFormattedObject if object is formattable and the unchanged object otherwise.public java.lang.Object format(java.lang.Object object)
IFormattedObject if object is formattable and the unchanged object otherwise.public java.lang.String toString(java.lang.Object o)
Convertible.toString(Object)public void loadUri(java.net.URI uri)
URI