public class XMLDataSet extends java.lang.Object implements DataSet, java.io.Serializable
XMLDataSet here.| Modifier and Type | Field and Description |
|---|---|
protected java.net.URL |
base
Describe variable
base here. |
protected org.w3c.dom.Element |
config
Describe variable
config here. |
protected java.util.HashMap |
dataSetCache
Describe variable
dataSetCache here. |
protected java.lang.String[] |
dataSetIdCache
Describe variable
dataSetIdCache here. |
protected javax.xml.parsers.DocumentBuilder |
docBuilder
Describe variable
docBuilder here. |
protected java.util.HashMap |
parameterCache
Describe variable
parameterCache here. |
protected java.lang.String[] |
parameterNameCache
Describe variable
parameterNameCache here. |
protected java.util.HashMap |
seismogramCache
Describe variable
seismogramCache here. |
protected java.lang.String[] |
seismogramNameCache
Describe variable
seismogramNameCache here. |
CHANNEL, EVENT, prefix| Constructor and Description |
|---|
XMLDataSet(javax.xml.parsers.DocumentBuilder docBuilder,
java.net.URL datasetURL)
Creates a new
XMLDataSet instance. |
XMLDataSet(javax.xml.parsers.DocumentBuilder docBuilder,
java.net.URL base,
org.w3c.dom.Element config)
Creates a new
XMLDataSet instance. |
XMLDataSet(javax.xml.parsers.DocumentBuilder docBuilder,
java.net.URL base,
java.lang.String id,
java.lang.String name,
java.lang.String owner) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDataSet(DataSet dataset,
AuditInfo[] audit)
Describe
addDataSet method here. |
void |
addDataSetRef(java.net.URL datasetURL,
AuditInfo[] audit)
Describe
addDataSetRef method here. |
void |
addDataSetSeismogram(DataSetSeismogram dss,
AuditInfo[] audit)
adds the DataSetSeismogram to this DataSet.
|
void |
addParameter(java.lang.String name,
java.lang.Object value,
AuditInfo[] audit)
Adds a new parameter.
|
void |
addParameterRef(java.net.URL paramURL,
java.lang.String name,
java.lang.Object object,
AuditInfo[] audit) |
void |
addSeismogram(LocalSeismogramImpl seis,
AuditInfo[] audit)
Adds a seismogram.
|
void |
addSeismogramRef(LocalSeismogramImpl seis,
java.net.URL seisURL,
java.lang.String name,
Property[] props,
ParameterRef[] parm_ids,
AuditInfo[] audit)
Adds a reference to a remote seismogram.
|
java.lang.String[] |
cacheParameterNames() |
protected java.lang.String[] |
cacheSeismogramNames()
Describe
cacheSeismogramNames method here. |
protected void |
checkForLegacySeismograms() |
DataSet |
createChildDataSet(java.lang.String id,
java.lang.String name,
java.lang.String owner,
AuditInfo[] audit)
Creates a new DataSet as a child of this one.
|
java.net.URL |
getBase()
Gets the base URL that other URLs in this dataset are relative to.
|
Channel |
getChannel(ChannelId channelId)
Optional method to get the channel from the parameters, if it exists.
|
ChannelId[] |
getChannelIds()
Optional method to get channel id of all Channel parameters.
|
DataSet |
getDataSet(java.lang.String name)
Describe
getDataSet method here. |
DataSet |
getDataSetById(java.lang.String id)
Describe
getDataSetById method here. |
java.lang.String[] |
getDataSetIds()
Gets the Ids for all child datasets of this dataset.
|
java.lang.String[] |
getDataSetNames()
Gets the names of all child datasets of this dataset.
|
DataSetSeismogram |
getDataSetSeismogram(java.lang.String name) |
java.lang.String[] |
getDataSetSeismogramNames() |
static javax.xml.parsers.DocumentBuilder |
getDocumentBuilder() |
static javax.xml.parsers.DocumentBuilderFactory |
getDocumentBuilderFactory() |
org.w3c.dom.Element |
getElement()
returns a DOM Element that represents this dataset.
|
EventAccessOperations |
getEvent()
Optional method to get the event associated with this dataset.
|
java.lang.String |
getId()
Gets the dataset Id.
|
java.lang.String |
getName()
Gets the displayable name.
|
java.lang.String |
getOwner()
Gets the displayable name.
|
java.lang.Object |
getParameter(java.lang.String name)
Gets the parameter with the given name.
|
java.lang.String[] |
getParameterNames()
Gets the names of all parameters within this dataset.
|
LocalSeismogramImpl |
getSeismogram(java.lang.String name)
Gets the seismogram for the given name, Null if it cannot be found.
|
SeismogramAttr[] |
getSeismogramAttrs() |
java.lang.String[] |
getSeismogramNames()
Gets the names of the seismograms in this dataset.
|
static XMLDataSet |
load(java.net.URL datasetURL)
Load a xml dataset from a URL.
|
void |
remove(DataSetSeismogram dss) |
void |
setBase(java.net.URL base)
Sets the base URL that other URLs in this dataset are relative to.
|
void |
setName(java.lang.String name)
Sets the displayable name.
|
void |
setOwner(java.lang.String owner)
Sets the displayable name.
|
java.lang.String |
toString() |
void |
write(java.io.OutputStream out)
Writes the xml version of this dataset to the output stream.
|
static void |
write(java.io.OutputStream out,
org.w3c.dom.Element el) |
protected java.net.URL base
base here.protected org.w3c.dom.Element config
config here.protected javax.xml.parsers.DocumentBuilder docBuilder
docBuilder here.protected java.util.HashMap parameterCache
parameterCache here.protected java.lang.String[] parameterNameCache
parameterNameCache here.protected java.lang.String[] dataSetIdCache
dataSetIdCache here.protected java.util.HashMap dataSetCache
dataSetCache here.protected java.util.HashMap seismogramCache
seismogramCache here.protected java.lang.String[] seismogramNameCache
seismogramNameCache here.public XMLDataSet(javax.xml.parsers.DocumentBuilder docBuilder,
java.net.URL datasetURL)
XMLDataSet instance.docBuilder - a DocumentBuilder valuedatasetURL - an URL to a dsml filepublic XMLDataSet(javax.xml.parsers.DocumentBuilder docBuilder,
java.net.URL base,
java.lang.String id,
java.lang.String name,
java.lang.String owner)
public XMLDataSet(javax.xml.parsers.DocumentBuilder docBuilder,
java.net.URL base,
org.w3c.dom.Element config)
XMLDataSet instance.docBuilder - a DocumentBuilder to use to create the
document.base - the URL other urls should be made relative to.config - the dataset contents as a DOM Elementpublic static XMLDataSet load(java.net.URL datasetURL)
datasetURL - an URL to an xml datasetXMLDataSet populated form the URLprotected void checkForLegacySeismograms()
public java.lang.String getId()
public java.net.URL getBase()
URLpublic void setBase(java.net.URL base)
base - an URLpublic java.lang.String getName()
public void setName(java.lang.String name)
public java.lang.String getOwner()
public void setOwner(java.lang.String owner)
public java.lang.String[] getParameterNames()
getParameterNames in interface DataSetpublic java.lang.String[] cacheParameterNames()
public java.lang.Object getParameter(java.lang.String name)
getParameter in interface DataSetname - a String paramter namepublic void addParameter(java.lang.String name,
java.lang.Object value,
AuditInfo[] audit)
addParameter in interface DataSetname - a String name for this parametervalue - an Object valueaudit - the audit related to this paramterpublic void addParameterRef(java.net.URL paramURL,
java.lang.String name,
java.lang.Object object,
AuditInfo[] audit)
public java.lang.String[] getDataSetIds()
String[] idpublic java.lang.String[] getDataSetNames()
getDataSetNames in interface DataSetString[] valuepublic DataSet getDataSet(java.lang.String name)
getDataSet method here.getDataSet in interface DataSetname - a String valueDataSet valuepublic void addDataSet(DataSet dataset, AuditInfo[] audit)
addDataSet method here.addDataSet in interface DataSetdataset - an edu.sc.seis.fissuresUtil.xml.DataSet valueaudit - an AuditInfo[] valuepublic void addDataSetRef(java.net.URL datasetURL,
AuditInfo[] audit)
addDataSetRef method here.datasetURL - an URL valueaudit - an AuditInfo[] valuepublic DataSet createChildDataSet(java.lang.String id, java.lang.String name, java.lang.String owner, AuditInfo[] audit)
createChildDataSet in interface DataSetpublic DataSet getDataSetById(java.lang.String id)
getDataSetById method here.id - a String valueDataSet valuepublic java.lang.String[] getSeismogramNames()
protected java.lang.String[] cacheSeismogramNames()
cacheSeismogramNames method here.String[] valuepublic SeismogramAttr[] getSeismogramAttrs()
public ChannelId[] getChannelIds()
DataSetgetChannelIds in interface DataSetfor the prefix for these parameters.public LocalSeismogramImpl getSeismogram(java.lang.String name)
name - a String nameLocalSeismogramImplpublic void addSeismogram(LocalSeismogramImpl seis, AuditInfo[] audit)
seis - a LocalSeismogramImpl seismogramaudit - the audit for this seismogrampublic void addSeismogramRef(LocalSeismogramImpl seis, java.net.URL seisURL, java.lang.String name, Property[] props, ParameterRef[] parm_ids, AuditInfo[] audit)
seisURL - an URL to the seismogramname - a String nameprops - the properties for this seismogram to be stored in the datasetparm_ids - the Parameter References for this seismogram to be stored in
the datasetaudit - the audit for thie seismogrampublic void addDataSetSeismogram(DataSetSeismogram dss, AuditInfo[] audit)
DataSetaddDataSetSeismogram in interface DataSetpublic DataSetSeismogram getDataSetSeismogram(java.lang.String name)
getDataSetSeismogram in interface DataSetpublic java.lang.String[] getDataSetSeismogramNames()
getDataSetSeismogramNames in interface DataSetpublic void remove(DataSetSeismogram dss)
public java.lang.String toString()
toString in class java.lang.Objectpublic org.w3c.dom.Element getElement()
Element valuepublic EventAccessOperations getEvent()
DataSetgetEvent in interface DataSetfor the prefix for these parameters.public Channel getChannel(ChannelId channelId)
DataSetgetChannel in interface DataSetfor the prefix for these parameters.public void write(java.io.OutputStream out)
throws java.lang.Exception
java.lang.Exceptionpublic static void write(java.io.OutputStream out,
org.w3c.dom.Element el)
throws java.lang.Exception
java.lang.Exceptionpublic static javax.xml.parsers.DocumentBuilderFactory getDocumentBuilderFactory()
public static javax.xml.parsers.DocumentBuilder getDocumentBuilder()
throws javax.xml.parsers.ParserConfigurationException
javax.xml.parsers.ParserConfigurationException