|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nasa.worldwind.util.WWXML
public class WWXML
A collection of static methods use for opening, reading and otherwise working with XML files.
| Constructor Summary | |
|---|---|
WWXML()
|
|
| Method Summary | |
|---|---|
static org.w3c.dom.Element |
appendBoolean(org.w3c.dom.Element context,
java.lang.String path,
boolean value)
Append a heirarcy of new elements with a path to a context element, ending with a text element with a specified value. |
static org.w3c.dom.Element |
appendDouble(org.w3c.dom.Element context,
java.lang.String path,
double value)
Append a heirarcy of new elements with a path to a context element, ending with a text element with a specified value. |
static org.w3c.dom.Element |
appendElement(org.w3c.dom.Element context,
java.lang.String name)
Append a new element with a specified name to a context element. |
static org.w3c.dom.Element |
appendElementPath(org.w3c.dom.Element context,
java.lang.String path)
Append a heirarcy of new elements with a path to a context element. |
static org.w3c.dom.Element |
appendInteger(org.w3c.dom.Element context,
java.lang.String path,
int value)
Append a heirarcy of new elements with a path to a context element, ending with a text element with a specified value. |
static org.w3c.dom.Element |
appendLatLon(org.w3c.dom.Element context,
java.lang.String path,
LatLon ll)
Append a heirarcy of new elements with a path to a context element, ending with an element formatted as a LatLon. |
static org.w3c.dom.Element |
appendLong(org.w3c.dom.Element context,
java.lang.String path,
long value)
Append a heirarcy of new elements with a path to a context element, ending with a text element with a specified value. |
static org.w3c.dom.Element |
appendScreenCredit(org.w3c.dom.Element context,
java.lang.String path,
ScreenCredit screenCredit)
Append a heirarcy of new elements with a path to a context element, ending with an element formatted as a ScreenCredit. |
static org.w3c.dom.Element |
appendSector(org.w3c.dom.Element context,
java.lang.String path,
Sector sector)
Append a heirarcy of new elements with a path to a context element, ending with an element formatted as a Sector. |
static org.w3c.dom.Element |
appendSectorResolutionLimit(org.w3c.dom.Element context,
java.lang.String path,
LevelSet.SectorResolution sectorResolution)
Append a heirarcy of new elements with a path to a context element, ending with an element formatted as a LevelSet.SectorResolutionLimit. |
static org.w3c.dom.Element |
appendText(org.w3c.dom.Element context,
java.lang.String path,
java.lang.String string)
Append a heirarcy of new elements with a path to a context element, ending with a text element with a specified value. |
static org.w3c.dom.Element[] |
appendTextArray(org.w3c.dom.Element context,
java.lang.String path,
java.lang.String[] strings)
For each non-null string in a specified array, appends a heirarcy of new elements with a path to a context element, ending with a text element with a specified value. |
static org.w3c.dom.Element |
appendTimeInMillis(org.w3c.dom.Element context,
java.lang.String path,
long timeInMillis)
Append a heirarcy of new elements with a path to a context element, ending with an element formatted as a time in milliseconds. |
static java.lang.String |
byteOrderAsText(java.lang.String byteOrder)
Returns the string text for a specified byte order constant. |
static void |
checkAndAppendBooleanElement(AVList params,
java.lang.String paramKey,
org.w3c.dom.Element context,
java.lang.String path)
Checks a parameter list for a specified key and if present attempts to append new elements represeting the parameter to a specified context. |
static void |
checkAndAppendDoubleElement(AVList params,
java.lang.String paramKey,
org.w3c.dom.Element context,
java.lang.String path)
Checks a parameter list for a specified key and if present attempts to append new elements represeting the parameter to a specified context. |
static void |
checkAndAppendIntegerlement(AVList params,
java.lang.String paramKey,
org.w3c.dom.Element context,
java.lang.String path)
Checks a parameter list for a specified key and if present attempts to append new elements represeting the parameter to a specified context. |
static void |
checkAndAppendLatLonElement(AVList params,
java.lang.String paramKey,
org.w3c.dom.Element context,
java.lang.String path)
Checks a parameter list for a specified key and if present attempts to append new elements represeting the parameter to a specified context. |
static void |
checkAndAppendLongElement(AVList params,
java.lang.String paramKey,
org.w3c.dom.Element context,
java.lang.String path)
Checks a parameter list for a specified key and if present attempts to append new elements represeting the parameter to a specified context. |
static void |
checkAndAppendScreenCreditElement(AVList params,
java.lang.String paramKey,
org.w3c.dom.Element context,
java.lang.String path)
Checks a parameter list for a specified key and if present attempts to append new elements represeting the parameter to a specified context. |
static void |
checkAndAppendSectorElement(AVList params,
java.lang.String paramKey,
org.w3c.dom.Element context,
java.lang.String path)
Checks a parameter list for a specified key and if present attempts to append new elements represeting the parameter to a specified context. |
static void |
checkAndAppendSectorResolutionElement(AVList params,
java.lang.String paramKey,
org.w3c.dom.Element context,
java.lang.String path)
Checks a parameter list for a specified key and if present attempts to append new elements represeting the parameter to a specified context. |
static void |
checkAndAppendTextArrayElement(AVList params,
java.lang.String paramKey,
org.w3c.dom.Element context,
java.lang.String path)
Checks a parameter list for a specified key and if present attempts to append new elements represeting the parameter to a specified context. |
static void |
checkAndAppendTextElement(AVList params,
java.lang.String paramKey,
org.w3c.dom.Element context,
java.lang.String path)
Checks a parameter list for a specified key and if present attempts to append new elements represeting the parameter to a specified context. |
static void |
checkAndAppendTimeElement(AVList params,
java.lang.String paramKey,
org.w3c.dom.Element context,
java.lang.String path)
Checks a parameter list for a specified key and if present attempts to append new elements represeting the parameter to a specified context. |
static void |
checkAndSetBooleanParam(org.w3c.dom.Element context,
AVList params,
java.lang.String paramKey,
java.lang.String paramName,
javax.xml.xpath.XPath xpath)
Checks a parameter list for a specified key and if not present attempts to find a value for the key from an element matched by an XPath expression. |
static void |
checkAndSetDoubleParam(org.w3c.dom.Element context,
AVList params,
java.lang.String paramKey,
java.lang.String paramName,
javax.xml.xpath.XPath xpath)
Checks a parameter list for a specified key and if not present attempts to find a value for the key from an element matched by an XPath expression. |
static void |
checkAndSetIntegerParam(org.w3c.dom.Element context,
AVList params,
java.lang.String paramKey,
java.lang.String paramName,
javax.xml.xpath.XPath xpath)
Checks a parameter list for a specified key and if not present attempts to find a value for the key from an element matched by an XPath expression. |
static void |
checkAndSetLatLonParam(org.w3c.dom.Element context,
AVList params,
java.lang.String paramKey,
java.lang.String paramName,
javax.xml.xpath.XPath xpath)
Checks a parameter list for a specified key and if not present attempts to find a value for the key from an element matched by an XPath expression. |
static void |
checkAndSetLongParam(org.w3c.dom.Element context,
AVList params,
java.lang.String paramKey,
java.lang.String paramName,
javax.xml.xpath.XPath xpath)
Checks a parameter list for a specified key and if not present attempts to find a value for the key from an element matched by an XPath expression. |
static void |
checkAndSetScreenCreditParam(org.w3c.dom.Element context,
AVList params,
java.lang.String paramKey,
java.lang.String paramName,
javax.xml.xpath.XPath xpath)
Checks a parameter list for a specified key and if not present attempts to find a value for the key from an element matched by an XPath expression. |
static void |
checkAndSetSectorParam(org.w3c.dom.Element context,
AVList params,
java.lang.String paramKey,
java.lang.String paramName,
javax.xml.xpath.XPath xpath)
Checks a parameter list for a specified key and if not present attempts to find a value for the key from an element matched by an XPath expression. |
static void |
checkAndSetSectorResolutionParam(org.w3c.dom.Element context,
AVList params,
java.lang.String paramKey,
java.lang.String paramName,
javax.xml.xpath.XPath xpath)
Checks a parameter list for a specified key and if not present attempts to find a value for the key from an element matched by an XPath expression. |
static void |
checkAndSetStringArrayParam(org.w3c.dom.Element context,
AVList params,
java.lang.String paramKey,
java.lang.String paramName,
javax.xml.xpath.XPath xpath)
Checks a parameter list for a specified key and if not present attempts to find a value for the key from an element matched by an XPath expression. |
static void |
checkAndSetStringParam(org.w3c.dom.Element context,
AVList params,
java.lang.String paramKey,
java.lang.String paramName,
javax.xml.xpath.XPath xpath)
Checks a parameter list for a specified key and if not present attempts to find a value for the key from an element matched by an XPath expression. |
static void |
checkAndSetTimeParam(org.w3c.dom.Element context,
AVList params,
java.lang.String paramKey,
java.lang.String paramName,
javax.xml.xpath.XPath xpath)
Checks a parameter list for a specified key and if not present attempts to find a value for the key from an element matched by an XPath expression. |
static void |
checkAndSetTimeParamAsInteger(org.w3c.dom.Element context,
AVList params,
java.lang.String paramKey,
java.lang.String paramName,
javax.xml.xpath.XPath xpath)
Checks a parameter list for a specified key and if not present attempts to find a value for the key from an element matched by an XPath expression. |
static void |
checkAndSetUniqueStringsParam(org.w3c.dom.Element context,
AVList params,
java.lang.String paramKey,
java.lang.String paramName,
javax.xml.xpath.XPath xpath)
Checks a parameter list for a specified key and if not present attempts to find a value for the key from an element matched by an XPath expression. |
static java.lang.String |
checkOGCException(org.w3c.dom.Document doc)
|
static AVList |
copyProperties(org.w3c.dom.Element element,
AVList params)
Copy any Property elements in an XML document to an attribute-value list. |
static javax.xml.parsers.DocumentBuilder |
createDocumentBuilder(boolean isNamespaceAware)
Create a DOM builder. |
static javax.xml.transform.Transformer |
createTransformer()
Create a XML transformer. |
static java.lang.String |
dataTypeAsText(java.lang.String dataType)
Returns the string text for a specified data type constant. |
static java.lang.String |
extractOGCServiceException(java.nio.ByteBuffer buffer)
|
static java.lang.String |
fixGetMapString(java.lang.String gms)
|
static java.lang.Boolean |
getBoolean(org.w3c.dom.Element context,
java.lang.String path,
javax.xml.xpath.XPath xpath)
Returns the Boolean value of an element identified by an XPath expression. |
static java.lang.Double |
getDouble(org.w3c.dom.Element context,
java.lang.String path,
javax.xml.xpath.XPath xpath)
Returns the Double value of an element identified by an XPath expression. |
static org.w3c.dom.Element |
getElement(org.w3c.dom.Element context,
java.lang.String path,
javax.xml.xpath.XPath xpath)
Returns the element identified by an XPath expression. |
static org.w3c.dom.Element[] |
getElements(org.w3c.dom.Element context,
java.lang.String path,
javax.xml.xpath.XPath xpath)
Returns all elements identified by an XPath expression. |
static java.lang.Integer |
getInteger(org.w3c.dom.Element context,
java.lang.String path,
javax.xml.xpath.XPath xpath)
Returns the Integer value of an element identified by an XPath expression. |
static LatLon |
getLatLon(org.w3c.dom.Element context,
java.lang.String path,
javax.xml.xpath.XPath xpath)
Returns the LatLon value of an element identified by an XPath expression. |
static java.lang.Long |
getLong(org.w3c.dom.Element context,
java.lang.String path,
javax.xml.xpath.XPath xpath)
Returns the Long value of an element identified by an XPath expression. |
static ScreenCredit |
getScreenCredit(org.w3c.dom.Element context,
java.lang.String path,
javax.xml.xpath.XPath xpath)
Returns the ScreenCredit value of an element identified by an XPath
expression. |
static Sector |
getSector(org.w3c.dom.Element context,
java.lang.String path,
javax.xml.xpath.XPath xpath)
Returns the Sector value of an element identified by an XPath expression. |
static LevelSet.SectorResolution |
getSectorResolutionLimit(org.w3c.dom.Element context,
java.lang.String path,
javax.xml.xpath.XPath xpath)
Returns the LevelSet.SectorResolution value of an element identified by an XPath
expression. |
static java.lang.String |
getText(org.w3c.dom.Element context,
java.lang.String path)
Returns the text of the element identified by an XPath expression. |
static java.lang.String |
getText(org.w3c.dom.Element context,
java.lang.String path,
javax.xml.xpath.XPath xpath)
Returns the text of the element identified by an XPath expression. |
static java.lang.String[] |
getTextArray(org.w3c.dom.Element context,
java.lang.String path,
javax.xml.xpath.XPath xpath)
Returns the text of all elements identified by an XPath expression. |
static java.lang.Long |
getTimeInMillis(org.w3c.dom.Element context,
java.lang.String path,
javax.xml.xpath.XPath xpath)
Returns the time in milliseconds of an element identified by an XPath expression. |
static org.w3c.dom.Element[] |
getUniqueElements(org.w3c.dom.Element context,
java.lang.String path,
java.lang.String uniqueTag,
javax.xml.xpath.XPath xpath)
Returns the unique elements identified by an XPath expression and a sub-expression. |
static java.lang.String[] |
getUniqueText(org.w3c.dom.Element context,
java.lang.String path,
javax.xml.xpath.XPath xpath)
Returns the text of all unique elements identified by an XPath expression. |
static javax.xml.xpath.XPath |
makeXPath()
Shortcut method to create an XPath. |
static org.w3c.dom.Document |
openDocument(java.lang.Object docSource)
Open and XML document from a general source. |
static org.w3c.dom.Document |
openDocumentFile(java.lang.String filePath,
java.lang.Class c)
Opens an XML file given the file's location in the file system or on the classpath. |
static org.w3c.dom.Document |
openDocumentStream(java.io.InputStream inputStream)
Opens an XML document given an input stream. |
static org.w3c.dom.Document |
openDocumentStream(java.io.InputStream inputStream,
boolean isNamespaceAware)
|
static org.w3c.dom.Document |
openDocumentURL(java.net.URL url)
Opens an XML document given a generic URL reference. |
static java.lang.String |
parseByteOrder(java.lang.String s)
Returns the byte order constant for a specified string. |
static java.lang.String |
parseDataType(java.lang.String s)
Returns the data type constant for a specified string. |
static void |
saveDocumentToFile(org.w3c.dom.Document doc,
java.lang.String filePath)
Writes an XML document to a location in the file system. |
static void |
saveDocumentToStream(org.w3c.dom.Document doc,
java.io.OutputStream outputStream)
Writes an XML document to a specified outputstream stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WWXML()
| Method Detail |
|---|
public static org.w3c.dom.Element appendBoolean(org.w3c.dom.Element context,
java.lang.String path,
boolean value)
appendElementPath(org.w3c.dom.Element, String), except
that a terminating text element is appended to the last element.
context - the context on which to append new elements.path - the element path to append.value - the text element value.
java.lang.IllegalArgumentException - if the context is null.
public static org.w3c.dom.Element appendDouble(org.w3c.dom.Element context,
java.lang.String path,
double value)
appendElementPath(org.w3c.dom.Element, String), except
that a terminating text element is appended to the last element.
context - the context on which to append new elements.path - the element path to append.value - the text element value.
java.lang.IllegalArgumentException - if the context is null.
public static org.w3c.dom.Element appendElement(org.w3c.dom.Element context,
java.lang.String name)
context - the context on which to append a new element.name - the new element name to append.
java.lang.IllegalArgumentException - if the context is null.
public static org.w3c.dom.Element appendElementPath(org.w3c.dom.Element context,
java.lang.String path)
context - the context on which to append new elements.path - the element path to append.
java.lang.IllegalArgumentException - if the context is null.
public static org.w3c.dom.Element appendInteger(org.w3c.dom.Element context,
java.lang.String path,
int value)
appendElementPath(org.w3c.dom.Element, String), except
that a terminating text element is appended to the last element.
context - the context on which to append new elements.path - the element path to append.value - the text element value.
java.lang.IllegalArgumentException - if the context is null.
public static org.w3c.dom.Element appendLatLon(org.w3c.dom.Element context,
java.lang.String path,
LatLon ll)
appendElementPath(org.w3c.dom.Element, String), except that a
terminating text element is appended to the last element.
context - the context on which to append new elements.path - the element path to append.ll - the LatLon value to create.
java.lang.IllegalArgumentException - if the context is null.
public static org.w3c.dom.Element appendLong(org.w3c.dom.Element context,
java.lang.String path,
long value)
appendElementPath(org.w3c.dom.Element, String), except
that a terminating text element is appended to the last element.
context - the context on which to append new elements.path - the element path to append.value - the text element value.
java.lang.IllegalArgumentException - if the context is null.
public static org.w3c.dom.Element appendScreenCredit(org.w3c.dom.Element context,
java.lang.String path,
ScreenCredit screenCredit)
appendElementPath(org.w3c.dom.Element,
String), except that a terminating text element is appended to the last element.
context - the context on which to append new elements.path - the element path to append.screenCredit - the ScreenCredit value to create.
java.lang.IllegalArgumentException - if the context is null.
public static org.w3c.dom.Element appendSector(org.w3c.dom.Element context,
java.lang.String path,
Sector sector)
appendElementPath(org.w3c.dom.Element, String), except that a
terminating text element is appended to the last element.
context - the context on which to append new elements.path - the element path to append.sector - the Sector value to create.
java.lang.IllegalArgumentException - if the context is null.
public static org.w3c.dom.Element appendSectorResolutionLimit(org.w3c.dom.Element context,
java.lang.String path,
LevelSet.SectorResolution sectorResolution)
appendElementPath(org.w3c.dom.Element, String), except that a terminating text element is appended to the last
element.
context - the context on which to append new elements.path - the element path to append.sectorResolution - the LevelSet.SectorResolutionLimit value to create.
java.lang.IllegalArgumentException - if the context is null.
public static org.w3c.dom.Element appendText(org.w3c.dom.Element context,
java.lang.String path,
java.lang.String string)
appendElementPath(org.w3c.dom.Element, String), except
that a terminating text element is appended to the last element.
context - the context on which to append new elements.path - the element path to append.string - the text element value.
java.lang.IllegalArgumentException - if the context is null.
public static org.w3c.dom.Element[] appendTextArray(org.w3c.dom.Element context,
java.lang.String path,
java.lang.String[] strings)
appendElementPath(org.w3c.dom.Element, String), except that a terminating text element is appended to the last
element.
context - the context on which to append new elements.path - the element path to append.strings - the text element values.
java.lang.IllegalArgumentException - if the context is null.
public static org.w3c.dom.Element appendTimeInMillis(org.w3c.dom.Element context,
java.lang.String path,
long timeInMillis)
appendElementPath(org.w3c.dom.Element, String),
except that a terminating text element is appended to the last element.
context - the context on which to append new elements.path - the element path to append.timeInMillis - the time value in milliseconds to create.
java.lang.IllegalArgumentException - if the context is null.public static java.lang.String byteOrderAsText(java.lang.String byteOrder)
| Text | Constant |
| LittleEndian | AVKey.LITTLE_ENDIAN |
| BigEndian | AVKey.BIG_ENDIAN |
byteOrder - the byte order constant to encode as a string.
java.lang.IllegalArgumentException - if the byte order is null.
public static void checkAndAppendBooleanElement(AVList params,
java.lang.String paramKey,
org.w3c.dom.Element context,
java.lang.String path)
context - the context on which to append new elements.params - the parameter list.paramKey - the key used to identify the paramater in the parameter list.path - the element path to append.
java.lang.IllegalArgumentException - if either the parameter list parameter key, or context are null.
public static void checkAndAppendDoubleElement(AVList params,
java.lang.String paramKey,
org.w3c.dom.Element context,
java.lang.String path)
context - the context on which to append new elements.params - the parameter list.paramKey - the key used to identify the paramater in the parameter list.path - the element path to append.
java.lang.IllegalArgumentException - if either the parameter list parameter key, or context are null.
public static void checkAndAppendIntegerlement(AVList params,
java.lang.String paramKey,
org.w3c.dom.Element context,
java.lang.String path)
context - the context on which to append new elements.params - the parameter list.paramKey - the key used to identify the paramater in the parameter list.path - the element path to append.
java.lang.IllegalArgumentException - if either the parameter list parameter key, or context are null.
public static void checkAndAppendLatLonElement(AVList params,
java.lang.String paramKey,
org.w3c.dom.Element context,
java.lang.String path)
context - the context on which to append new elements.params - the parameter list.paramKey - the key used to identify the paramater in the parameter list.path - the element path to append.
java.lang.IllegalArgumentException - if either the parameter list parameter key, or context are null.
public static void checkAndAppendLongElement(AVList params,
java.lang.String paramKey,
org.w3c.dom.Element context,
java.lang.String path)
context - the context on which to append new elements.params - the parameter list.paramKey - the key used to identify the paramater in the parameter list.path - the element path to append.
java.lang.IllegalArgumentException - if either the parameter list parameter key, or context are null.
public static void checkAndAppendScreenCreditElement(AVList params,
java.lang.String paramKey,
org.w3c.dom.Element context,
java.lang.String path)
context - the context on which to append new elements.params - the parameter list.paramKey - the key used to identify the paramater in the parameter list.path - the element path to append.
java.lang.IllegalArgumentException - if either the parameter list parameter key, or context are null.
public static void checkAndAppendSectorElement(AVList params,
java.lang.String paramKey,
org.w3c.dom.Element context,
java.lang.String path)
context - the context on which to append new elements.params - the parameter list.paramKey - the key used to identify the paramater in the parameter list.path - the element path to append.
java.lang.IllegalArgumentException - if either the parameter list parameter key, or context are null.
public static void checkAndAppendSectorResolutionElement(AVList params,
java.lang.String paramKey,
org.w3c.dom.Element context,
java.lang.String path)
context - the context on which to append new elements.params - the parameter list.paramKey - the key used to identify the paramater in the parameter list.path - the element path to append.
java.lang.IllegalArgumentException - if either the parameter list parameter key, or context are null.
public static void checkAndAppendTextArrayElement(AVList params,
java.lang.String paramKey,
org.w3c.dom.Element context,
java.lang.String path)
context - the context on which to append new elements.params - the parameter list.paramKey - the key used to identify the paramater in the parameter list.path - the element path to append.
java.lang.IllegalArgumentException - if either the parameter list parameter key, or context are null.
public static void checkAndAppendTextElement(AVList params,
java.lang.String paramKey,
org.w3c.dom.Element context,
java.lang.String path)
context - the context on which to append new elements.params - the parameter list.paramKey - the key used to identify the paramater in the parameter list.path - the element path to append.
java.lang.IllegalArgumentException - if either the parameter list parameter key, or context are null.
public static void checkAndAppendTimeElement(AVList params,
java.lang.String paramKey,
org.w3c.dom.Element context,
java.lang.String path)
context - the context on which to append new elements.params - the parameter list.paramKey - the key used to identify the paramater in the parameter list.path - the element path to append.
java.lang.IllegalArgumentException - if either the parameter list parameter key, or context are null.
public static void checkAndSetBooleanParam(org.w3c.dom.Element context,
AVList params,
java.lang.String paramKey,
java.lang.String paramName,
javax.xml.xpath.XPath xpath)
context - the context from which to start the XPath search.params - the parameter list.paramKey - the key used to identify the paramater in the parameter list.paramName - the Xpath expression identifying the parameter value within the specified context.xpath - an XPath object to use for the search. This allows the caller to re-use XPath objects
when performing multiple searches. May be null.
java.lang.IllegalArgumentException - if either the context, parameter list, parameter key or parameter name are
null.
public static void checkAndSetDoubleParam(org.w3c.dom.Element context,
AVList params,
java.lang.String paramKey,
java.lang.String paramName,
javax.xml.xpath.XPath xpath)
context - the context from which to start the XPath search.params - the parameter list.paramKey - the key used to identify the paramater in the parameter list.paramName - the Xpath expression identifying the parameter value within the specified context.xpath - an XPath object to use for the search. This allows the caller to re-use XPath objects
when performing multiple searches. May be null.
java.lang.IllegalArgumentException - if either the context, parameter list, parameter key or parameter name are
null.
public static void checkAndSetIntegerParam(org.w3c.dom.Element context,
AVList params,
java.lang.String paramKey,
java.lang.String paramName,
javax.xml.xpath.XPath xpath)
context - the context from which to start the XPath search.params - the parameter list.paramKey - the key used to identify the paramater in the parameter list.paramName - the Xpath expression identifying the parameter value within the specified context.xpath - an XPath object to use for the search. This allows the caller to re-use XPath objects
when performing multiple searches. May be null.
java.lang.IllegalArgumentException - if either the context, parameter list, parameter key or parameter name are
null.
public static void checkAndSetLatLonParam(org.w3c.dom.Element context,
AVList params,
java.lang.String paramKey,
java.lang.String paramName,
javax.xml.xpath.XPath xpath)
context - the context from which to start the XPath search.params - the parameter list.paramKey - the key used to identify the paramater in the parameter list.paramName - the Xpath expression identifying the parameter value within the specified context.xpath - an XPath object to use for the search. This allows the caller to re-use XPath objects
when performing multiple searches. May be null.
java.lang.IllegalArgumentException - if either the context, parameter list, parameter key or parameter name are
null.
public static void checkAndSetLongParam(org.w3c.dom.Element context,
AVList params,
java.lang.String paramKey,
java.lang.String paramName,
javax.xml.xpath.XPath xpath)
context - the context from which to start the XPath search.params - the parameter list.paramKey - the key used to identify the paramater in the parameter list.paramName - the Xpath expression identifying the parameter value within the specified context.xpath - an XPath object to use for the search. This allows the caller to re-use XPath objects
when performing multiple searches. May be null.
java.lang.IllegalArgumentException - if either the context, parameter list, parameter key or parameter name are
null.
public static void checkAndSetScreenCreditParam(org.w3c.dom.Element context,
AVList params,
java.lang.String paramKey,
java.lang.String paramName,
javax.xml.xpath.XPath xpath)
context - the context from which to start the XPath search.params - the parameter list.paramKey - the key used to identify the paramater in the parameter list.paramName - the Xpath expression identifying the parameter value within the specified context.xpath - an XPath object to use for the search. This allows the caller to re-use XPath objects
when performing multiple searches. May be null.
java.lang.IllegalArgumentException - if either the context, parameter list, parameter key or parameter name are
null.
public static void checkAndSetSectorParam(org.w3c.dom.Element context,
AVList params,
java.lang.String paramKey,
java.lang.String paramName,
javax.xml.xpath.XPath xpath)
context - the context from which to start the XPath search.params - the parameter list.paramKey - the key used to identify the paramater in the parameter list.paramName - the Xpath expression identifying the parameter value within the specified context.xpath - an XPath object to use for the search. This allows the caller to re-use XPath objects
when performing multiple searches. May be null.
java.lang.IllegalArgumentException - if either the context, parameter list, parameter key or parameter name are
null.
public static void checkAndSetSectorResolutionParam(org.w3c.dom.Element context,
AVList params,
java.lang.String paramKey,
java.lang.String paramName,
javax.xml.xpath.XPath xpath)
context - the context from which to start the XPath search.params - the parameter list.paramKey - the key used to identify the paramater in the parameter list.paramName - the Xpath expression identifying the parameter value within the specified context.xpath - an XPath object to use for the search. This allows the caller to re-use XPath objects
when performing multiple searches. May be null.
java.lang.IllegalArgumentException - if either the context, parameter list, parameter key or parameter name are
null.
public static void checkAndSetStringArrayParam(org.w3c.dom.Element context,
AVList params,
java.lang.String paramKey,
java.lang.String paramName,
javax.xml.xpath.XPath xpath)
context - the context from which to start the XPath search.params - the parameter list.paramKey - the key used to identify the paramater in the parameter list.paramName - the Xpath expression identifying the parameter value within the specified context.xpath - an XPath object to use for the search. This allows the caller to re-use XPath objects
when performing multiple searches. May be null.
java.lang.IllegalArgumentException - if either the context, parameter list, parameter key or parameter name are
null.
public static void checkAndSetStringParam(org.w3c.dom.Element context,
AVList params,
java.lang.String paramKey,
java.lang.String paramName,
javax.xml.xpath.XPath xpath)
context - the context from which to start the XPath search.params - the parameter list.paramKey - the key used to identify the paramater in the parameter list.paramName - the Xpath expression identifying the parameter value within the specified context.xpath - an XPath object to use for the search. This allows the caller to re-use XPath objects
when performing multiple searches. May be null.
java.lang.IllegalArgumentException - if either the context, parameter list, parameter key or parameter name are
null.
public static void checkAndSetTimeParam(org.w3c.dom.Element context,
AVList params,
java.lang.String paramKey,
java.lang.String paramName,
javax.xml.xpath.XPath xpath)
context - the context from which to start the XPath search.params - the parameter list.paramKey - the key used to identify the paramater in the parameter list.paramName - the Xpath expression identifying the parameter value within the specified context.xpath - an XPath object to use for the search. This allows the caller to re-use XPath objects
when performing multiple searches. May be null.
java.lang.IllegalArgumentException - if either the context, parameter list, parameter key or parameter name are
null.
public static void checkAndSetTimeParamAsInteger(org.w3c.dom.Element context,
AVList params,
java.lang.String paramKey,
java.lang.String paramName,
javax.xml.xpath.XPath xpath)
context - the context from which to start the XPath search.params - the parameter list.paramKey - the key used to identify the paramater in the parameter list.paramName - the Xpath expression identifying the parameter value within the specified context.xpath - an XPath object to use for the search. This allows the caller to re-use XPath objects
when performing multiple searches. May be null.
java.lang.IllegalArgumentException - if either the context, parameter list, parameter key or parameter name are
null.
public static void checkAndSetUniqueStringsParam(org.w3c.dom.Element context,
AVList params,
java.lang.String paramKey,
java.lang.String paramName,
javax.xml.xpath.XPath xpath)
context - the context from which to start the XPath search.params - the parameter list.paramKey - the key used to identify the paramater in the parameter list.paramName - the Xpath expression identifying the parameter value within the specified context.xpath - an XPath object to use for the search. This allows the caller to re-use XPath objects
when performing multiple searches. May be null.
java.lang.IllegalArgumentException - if either the context, parameter list, parameter key or parameter name are
null.public static java.lang.String checkOGCException(org.w3c.dom.Document doc)
public static AVList copyProperties(org.w3c.dom.Element element,
AVList params)
Property elements in an XML document to an attribute-value list.
element - the XML element potentially containing Property elements.params - an attribute-value list to copy the properties to.
java.lang.IllegalArgumentException - if the specified element is null.public static javax.xml.parsers.DocumentBuilder createDocumentBuilder(boolean isNamespaceAware)
isNamespaceAware - true if the builder is to be namespace aware, otherwise false.
DocumentBuilder.
WWRuntimeException - if an error occurs.public static javax.xml.transform.Transformer createTransformer()
Transformer
WWRuntimeException - if an error occurs.public static java.lang.String dataTypeAsText(java.lang.String dataType)
| Text | Constant |
| Float32 | AVKey.FLOAT32 |
| Int32 | AVKey.INT32 |
| Int16 | AVKey.INT16 |
| Int8 | AVKey.INT8 |
dataType - the data type constant to encode as a string.
java.lang.IllegalArgumentException - if the data type is null.public static java.lang.String extractOGCServiceException(java.nio.ByteBuffer buffer)
public static java.lang.String fixGetMapString(java.lang.String gms)
public static java.lang.Boolean getBoolean(org.w3c.dom.Element context,
java.lang.String path,
javax.xml.xpath.XPath xpath)
Boolean value of an element identified by an XPath expression.
context - the context from which to start the XPath search.path - the XPath expression.xpath - an XPath object to use for the search. This allows the caller to re-use XPath objects when
performing multiple searches. May be null.
Boolean.
java.lang.IllegalArgumentException - if the context or XPath expression are null.
public static java.lang.Double getDouble(org.w3c.dom.Element context,
java.lang.String path,
javax.xml.xpath.XPath xpath)
Double value of an element identified by an XPath expression.
context - the context from which to start the XPath search.path - the XPath expression.xpath - an XPath object to use for the search. This allows the caller to re-use XPath objects when
performing multiple searches. May be null.
Double.
java.lang.IllegalArgumentException - if the context or XPath expression are null.
public static org.w3c.dom.Element getElement(org.w3c.dom.Element context,
java.lang.String path,
javax.xml.xpath.XPath xpath)
context - the context from which to start the XPath search.path - the XPath expression.xpath - an XPath object to use for the search. This allows the caller to re-use XPath objects when
performing multiple searches. May be null.
java.lang.IllegalArgumentException - if the context or XPath expression are null.
public static org.w3c.dom.Element[] getElements(org.w3c.dom.Element context,
java.lang.String path,
javax.xml.xpath.XPath xpath)
context - the context from which to start the XPath search.path - the XPath expression.xpath - an XPath object to use for the search. This allows the caller to re-use XPath objects when
performing multiple searches. May be null.
java.lang.IllegalArgumentException - if the context or XPath expression are null.
public static java.lang.Integer getInteger(org.w3c.dom.Element context,
java.lang.String path,
javax.xml.xpath.XPath xpath)
Integer value of an element identified by an XPath expression.
context - the context from which to start the XPath search.path - the XPath expression.xpath - an XPath object to use for the search. This allows the caller to re-use XPath objects when
performing multiple searches. May be null.
Integer.
java.lang.IllegalArgumentException - if the context or XPath expression are null.
public static LatLon getLatLon(org.w3c.dom.Element context,
java.lang.String path,
javax.xml.xpath.XPath xpath)
LatLon value of an element identified by an XPath expression.
context - the context from which to start the XPath search.path - the XPath expression. If null, indicates that the context is the LatLon element itself. If
non-null, the context is searched for a LatLon element using the expression.xpath - an XPath object to use for the search. This allows the caller to re-use XPath objects when
performing multiple searches. May be null.
LatLon.
java.lang.IllegalArgumentException - if the context is null.
public static java.lang.Long getLong(org.w3c.dom.Element context,
java.lang.String path,
javax.xml.xpath.XPath xpath)
Long value of an element identified by an XPath expression.
context - the context from which to start the XPath search.path - the XPath expression.xpath - an XPath object to use for the search. This allows the caller to re-use XPath objects when
performing multiple searches. May be null.
Integer.
java.lang.IllegalArgumentException - if the context or XPath expression are null.
public static ScreenCredit getScreenCredit(org.w3c.dom.Element context,
java.lang.String path,
javax.xml.xpath.XPath xpath)
ScreenCredit value of an element identified by an XPath
expression.
context - the context from which to start the XPath search.path - the XPath expression. If null, indicates that the context is the ScreenCredit element itself. If
non-null, the context is searched for a ScreenCredit element using the expression.xpath - an XPath object to use for the search. This allows the caller to re-use XPath objects when
performing multiple searches. May be null.
java.lang.IllegalArgumentException - if the context is null.
public static Sector getSector(org.w3c.dom.Element context,
java.lang.String path,
javax.xml.xpath.XPath xpath)
Sector value of an element identified by an XPath expression.
context - the context from which to start the XPath search.path - the XPath expression. If null, indicates that the context is the Sector element itself. If
non-null, the context is searched for a Sector element using the expression.xpath - an XPath object to use for the search. This allows the caller to re-use XPath objects when
performing multiple searches. May be null.
Sector.
java.lang.IllegalArgumentException - if the context is null.
public static LevelSet.SectorResolution getSectorResolutionLimit(org.w3c.dom.Element context,
java.lang.String path,
javax.xml.xpath.XPath xpath)
LevelSet.SectorResolution value of an element identified by an XPath
expression.
context - the context from which to start the XPath search.path - the XPath expression. If null, indicates that the context is the SectorResolution element itself.
If non-null, the context is searched for a SectorResolution element using the expression.xpath - an XPath object to use for the search. This allows the caller to re-use XPath objects when
performing multiple searches. May be null.
LevelSet.SectorResolution.
java.lang.IllegalArgumentException - if the context is null.
public static java.lang.String getText(org.w3c.dom.Element context,
java.lang.String path)
context - the context from which to start the XPath search.path - the XPath expression.
java.lang.IllegalArgumentException - if the context or XPath expression are null.
public static java.lang.String getText(org.w3c.dom.Element context,
java.lang.String path,
javax.xml.xpath.XPath xpath)
context - the context from which to start the XPath search.path - the XPath expression.xpath - an XPath object to use for the search. This allows the caller to re-use XPath objects when
performing multiple searches. May be null.
java.lang.IllegalArgumentException - if the context or XPath expression are null.
public static java.lang.String[] getTextArray(org.w3c.dom.Element context,
java.lang.String path,
javax.xml.xpath.XPath xpath)
context - the context from which to start the XPath search.path - the XPath expression.xpath - an XPath object to use for the search. This allows the caller to re-use XPath objects when
performing multiple searches. May be null.
java.lang.IllegalArgumentException - if the context or XPath expression are null.
public static java.lang.Long getTimeInMillis(org.w3c.dom.Element context,
java.lang.String path,
javax.xml.xpath.XPath xpath)
context - the context from which to start the XPath search.path - the XPath expression. If null, indicates that the context is the Time element itself. If non-null,
the context is searched for a Time element using the expression.xpath - an XPath object to use for the search. This allows the caller to re-use XPath objects when
performing multiple searches. May be null.
LatLon.
java.lang.IllegalArgumentException - if the context is null.
public static org.w3c.dom.Element[] getUniqueElements(org.w3c.dom.Element context,
java.lang.String path,
java.lang.String uniqueTag,
javax.xml.xpath.XPath xpath)
context - the context from which to start the XPath search.path - the XPath expression.uniqueTag - an XPath expression to match with the elements matched with the above expression.xpath - an XPath object to use for the search. This allows the caller to re-use XPath objects
when performing multiple searches. May be null.
java.lang.IllegalArgumentException - if either the context, XPath expression or XPath sub-expression are null.
public static java.lang.String[] getUniqueText(org.w3c.dom.Element context,
java.lang.String path,
javax.xml.xpath.XPath xpath)
context - the context from which to start the XPath search.path - the XPath expression.xpath - an XPath object to use for the search. This allows the caller to re-use XPath objects when
performing multiple searches. May be null.
java.lang.IllegalArgumentException - if the context or XPath expression are null.public static javax.xml.xpath.XPath makeXPath()
XPath.
public static org.w3c.dom.Document openDocument(java.lang.Object docSource)
URLInputStreamFileString containing a valid URL
description or a file or resource name available on the classpath.
docSource - the source of the XML document.
Document, or null if the source object is a string that does not
identify a URL, a file or a resource available on the classpath.
public static org.w3c.dom.Document openDocumentFile(java.lang.String filePath,
java.lang.Class c)
filePath - the path to the file. Must be an absolute path or a path relative to a location in the
classpath.c - the class that is used to find a path relative to the classpath.
java.lang.IllegalArgumentException - if the file path is null.
WWRuntimeException - if an exception or error occurs while opening and parsing the file. The causing
exception is included in this exception's Throwable.initCause(Throwable)
.public static org.w3c.dom.Document openDocumentStream(java.io.InputStream inputStream)
inputStream - the document as an input stream.
java.lang.IllegalArgumentException - if the input stream is null.
WWRuntimeException - if an exception or error occurs while parsing the stream. The causing exception
is included in this exception's Throwable.initCause(Throwable)
public static org.w3c.dom.Document openDocumentStream(java.io.InputStream inputStream,
boolean isNamespaceAware)
public static org.w3c.dom.Document openDocumentURL(java.net.URL url)
URL reference.
url - the URL to the document.
java.lang.IllegalArgumentException - if the url is null.
WWRuntimeException - if an exception or error occurs while opening and parsing the url. The causing
exception is included in this exception's Throwable.initCause(Throwable)
.public static java.lang.String parseByteOrder(java.lang.String s)
| Text | Constant |
| LittleEndian | AVKey.LITTLE_ENDIAN |
| BigEndian | AVKey.BIG_ENDIAN |
s - the string to parse as a byte order.
java.lang.IllegalArgumentException - if the string is null.public static java.lang.String parseDataType(java.lang.String s)
| Text | Constant |
| Float32 | AVKey.FLOAT32 |
| Int32 | AVKey.INT32 |
| Int16 | AVKey.INT16 |
| Int8 | AVKey.INT8 |
s - the string to parse as a data type.
java.lang.IllegalArgumentException - if the string is null.
public static void saveDocumentToFile(org.w3c.dom.Document doc,
java.lang.String filePath)
doc - the DOM document to save.filePath - the path to the file. Must be an absolute path in the file system.
java.lang.IllegalArgumentException - if either the document or file path is null.
WWRuntimeException - if an exception or error occurs while writing the document. The causing
exception is included in this exception's Throwable.initCause(Throwable)
public static void saveDocumentToStream(org.w3c.dom.Document doc,
java.io.OutputStream outputStream)
doc - the DOM document to save.outputStream - the outputstream to save the document contents to.
java.lang.IllegalArgumentException - if either the document or input stream is null.
WWRuntimeException - if an exception or error occurs while writing the document. The causing
exception is included in this exception's Throwable.initCause(Throwable)
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||