thredds.catalog
Class InvDocumentation

java.lang.Object
  extended by thredds.catalog.InvDocumentation

public class InvDocumentation
extends java.lang.Object

A documentation object: text, HTML or an Xlink. TODO: XHTML

Author:
john caron

Constructor Summary
InvDocumentation()
           
InvDocumentation(java.lang.String href, java.net.URI uri, java.lang.String title, java.lang.String type, java.lang.String inlineContent)
          Constructor.
 
Method Summary
static java.lang.String editableProperties()
           
 boolean equals(java.lang.Object o)
          InvDocumentation elements with same values are equal.
 java.lang.String getInlineContent()
          Get inline content as a string, else null if there is none
 java.lang.String getType()
           
 java.net.URI getURI()
          if its a XLink, get the absolute URI
 java.lang.String getXlinkContent()
          if its a XLink, get its content.
 java.lang.String getXlinkHref()
          if its a XLink, get the href, to display the link to the user.
 java.lang.String getXlinkTitle()
          if its a XLink, get the title, to display the link to the user.
 int hashCode()
          Override Object.hashCode() to implement equals.
 boolean hasXlink()
           
static java.lang.String hiddenProperties()
           
 void setInlineContent(java.lang.String s)
           
 void setType(java.lang.String type)
           
 void setXlinkHref(java.lang.String href)
           
 void setXlinkTitle(java.lang.String title)
           
 java.lang.String toString()
          string representation
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InvDocumentation

public InvDocumentation(java.lang.String href,
                        java.net.URI uri,
                        java.lang.String title,
                        java.lang.String type,
                        java.lang.String inlineContent)
Constructor.

Parameters:
href - : href of documentation, may be null.
uri - : resolved URL, or null
title - : Xlink title, may be null.
type - : user-defined InvDocumentation type
inlineContent - : optional inline contents.

InvDocumentation

public InvDocumentation()
Method Detail

getType

public java.lang.String getType()
Returns:
documentation type

setType

public void setType(java.lang.String type)

hasXlink

public boolean hasXlink()
Returns:
true if it has an XLink

getURI

public java.net.URI getURI()
if its a XLink, get the absolute URI

Returns:
the XLink URI, else null

getXlinkTitle

public java.lang.String getXlinkTitle()
if its a XLink, get the title, to display the link to the user.

Returns:
the XLink title, else null

setXlinkTitle

public void setXlinkTitle(java.lang.String title)

getXlinkHref

public java.lang.String getXlinkHref()
if its a XLink, get the href, to display the link to the user.

Returns:
the XLink href, or null

setXlinkHref

public void setXlinkHref(java.lang.String href)
                  throws java.net.URISyntaxException
Throws:
java.net.URISyntaxException

getXlinkContent

public java.lang.String getXlinkContent()
                                 throws java.io.IOException
if its a XLink, get its content. This triggers a URL read the first time.

Returns:
the XLink content
Throws:
java.io.IOException - on read error

getInlineContent

public java.lang.String getInlineContent()
Get inline content as a string, else null if there is none

Returns:
inline content as a string, else null

setInlineContent

public void setInlineContent(java.lang.String s)

toString

public java.lang.String toString()
string representation

Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
InvDocumentation 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

hiddenProperties

public static java.lang.String hiddenProperties()

editableProperties

public static java.lang.String editableProperties()