public class SodUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static edu.iris.Fissures.model.UnitImpl[] |
FREQ_UNITS |
static org.python.util.PythonInterpreter |
interpreter |
static edu.iris.Fissures.model.UnitImpl[] |
LENGTH_UNITS |
static int |
pythonClassNum |
static edu.iris.Fissures.model.UnitImpl[] |
TIME_UNITS |
Constructor and Description |
---|
SodUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
copyFile(java.lang.String src,
java.lang.String dest) |
static void |
copyStream(java.io.InputStream src,
java.lang.String dest) |
static java.util.Calendar |
createCalendar(int year,
int month,
int day,
int hour,
int minute,
int second,
boolean ceiling)
Creates a calendar in the given year.
|
static java.lang.String |
elementPath(org.w3c.dom.Element e) |
static void |
fillInField(int field,
int value,
boolean ceiling,
java.util.Calendar cal) |
static java.lang.String |
getAbsolutePath(java.lang.String baseLoc,
java.lang.String relativeLoc) |
static java.util.List<org.w3c.dom.Element> |
getAllElements(org.w3c.dom.Element config,
java.lang.String elementName)
returns all the element with the given name
|
static MicroSecondDateSupplier |
getEarlierSupplier(edu.iris.Fissures.model.TimeInterval duration) |
static org.w3c.dom.Element |
getElement(org.w3c.dom.Element config,
java.lang.String elementName)
returns the first element with the given name, null if none exists.
|
static org.w3c.dom.Element |
getFirstEmbeddedElement(org.w3c.dom.Element config) |
protected static java.lang.String |
getJythonAcceptArgs(java.lang.Class mustImplement) |
static MicroSecondDateSupplier |
getLaterSupplier(edu.iris.Fissures.model.TimeInterval duration) |
static java.lang.String |
getNestedText(org.w3c.dom.Element config)
returns the nested text in the tag *
|
static org.python.util.PythonInterpreter |
getPythonInterpreter() |
static java.lang.String |
getRelativePath(java.lang.String fromPath,
java.lang.String toPath,
java.lang.String separator) |
static java.lang.String |
getSimpleName(java.lang.Class c) |
static java.lang.String |
getText(org.w3c.dom.Element config)
returns the first text child within the node.
|
protected static java.lang.Object |
inlineJython(java.lang.String className,
java.lang.Class mustImplement,
java.lang.String jythonCode) |
static int[] |
intArrayFromList(java.util.List list) |
static boolean |
isTrue(org.w3c.dom.Element el,
java.lang.String tagName,
boolean defaultResult) |
static boolean |
isTrueText(java.lang.String nestedText) |
void |
listKnownScriptEngines() |
static java.lang.Object |
load(org.w3c.dom.Element config,
java.util.List<java.lang.String> armNames) |
static java.lang.Object |
load(org.w3c.dom.Element config,
java.lang.String armName) |
static java.lang.Object |
load(org.w3c.dom.Element config,
java.lang.String[] armNames) |
static edu.iris.Fissures.model.BoxAreaImpl |
loadBoxArea(org.w3c.dom.Element config) |
static java.awt.Dimension |
loadDimensions(org.w3c.dom.Element element) |
static java.lang.Object |
loadExternal(java.lang.String tagName,
java.lang.String[] armNames,
org.w3c.dom.Element config)
loads the class named in the element "classname" in config with config as
a costructor argument.
|
static float |
loadFloat(org.w3c.dom.Element config,
java.lang.String elementName,
float defaultValue) |
static int |
loadInt(org.w3c.dom.Element config,
java.lang.String elementName,
int defaultValue) |
static java.lang.Object |
loadJython(java.lang.String tagName,
java.lang.String[] armNames,
org.w3c.dom.Element config) |
static void |
loadProperties(org.w3c.dom.Element config,
java.util.Properties props) |
static edu.iris.Fissures.model.QuantityImpl |
loadQuantity(org.w3c.dom.Element config) |
static java.lang.String |
loadText(org.w3c.dom.Element config,
java.lang.String elementName,
java.lang.String defaultValue) |
static MicroSecondDateSupplier |
loadTime(org.w3c.dom.Element el) |
static MicroSecondDateSupplier |
loadTime(org.w3c.dom.Element el,
boolean endOfDay) |
static edu.iris.Fissures.model.TimeInterval |
loadTimeInterval(org.w3c.dom.Element config) |
static MicroSecondTimeRangeSupplier |
loadTimeRange(org.w3c.dom.Element config) |
static edu.iris.Fissures.model.UnitImpl |
loadUnit(org.w3c.dom.Element config) |
static edu.iris.Fissures.model.UnitRangeImpl |
loadUnitRange(org.w3c.dom.Element config) |
static java.io.File |
makeOutputDirectory(org.w3c.dom.Element config) |
static java.lang.String |
nodeValueOfXPath(org.w3c.dom.Element el,
java.lang.String xpath) |
static MicroSecondDateSupplier |
nowSupplier() |
public static org.python.util.PythonInterpreter interpreter
public static int pythonClassNum
public static final edu.iris.Fissures.model.UnitImpl[] LENGTH_UNITS
public static final edu.iris.Fissures.model.UnitImpl[] TIME_UNITS
public static final edu.iris.Fissures.model.UnitImpl[] FREQ_UNITS
public static boolean isTrue(org.w3c.dom.Element el, java.lang.String tagName, boolean defaultResult)
public static boolean isTrueText(java.lang.String nestedText)
public static java.io.File makeOutputDirectory(org.w3c.dom.Element config) throws ConfigurationException
ConfigurationException
public static java.lang.Object load(org.w3c.dom.Element config, java.lang.String armName) throws ConfigurationException
ConfigurationException
public static java.lang.Object load(org.w3c.dom.Element config, java.util.List<java.lang.String> armNames) throws ConfigurationException
ConfigurationException
public static java.lang.Object load(org.w3c.dom.Element config, java.lang.String[] armNames) throws ConfigurationException
ConfigurationException
public static java.lang.String elementPath(org.w3c.dom.Element e)
public static org.python.util.PythonInterpreter getPythonInterpreter()
public static java.lang.Object loadJython(java.lang.String tagName, java.lang.String[] armNames, org.w3c.dom.Element config) throws java.lang.Exception
java.lang.Exception
public void listKnownScriptEngines()
protected static java.lang.Object inlineJython(java.lang.String className, java.lang.Class mustImplement, java.lang.String jythonCode) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
protected static java.lang.String getJythonAcceptArgs(java.lang.Class mustImplement)
public static java.lang.Object loadExternal(java.lang.String tagName, java.lang.String[] armNames, org.w3c.dom.Element config) throws java.lang.Exception
java.lang.Exception
public static edu.iris.Fissures.model.UnitImpl loadUnit(org.w3c.dom.Element config) throws ConfigurationException
ConfigurationException
public static MicroSecondDateSupplier loadTime(org.w3c.dom.Element el) throws ConfigurationException
ConfigurationException
public static MicroSecondDateSupplier loadTime(org.w3c.dom.Element el, boolean endOfDay) throws ConfigurationException
ConfigurationException
public static MicroSecondDateSupplier nowSupplier()
public static java.util.Calendar createCalendar(int year, int month, int day, int hour, int minute, int second, boolean ceiling)
public static void fillInField(int field, int value, boolean ceiling, java.util.Calendar cal)
public static MicroSecondDateSupplier getEarlierSupplier(edu.iris.Fissures.model.TimeInterval duration)
public static MicroSecondDateSupplier getLaterSupplier(edu.iris.Fissures.model.TimeInterval duration)
public static edu.iris.Fissures.model.TimeInterval loadTimeInterval(org.w3c.dom.Element config) throws ConfigurationException
ConfigurationException
public static edu.iris.Fissures.model.QuantityImpl loadQuantity(org.w3c.dom.Element config) throws ConfigurationException
ConfigurationException
public static int loadInt(org.w3c.dom.Element config, java.lang.String elementName, int defaultValue)
public static float loadFloat(org.w3c.dom.Element config, java.lang.String elementName, float defaultValue)
public static java.lang.String loadText(org.w3c.dom.Element config, java.lang.String elementName, java.lang.String defaultValue)
public static void copyFile(java.lang.String src, java.lang.String dest) throws java.io.FileNotFoundException
java.io.FileNotFoundException
public static void copyStream(java.io.InputStream src, java.lang.String dest)
public static edu.iris.Fissures.model.UnitRangeImpl loadUnitRange(org.w3c.dom.Element config) throws ConfigurationException
ConfigurationException
public static MicroSecondTimeRangeSupplier loadTimeRange(org.w3c.dom.Element config) throws ConfigurationException
ConfigurationException
public static java.awt.Dimension loadDimensions(org.w3c.dom.Element element) throws java.lang.Exception
java.lang.Exception
public static java.lang.String nodeValueOfXPath(org.w3c.dom.Element el, java.lang.String xpath) throws org.w3c.dom.DOMException, javax.xml.transform.TransformerException
org.w3c.dom.DOMException
javax.xml.transform.TransformerException
public static edu.iris.Fissures.model.BoxAreaImpl loadBoxArea(org.w3c.dom.Element config) throws ConfigurationException
ConfigurationException
public static org.w3c.dom.Element getElement(org.w3c.dom.Element config, java.lang.String elementName)
public static java.util.List<org.w3c.dom.Element> getAllElements(org.w3c.dom.Element config, java.lang.String elementName)
public static org.w3c.dom.Element getFirstEmbeddedElement(org.w3c.dom.Element config)
public static java.lang.String getText(org.w3c.dom.Element config)
public static java.lang.String getNestedText(org.w3c.dom.Element config)
public static java.lang.String getRelativePath(java.lang.String fromPath, java.lang.String toPath, java.lang.String separator)
public static java.lang.String getAbsolutePath(java.lang.String baseLoc, java.lang.String relativeLoc) throws java.io.IOException
java.io.IOException
public static void loadProperties(org.w3c.dom.Element config, java.util.Properties props)
public static int[] intArrayFromList(java.util.List list)
public static java.lang.String getSimpleName(java.lang.Class c)