public class Metadata extends SampMap
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DESCHTML_KEY
Key for description of the application in HTML.
|
static java.lang.String |
DESCTEXT_KEY
Key for short description of the application in plain text.
|
static java.lang.String |
DOCURL_KEY
Key for the URL of a documentation web page.
|
static java.lang.String |
ICONURL_KEY
Key for the URL of an icon in png, gif or jpeg format.
|
private static java.lang.String[] |
KNOWN_KEYS |
static java.lang.String |
NAME_KEY
Key for application name.
|
Constructor and Description |
---|
Metadata()
Constructs an empty Metadata map.
|
Metadata(java.util.Map map)
Constructs a Metadata map based on a given map.
|
Modifier and Type | Method and Description |
---|---|
static Metadata |
asMetadata(java.util.Map map)
Returns a given map as a Metadata object.
|
void |
check()
Checks that this object is ready for use with the SAMP toolkit.
|
java.lang.String |
getDescriptionHtml()
Returns an HTML description of the application.
|
java.lang.String |
getDescriptionText()
Returns a short description of the application.
|
java.net.URL |
getDocumentationUrl()
Returns a URL for a documentation web page.
|
java.net.URL |
getIconUrl()
Returns a URL for a gif, png or jpeg icon identifying the application.
|
java.lang.String |
getName()
Returns the value for the application's name.
|
void |
setDescriptionHtml(java.lang.String html)
Sets an HTML description of the application.
|
void |
setDescriptionText(java.lang.String txt)
Sets a short description of the application.
|
void |
setDocumentationUrl(java.lang.String url)
Sets a URL for a documentation web page.
|
void |
setIconUrl(java.lang.String url)
Sets a URL for a gif, png or jpeg icon identifying the application.
|
void |
setName(java.lang.String name)
Sets the value for the application's name.
|
checkHasKeys, entrySet, getList, getMap, getString, getUrl, put
clear, clone, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, putAll, remove, size, toString, values
public static final java.lang.String NAME_KEY
public static final java.lang.String DESCTEXT_KEY
public static final java.lang.String DESCHTML_KEY
public static final java.lang.String ICONURL_KEY
public static final java.lang.String DOCURL_KEY
private static final java.lang.String[] KNOWN_KEYS
public Metadata()
public Metadata(java.util.Map map)
map
- map containing initial values for this objectpublic void setName(java.lang.String name)
name
- value for NAME_KEY
keypublic java.lang.String getName()
NAME_KEY
keypublic void setDescriptionText(java.lang.String txt)
txt
- value for DESCTEXT_KEY
keypublic java.lang.String getDescriptionText()
DESCTEXT_KEY
keypublic void setDescriptionHtml(java.lang.String html)
html
- value for DESCHTML_KEY
keypublic java.lang.String getDescriptionHtml()
DESCHTML_KEY
keypublic void setIconUrl(java.lang.String url)
url
- value for ICONURL_KEY
keypublic java.net.URL getIconUrl()
ICONURL_KEY
keypublic void setDocumentationUrl(java.lang.String url)
url
- value for DOCURL_KEY
keypublic java.net.URL getDocumentationUrl()
DOCURL_KEY
keypublic void check()
SampMap
SampUtils.checkMap(java.util.Map)
(ensuring that all keys
are Strings, and all values Strings, Lists or Maps), subclass-specific
invariants may be checked. In the case that there's something wrong,
an informative DataException
will be thrown.public static Metadata asMetadata(java.util.Map map)
map
- map