thredds.catalog
Class InvService

java.lang.Object
  extended by thredds.catalog.InvService
Direct Known Subclasses:
ResultService

public class InvService
extends Object

A Service is an abstraction for an internet service, such as a data server, FTP, etc.

Author:
john caron

Field Summary
static InvService cdmremote
           
static InvService cdmrfeature
           
static InvService fileServer
           
static InvService iso
           
static InvService latest
           
static InvService ncml
           
static InvService ncss
           
static InvService opendap
           
static InvService uddc
           
static InvService wcs
           
static InvService wms
           
 
Constructor Summary
InvService(String name, String serviceTypeName, String base, String suffix, String desc)
          Constructor.
 
Method Summary
 void addDatasetRoot(InvProperty root)
          Deprecated. use InvCatalogImpl
 void addProperty(InvProperty p)
          Add a property
 void addService(InvService service)
          Add a nested service to a service of type COMPOUND.
protected  boolean check(StringBuilder out)
           
 String dump()
           
 boolean equals(Object o)
          InvServices with same values are equal
 String findProperty(String name)
          Get named property.
 String getBase()
          get the base URL for the service
 List<InvProperty> getDatasetRoots()
          Get dataset roots.
 String getDescription()
          Get the "human readable" description; use ServiceType.toString() if not set
 String getFullName()
          Deprecated. services should always be at top level.
 String getName()
          Get the service name: referenced by dataset and access elements.
 List<InvProperty> getProperties()
          Get properties for this service.
 List<InvService> getServices()
          Get nested services; only if getServiceType() == ServiceType.COMPOUND.
 ServiceType getServiceType()
          get the Service Type
 String getSuffix()
          Get the suffix; may be null
 int hashCode()
          Override Object.hashCode() to implement equals.
 boolean isRelativeBase()
          See if the service Base is reletive
 String toString()
          string representation
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

cdmremote

public static final InvService cdmremote

cdmrfeature

public static final InvService cdmrfeature

fileServer

public static final InvService fileServer

latest

public static final InvService latest

ncss

public static final InvService ncss

opendap

public static final InvService opendap

wcs

public static final InvService wcs

wms

public static final InvService wms

ncml

public static final InvService ncml

iso

public static final InvService iso

uddc

public static final InvService uddc
Constructor Detail

InvService

public InvService(String name,
                  String serviceTypeName,
                  String base,
                  String suffix,
                  String desc)
Constructor.

Parameters:
name - : name to show to the user
serviceTypeName - : ServiceType
base - : base for forming URL
suffix - : suffix for forming URL, may be null.
desc - : human readable description, may be null.
Method Detail

getName

public String getName()
Get the service name: referenced by dataset and access elements.

Returns:
the service name

getBase

public String getBase()
get the base URL for the service

Returns:
the base URL for the service

getServiceType

public ServiceType getServiceType()
get the Service Type

Returns:
the Service Type

getSuffix

public String getSuffix()
Get the suffix; may be null

Returns:
the suffix; may be null

getDescription

public String getDescription()
Get the "human readable" description; use ServiceType.toString() if not set

Returns:
the "human readable" description

getProperties

public List<InvProperty> getProperties()
Get properties for this service.

Returns:
List of type Property. May be empty, but not null.

getDatasetRoots

public List<InvProperty> getDatasetRoots()
Get dataset roots.

Returns:
List of InvProperty. May be empty, may not be null.

findProperty

public String findProperty(String name)
Get named property.

Parameters:
name - match this name
Returns:
String value of Property or null if not exist.

toString

public String toString()
string representation

Overrides:
toString in class Object

equals

public boolean equals(Object o)
InvServices with same values are equal

Overrides:
equals in class Object

hashCode

public int hashCode()
Override Object.hashCode() to implement equals.

Overrides:
hashCode in class Object

dump

public String dump()
Returns:
debugging info

addService

public void addService(InvService service)
Add a nested service to a service of type COMPOUND.

Parameters:
service - add this

addProperty

public void addProperty(InvProperty p)
Add a property

Parameters:
p - add this

addDatasetRoot

public void addDatasetRoot(InvProperty root)
Deprecated. use InvCatalogImpl

Add Dataset Root (1.0), key = path, value = location.

Parameters:
root - add this

getServices

public List<InvService> getServices()
Get nested services; only if getServiceType() == ServiceType.COMPOUND.

Returns:
List of type InvService. May be empty, but not null.

getFullName

public String getFullName()
Deprecated. services should always be at top level.

Get full name for this Service, which has all parent collection names.

Returns:
name

check

protected boolean check(StringBuilder out)

isRelativeBase

public boolean isRelativeBase()
See if the service Base is reletive

Returns:
true if the service Base is reletive


Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.