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

Version:
$Revision: 48 $ $Date: 2006-07-12 16:15:40Z $
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()
          user defined type
 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()
          if it has an XLink
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
clone, finalize, 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()
user defined type


setType

public void setType(java.lang.String type)

hasXlink

public boolean hasXlink()
if it has an XLink


getURI

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


getXlinkTitle

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


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.


setXlinkHref

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

getXlinkContent

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

Throws:
java.net.MalformedURLException
java.io.IOException

getInlineContent

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


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()