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 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 noneString
getType()
URI
getURI()
if its a XLink, get the absolute URIString
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
-
-
-
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()
-
-