Revision 44742
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/programming/CreateFnFunction.java | ||
---|---|---|
29 | 29 |
super(Function.GROUP_PROGRAMMING, |
30 | 30 |
NAME, |
31 | 31 |
Range.between(2, 6), |
32 |
"This function allows you to define functions within the expression evaluator.\n" + |
|
33 |
"We can define three types of functions:\n" + |
|
34 |
"\n<ul>" + |
|
35 |
"<li>Functions defined in the evaluator itself.</li>\n" + |
|
36 |
"<li>Functions implemented as a static method of a java class.</li>\n" + |
|
37 |
"<li>Functions defined in an external script.</li>\n" + |
|
38 |
"\n</ul>" + |
|
39 |
"<b> Functions defined in the evaluator itself. </b>\n" + |
|
40 |
"\n" + |
|
41 |
"They have the form:\n" + |
|
42 |
"\n" + |
|
43 |
"<pre>\n" + |
|
44 |
"CREATE PROCEDURE myfun param1 AS\n" + |
|
45 |
"BEGIN\n" + |
|
46 |
" RETURN 'Hello' || param1;\n" + |
|
47 |
"END PROCEDURE\n" + |
|
48 |
"</pre>\n" + |
|
49 |
"\n" + |
|
50 |
"<b> Functions implemented as a static method </b>\n" + |
|
51 |
"\n" + |
|
52 |
"They allow defining a function that will invoke a static method of a java class.\n" + |
|
53 |
"\n" + |
|
54 |
"They have the form:\n" + |
|
55 |
"\n" + |
|
56 |
"<pre>\n" + |
|
57 |
"CREATE FUNCTION getCRS (crs) AS 'org.gvsig.fmap.crs.CRSFactory', 'getCRS' LANGUAGE 'java'\n" + |
|
58 |
"</pre>\n" + |
|
59 |
"\n" + |
|
60 |
"Defines the \"getCRS\" function that receives a single parameter, and links it to the method\n" + |
|
61 |
"static 'getCRS' of class 'org.gvsig.fmap.crs.CRSFactory',\n" + |
|
62 |
"\n" + |
|
63 |
"<b> Functions defined in an external script. </b>\n" + |
|
64 |
"\n" + |
|
65 |
"It allows defining functions that are implemented in an external script module.\n" + |
|
66 |
"\n" + |
|
67 |
"They have the form:\n" + |
|
68 |
"\n" + |
|
69 |
"<pre>\n" + |
|
70 |
"CREATE FUNCTION getCRS (crs) AS 'scripts / crs.py', 'getCRS' LANGUAGE 'python'\n" + |
|
71 |
"</pre>\n" + |
|
72 |
"\n" + |
|
73 |
"What defines a \"getCRS\" function that is implemented in the python module\n" + |
|
74 |
"located in \"Users / crs\" with the name 'getCRS'.", |
|
32 | 75 |
null, |
33 | 76 |
null, |
34 |
null, |
|
35 | 77 |
"Object", |
36 | 78 |
false |
37 | 79 |
); |
... | ... | |
39 | 81 |
|
40 | 82 |
@Override |
41 | 83 |
public boolean isHidden() { |
42 |
return true;
|
|
84 |
return false;
|
|
43 | 85 |
} |
44 | 86 |
|
45 | 87 |
@Override |
Also available in: Unified diff