Package thredds.catalog
Class InvDocumentation
- java.lang.Object
-
- thredds.catalog.InvDocumentation
-
public class InvDocumentation extends Object
A documentation object: text, HTML or an Xlink. TODO: XHTML
-
-
Constructor Summary
Constructors Constructor Description InvDocumentation()InvDocumentation(String href, URI uri, String title, String type, String inlineContent)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringeditableProperties()booleanequals(Object o)InvDocumentation elements with same values are equal.StringgetInlineContent()Get inline content as a string, else null if there is noneStringgetType()URIgetURI()if its a XLink, get the absolute URIStringgetXlinkContent()if its a XLink, get its content.StringgetXlinkHref()if its a XLink, get the href, to display the link to the user.StringgetXlinkTitle()if its a XLink, get the title, to display the link to the user.inthashCode()Override Object.hashCode() to implement equals.booleanhasXlink()static StringhiddenProperties()voidsetInlineContent(String s)voidsetType(String type)voidsetXlinkHref(String href)voidsetXlinkTitle(String title)StringtoString()string representation
-
-
-
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 nulltitle- : Xlink title, may be null.type- : user-defined InvDocumentation typeinlineContent- : 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)
-
equals
public boolean equals(Object o)
InvDocumentation elements with same values are equal.
-
hashCode
public int hashCode()
Override Object.hashCode() to implement equals.
-
hiddenProperties
public static String hiddenProperties()
-
editableProperties
public static String editableProperties()
-
-