thredds.catalog
Class InvDocumentation

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

public class InvDocumentation
extends Object

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

Author:
john caron

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

Constructor Detail

InvDocumentation

public InvDocumentation(String href,
                        URI uri,
                        String title,
                        String type,
                        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 String getType()
Returns:
documentation type

setType

public void setType(String type)

hasXlink

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

getURI

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

Returns:
the XLink URI, else null

getXlinkTitle

public 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(String title)

getXlinkHref

public 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(String href)
                  throws URISyntaxException
Throws:
URISyntaxException

getXlinkContent

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

Returns:
the XLink content
Throws:
IOException - on read error

getInlineContent

public 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(String s)

toString

public String toString()
string representation

Overrides:
toString in class Object

equals

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

hiddenProperties

public static String hiddenProperties()

editableProperties

public static String editableProperties()


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