thredds.catalog
Class InvAccessImpl

java.lang.Object
  extended by thredds.catalog.InvAccess
      extended by thredds.catalog.InvAccessImpl

public class InvAccessImpl
extends InvAccess

Concrete access element.

Author:
john caron
See Also:
InvAccess

Constructor Summary
InvAccessImpl(InvDataset dataset, java.lang.String urlPath, InvService service)
          Construct from an existing InvService.
InvAccessImpl(InvDataset dataset, java.lang.String urlPath, java.lang.String serviceName, java.lang.String typeName, java.lang.String dataFormatName, double dataSize)
          Construct from fields in XML catalog.
 
Method Summary
 boolean equals(java.lang.Object o)
          InvAccessImpl elements with same values are equal.
 boolean finish()
          Finish constructing after all elements have been added.
 java.lang.String getDataFormatName()
           
 java.lang.String getServiceName()
           
 java.lang.String getServiceType()
           
 int hashCode()
          Override Object.hashCode() to implement equals.
 void setSize(double dataSize)
           
 java.lang.String toString()
          String representation
 
Methods inherited from class thredds.catalog.InvAccess
getDataFormatType, getDataset, getDataSize, getService, getStandardUri, getStandardUrlName, getUnresolvedUrlName, getUrlPath, hasDataSize
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InvAccessImpl

public InvAccessImpl(InvDataset dataset,
                     java.lang.String urlPath,
                     InvService service)
Construct from an existing InvService.

Parameters:
dataset - : the containing dataset.
urlPath - : the urlPath.
service - : reference to an existing service.

InvAccessImpl

public InvAccessImpl(InvDataset dataset,
                     java.lang.String urlPath,
                     java.lang.String serviceName,
                     java.lang.String typeName,
                     java.lang.String dataFormatName,
                     double dataSize)
Construct from fields in XML catalog. Either serviceName or typeName must be specified, not both.

Parameters:
dataset - : the containing dataset.
urlPath - : the urlPath.
serviceName - : name of an existing service, or null.
typeName - : ServiceType name or null. If specified, this creates an anonymous Service (one that is only used by this access element).
dataFormatName - optional
dataSize - optional
Method Detail

finish

public boolean finish()
Finish constructing after all elements have been added.

Returns:
true if successful.

toString

public java.lang.String toString()
String representation

Overrides:
toString in class java.lang.Object

getServiceName

public java.lang.String getServiceName()
Returns:
the service name if specified

getServiceType

public java.lang.String getServiceType()
Returns:
the service type name if specified

getDataFormatName

public java.lang.String getDataFormatName()
Returns:
the data format type name if specified

setSize

public void setSize(double dataSize)

equals

public boolean equals(java.lang.Object o)
InvAccessImpl elements with same values are equal.

Overrides:
equals in class java.lang.Object

hashCode

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

Overrides:
hashCode in class java.lang.Object