|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.util.CatalogUtil
public class CatalogUtil
A set of utilities for dealing with Thredds catalogs
| Field Summary | |
|---|---|
static String |
ATTR_ACTION
Attribute name for the xml attribute "action " |
static String |
ATTR_BASE
Attribute name for the xml attribute "base " |
static String |
ATTR_CATALOGURL
Xml attribute name for the url where the doc came from |
static String |
ATTR_DATASETGROUP
Xml attribute name for the data set group |
static String |
ATTR_DATASETID
Xml attribute name for the data set id |
static String |
ATTR_DATATYPE
Attribute name for the xml attribute "dataType " |
static String |
ATTR_ID
Attribute name for the xml attribute "ID " |
static String |
ATTR_INHERITED
Attribute name for the xml attribute "inherited " |
static String |
ATTR_NAME
Attribute name for the xml attribute "name " |
static String |
ATTR_SERVERID
Attribute name for the xml attribute "serverID " |
static String |
ATTR_SERVICENAME
Attribute name for the xml attribute "serviceName " |
static String |
ATTR_SERVICETYPE
Attribute name for the xml attribute "serviceType " |
static String |
ATTR_SUFFIX
Attribute name for the xml attribute "suffix " |
static String |
ATTR_TYPE
Attribute name for the xml attribute "type " |
static String |
ATTR_URL
Attribute name for the xml attribute "url " |
static String |
ATTR_URLPATH
Attribute name for the xml attribute "urlPath " |
static String |
ATTR_VALUE
Attribute name for the xml attribute "value " |
static String |
ATTR_VERSION
Attribute name for the xml attribute "version " |
static String |
ATTR_XLINK_HREF
Attribute name for the xml attribute "xlink:href " |
static String |
ATTR_XLINK_TITLE
Attribute name for the xml attribute "xlink:title " |
static String |
NULL_STRING
More clear than then doing (String)null |
static String |
PROP_ANNOTATIONSERVER
Property name for the annotations server url |
static String |
PROP_CATALOGURL
Property name for the url of the catalog |
static String |
PROP_DATASETGROUP
Property name for the data set group |
static String |
PROP_DATASETID
Property name for the data set id |
static String |
PROP_SERVICE_HTTP
This needs to be the same as unidata.data.DataSource |
static String |
PROP_TITLE
This needs to be the same as unidata.data.DataSource.PROP_TITLE |
static String |
SERVICE_ADDE
Service type value for the adde service |
static String |
SERVICE_COMPOUND
Service type value for the compound service |
static String |
SERVICE_DODS
Service type value for the dods service |
static String |
SERVICE_FILE
Service type value for the compound service |
static String |
SERVICE_HTTP
Service type value for the wcs service |
static String |
SERVICE_OPENDAP
Service type value for the OPeNDAP service |
static String |
SERVICE_RESOLVER
Service name of the special resolver service. |
static String |
TAG_ACCESS
Tag name for the xml node "access" |
static String |
TAG_CATALOG
Tag name for the xml node "catalog" |
static String |
TAG_CATALOGREF
Tag name for the xml node "catalogRef" |
static String |
TAG_COLLECTION
Tag name for the xml node "collection" |
static String |
TAG_DATASET
Tag name for the xml node "dataset" |
static String |
TAG_DATATYPE
Tag name for the xml node "dataType" |
static String |
TAG_DOCPARENT
Tag name for the xml node "docparent" |
static String |
TAG_DOCUMENTATION
Tag name for the xml node "documentation" |
static String |
TAG_METADATA
Tag name for the xml node "metadata" |
static String |
TAG_PROPERTY
Xml tag name for the property tag for a dataset |
static String |
TAG_QUERYCAPABILITY
Tag name for the xml node "queryCapability" |
static String |
TAG_SERVER
Tag name for the xml node "server " |
static String |
TAG_SERVICE
Tag name for the xml node "service " |
static String |
TAG_SERVICENAME
Tag name for the xml node "serviceName" |
static double |
THREDDS_VERSION_0_4
Value for the thredds catalog v0.4 |
static double |
THREDDS_VERSION_0_5
Value for the thredds catalog v0.5 |
static double |
THREDDS_VERSION_0_6
Value for the thredds catalog v0.6 |
static double |
THREDDS_VERSION_1_0
Value for the thredds catalog v1.0 |
static String |
VALUE_ANNOTATIONSERVER
Xml attribute name for the data set id |
static String |
VALUE_RIGHTS
Xml attribute value for the rights documentation |
static String |
VALUE_SUMMARY
Xml attribute value for the summary documentation |
| Constructor Summary | |
|---|---|
CatalogUtil()
|
|
| Method Summary | |
|---|---|
static void |
addServiceProperties(Element datasetNode,
Hashtable properties,
String urlPath)
Add any service urls to the properties |
static void |
errorMessage(String msg)
Log the error |
static String |
findBaseForDataset(Element datasetNode,
Element root)
Find the base url attribute from the service that the given datasetNode is associated with. |
static String |
findDataTypeForDataset(Element datasetNode,
Element root,
double version,
boolean firstCall)
Recurse up the DOM tree, looking for a dataset that contains a dataType attribute. |
static Element |
findServiceNodeForDataset(Element datasetNode,
boolean showErrors,
String type)
Find the service xml element for the given dataset node. |
static int |
generateHtml(Element root,
Element datasetNode,
int cnt,
String bundleTemplate,
String jnlpTemplate)
Generate an html representation of the catalog |
static String |
getAbsoluteUrl(Element serviceNode,
String urlPath)
Find the base url for the given service node. |
static Object[] |
getResolverData(String resolverUrl,
Hashtable properties)
This reads the xml pointed to by the given resolverUrl. |
static String |
getServiceType(Element serviceNode)
Find the service type attribute for the given service node. |
static String |
getTitleFromDataset(Element datasetNode)
Assemble the String title for the given dataset. |
static String |
getUrlPath(Element datasetNode)
Lookup and return the urlPath defined for the given datasetNode. |
static double |
getVersion(Element node)
A utiliry to get the version from the catalog root. |
static String |
resolveUrl(String resolverUrl,
Hashtable properties)
The given resolverUrl should return a catalog that holds one dataset. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String PROP_TITLE
public static final String PROP_SERVICE_HTTP
public static final String PROP_CATALOGURL
public static final String PROP_DATASETID
public static final String PROP_DATASETGROUP
public static final String PROP_ANNOTATIONSERVER
public static final String ATTR_CATALOGURL
public static final String ATTR_DATASETGROUP
public static final String ATTR_DATASETID
public static final String VALUE_ANNOTATIONSERVER
public static final String VALUE_SUMMARY
public static final String VALUE_RIGHTS
public static final String NULL_STRING
public static final String SERVICE_RESOLVER
public static final String SERVICE_COMPOUND
public static final String SERVICE_FILE
public static final String SERVICE_HTTP
public static final String SERVICE_DODS
public static final String SERVICE_ADDE
public static final String SERVICE_OPENDAP
public static final double THREDDS_VERSION_0_4
public static final double THREDDS_VERSION_0_5
public static final double THREDDS_VERSION_0_6
public static final double THREDDS_VERSION_1_0
public static final String TAG_PROPERTY
public static final String TAG_ACCESS
public static final String TAG_DOCUMENTATION
public static final String TAG_DOCPARENT
public static final String TAG_CATALOG
public static final String TAG_CATALOGREF
public static final String TAG_COLLECTION
public static final String TAG_DATASET
public static final String TAG_DATATYPE
public static final String TAG_METADATA
public static final String TAG_QUERYCAPABILITY
public static final String TAG_SERVER
public static final String TAG_SERVICE
public static final String TAG_SERVICENAME
public static final String ATTR_ACTION
public static final String ATTR_DATATYPE
public static final String ATTR_BASE
public static final String ATTR_ID
public static final String ATTR_INHERITED
public static final String ATTR_NAME
public static final String ATTR_VALUE
public static final String ATTR_SERVERID
public static final String ATTR_SERVICENAME
public static final String ATTR_SERVICETYPE
public static final String ATTR_SUFFIX
public static final String ATTR_TYPE
public static final String ATTR_URL
public static final String ATTR_URLPATH
public static final String ATTR_VERSION
public static final String ATTR_XLINK_HREF
public static final String ATTR_XLINK_TITLE
| Constructor Detail |
|---|
public CatalogUtil()
| Method Detail |
|---|
public static double getVersion(Element node)
node - The xml node
public static String getServiceType(Element serviceNode)
serviceNode - The service node to look for the service type.
public static String getTitleFromDataset(Element datasetNode)
datasetNode - The dataset node we are looking at.
public static void errorMessage(String msg)
msg - the error message
public static Element findServiceNodeForDataset(Element datasetNode,
boolean showErrors,
String type)
datasetNode - The dataset node to look for a service node for.showErrors - Do we tell the user if there was an errortype - service type
public static String findBaseForDataset(Element datasetNode,
Element root)
datasetNode - The dataset node we are looking for a base url for.root -
public static String findDataTypeForDataset(Element datasetNode,
Element root,
double version,
boolean firstCall)
datasetNode - The dataset node we are looking at.root - The root of the xml treeversion - The catalog versionfirstCall - Is this the leaf node
public static String getAbsoluteUrl(Element serviceNode,
String urlPath)
serviceNode - The service node for the given urlPath.urlPath - The tail end of the absolute url.
public static String getUrlPath(Element datasetNode)
datasetNode - The dataset node we are looking at.
public static Object[] getResolverData(String resolverUrl,
Hashtable properties)
Object[] {newXmlRoot, datasetNode, serviceNode, url}
resolverUrl - The url pointing to the resolver catalog.properties - The properties
public static String resolveUrl(String resolverUrl,
Hashtable properties)
resolverUrl - The url pointing to the resolved catalog.properties - To put the title into.
public static void addServiceProperties(Element datasetNode,
Hashtable properties,
String urlPath)
datasetNode - data set nodeproperties - propertiesurlPath - base url
public static int generateHtml(Element root,
Element datasetNode,
int cnt,
String bundleTemplate,
String jnlpTemplate)
root - Root of the catalogdatasetNode - The data set node we are looking atcnt - The current count of the data set nodes we have processedbundleTemplate - The bundle template we generate the bundle fromjnlpTemplate - The jnlp template
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||