HPSearch

cgl.hpsearch.shell.system
Class Sys

java.lang.Object
  extended byorg.mozilla.javascript.ScriptableObject
      extended bycgl.hpsearch.shell.system.Sys
All Implemented Interfaces:
Scriptable, Serializable

public class Sys
extends ScriptableObject

Sys object provides handles to various functions as detailed below. For quick operations, we add functions to this object.
Refer Notes for detailed function listing

Author:
Harshawardhan Gadgil (hgadgil@grids.ucs.indiana.edu)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.mozilla.javascript.ScriptableObject
DONTENUM, EMPTY, parent, PERMANENT, prototype, READONLY
 
Fields inherited from interface org.mozilla.javascript.Scriptable
NOT_FOUND
 
Constructor Summary
Sys()
           
 
Method Summary
 String getClassName()
           
 void jsConstructor()
           
static String jsFunction_GenerateUUID(Context _cx, Scriptable _thisObj, Object[] args, Function funObj)
          Returns a new Time based UUID
static String jsFunction_getHostAddress(Context _cx, Scriptable _thisObj, Object[] args, Function funObj)
          Prints the given string on standard out / standard ERR stream
static boolean jsFunction_InitCommLink(Context _cx, Scriptable _thisObj, Object[] args, Function funObj)
          Try to start NB commnunication Link for task scheduler
static void jsFunction_print(Context _cx, Scriptable _thisObj, Object[] args, Function funObj)
          Prints the given string on standard out / standard ERR stream
static void jsFunction_println(Context _cx, Scriptable _thisObj, Object[] args, Function funObj)
          Prints the given string on standard out / standard ERR stream followed by a '\n'
static void jsFunction_run(Context _cx, Scriptable _thisObj, Object[] args, Function funObj)
          Runs the specified script
static void jsFunction_sleep(Context _cx, Scriptable _thisObj, Object[] args, Function funObj)
           
static int jsFunction_test(Context _cx, Scriptable _thisObj, Object[] args, Function funObj)
          Test Function
static Object jsFunction_xpath(Context _cx, Scriptable _thisObj, Object[] args, Function funObj)
          XPath invocation handler
Sys.xpath(xml, xpath-command);
E.g.
 String jsGet_date()
          Returns the system date in String format
 
Methods inherited from class org.mozilla.javascript.ScriptableObject
callMethod, defineClass, defineClass, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, get, get, getAllIds, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, has, has, hasInstance, hasProperty, hasProperty, isSealed, put, put, putProperty, putProperty, sealObject, setAttributes, setAttributes, setParentScope, setPrototype
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sys

public Sys()
Method Detail

jsConstructor

public void jsConstructor()

getClassName

public String getClassName()

jsFunction_test

public static int jsFunction_test(Context _cx,
                                  Scriptable _thisObj,
                                  Object[] args,
                                  Function funObj)
Test Function


jsFunction_GenerateUUID

public static String jsFunction_GenerateUUID(Context _cx,
                                             Scriptable _thisObj,
                                             Object[] args,
                                             Function funObj)
Returns a new Time based UUID


jsFunction_InitCommLink

public static boolean jsFunction_InitCommLink(Context _cx,
                                              Scriptable _thisObj,
                                              Object[] args,
                                              Function funObj)
Try to start NB commnunication Link for task scheduler


jsFunction_getHostAddress

public static String jsFunction_getHostAddress(Context _cx,
                                               Scriptable _thisObj,
                                               Object[] args,
                                               Function funObj)
Prints the given string on standard out / standard ERR stream


jsFunction_print

public static void jsFunction_print(Context _cx,
                                    Scriptable _thisObj,
                                    Object[] args,
                                    Function funObj)
Prints the given string on standard out / standard ERR stream


jsFunction_println

public static void jsFunction_println(Context _cx,
                                      Scriptable _thisObj,
                                      Object[] args,
                                      Function funObj)
Prints the given string on standard out / standard ERR stream followed by a '\n'


jsGet_date

public String jsGet_date()
Returns the system date in String format

Returns:
Date

jsFunction_run

public static void jsFunction_run(Context _cx,
                                  Scriptable _thisObj,
                                  Object[] args,
                                  Function funObj)
Runs the specified script


jsFunction_sleep

public static void jsFunction_sleep(Context _cx,
                                    Scriptable _thisObj,
                                    Object[] args,
                                    Function funObj)

jsFunction_xpath

public static Object jsFunction_xpath(Context _cx,
                                      Scriptable _thisObj,
                                      Object[] args,
                                      Function funObj)
XPath invocation handler
Sys.xpath(xml, xpath-command);
E.g. Sys.xpath(x, "//states[@state_abbr='IN']/attribute::state_name");

Returns:
Empty string OR an array containing the matched nodes (XML)

HPSearch

For comments and suggestions please send e-mail to Harshawardhan Gadgil
Last updated: June 9 2006