public abstract class InvCatalog
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.net.URI |
baseURI |
protected java.util.List<InvDataset> |
datasets |
protected java.util.Map<java.lang.String,InvDataset> |
dsHash |
protected DateType |
expires |
protected java.lang.String |
name |
protected java.util.List<InvProperty> |
properties |
protected java.util.Map<java.lang.String,InvService> |
serviceHash |
protected java.util.List<InvService> |
services |
protected InvDatasetImpl |
topDataset |
protected java.lang.String |
version |
Modifier | Constructor and Description |
---|---|
protected |
InvCatalog()
Protected constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
check(java.lang.StringBuilder out)
Check internal data structures.
|
abstract boolean |
check(java.lang.StringBuilder out,
boolean show)
Check internal data structures.
|
abstract void |
filter(DatasetFilter filter)
Munge this catalog to remove any dataset that doesnt pass through the filter.
|
InvDataset |
findDatasetByID(java.lang.String id)
Find a contained dataset by its ID.
|
java.lang.String |
findProperty(java.lang.String name)
Find named property.
|
InvService |
findService(java.lang.String name)
Find the named service declared in the top level of this catalog.
|
InvDatasetImpl |
getDataset()
Deprecated.
use getDatasets()
|
java.util.List<InvDataset> |
getDatasets()
Get top-level datasets.
|
DateType |
getExpires()
Get date catalog expires, or null if none given.
|
java.lang.String |
getName()
Get the name of the catalog
|
java.util.List<InvProperty> |
getProperties()
Get catalog properties.
|
java.util.List<InvService> |
getServices()
Get top-level services.
|
java.lang.String |
getUriString()
Get the base URI as a String
|
java.lang.String |
getVersion()
Get the version of the catalog
|
java.net.URI |
resolveUri(java.lang.String uriString)
Resolve reletive URIs, using the catalog's base URI.
|
abstract void |
subset(InvDataset dataset)
Munge this catalog so the given dataset is the top catalog.
|
protected java.lang.String name
protected java.lang.String version
protected java.net.URI baseURI
protected InvDatasetImpl topDataset
protected java.util.Map<java.lang.String,InvDataset> dsHash
protected java.util.Map<java.lang.String,InvService> serviceHash
protected java.util.List<InvService> services
protected java.util.List<InvProperty> properties
protected java.util.List<InvDataset> datasets
protected DateType expires
public java.lang.String getName()
public java.lang.String getVersion()
public InvDatasetImpl getDataset()
public InvDataset findDatasetByID(java.lang.String id)
id
- : dataset ID, case sensitivepublic java.util.List<InvDataset> getDatasets()
public java.util.List<InvService> getServices()
public java.util.List<InvProperty> getProperties()
public java.lang.String findProperty(java.lang.String name)
name
- match this namepublic DateType getExpires()
public InvService findService(java.lang.String name)
name
- match this namepublic java.net.URI resolveUri(java.lang.String uriString) throws java.net.URISyntaxException
uriString
- any url, reletive or absolutejava.net.URISyntaxException
- if uriString violates RFC 2396URI.resolve(java.net.URI)
public java.lang.String getUriString()
public abstract boolean check(java.lang.StringBuilder out, boolean show)
out
- : print errors hereshow
- : print messages for each object (debug)public boolean check(java.lang.StringBuilder out)
out
- : print errors herepublic abstract void subset(InvDataset dataset)
dataset
- make this top; must be existing dataset in this catalog.public abstract void filter(DatasetFilter filter)
filter
- remove datasets that dont pass this filter.