# Class Topic

java.lang.Object
org.eclipse.help.internal.UAElement
org.eclipse.help.internal.Topic

All Implemented Interfaces:
  `IHelpResource, ITopic, ITopic2, IUAElement`

public class Topic extends UAElement implements ITopic2

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`ATTRIBUTE_HREF`
`static final String`
`ATTRIBUTE_ICON`
`static final String`
`ATTRIBUTE_LABEL`
`static final String`
`ATTRIBUTE_SORT`
`static final String`
`NAME`

### Fields inherited from class UAElement

`children`

### Fields inherited from interface IHelpResource

`HREF, LABEL`

### Fields inherited from interface ITopic

`TOPIC`

## Constructor Summary

Constructors
Constructor
Description
`Topic()`
`Topic(ITopic src)`
`Topic(Element src)`

## Method Summary

Modifier and Type
Method
Description
`ICriteria[]`
`getCriteria()`
Return the criteria information of topic.
`String`
`getHref()`
Returns the URL (as a string) associated with this help resource.
`String`
`getIcon()`
Toc elements can have non standard icons which are declared using a tocIcon element in the org.eclipse.help.toc extension point
`String`
`getLabel()`
Returns the label of this help resource.
`ITopic[]`
`getSubtopics()`
Obtains the topics contained in this node.
`boolean`
`isSorted()`
Allows child elements to be sorted alphabetically regardless of their actual order in the list of children.
`void`
`setHref(String href)`
`void`
`setLabel(String label)`

### Methods inherited from class UAElement

`appendChild, appendChildren, getAttribute, getChildren, getChildren, getElement, getElementName, getParentElement, insertBefore, isEnabled, removeChild, setAttribute`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface IUAElement

`getChildren, isEnabled`

## Field Details

### NAME

public static final String NAME

See Also:
  - Constant Field Values

### ATTRIBUTE_HREF

public static final String ATTRIBUTE_HREF

See Also:
  - Constant Field Values

### ATTRIBUTE_LABEL

public static final String ATTRIBUTE_LABEL

See Also:
  - Constant Field Values

### ATTRIBUTE_ICON

public static final String ATTRIBUTE_ICON

See Also:
  - Constant Field Values

### ATTRIBUTE_SORT

public static final String ATTRIBUTE_SORT

See Also:
  - Constant Field Values

## Constructor Details

### Topic

public Topic()

### Topic

public Topic(ITopic src)

### Topic

public Topic(Element src)

## Method Details

### getIcon

public String getIcon()
Description copied from interface: `ITopic2`
Toc elements can have non standard icons which are declared using a tocIcon element in the org.eclipse.help.toc extension point

Specified by:
  `getIcon` in interface `ITopic2`
Returns:
  NULL if the standard icons are to be used, otherwise the name of an icon declared in an org.eclipse.help.toc extension

### isSorted

public boolean isSorted()
Description copied from interface: `ITopic2`
Allows child elements to be sorted alphabetically regardless of their actual order in the list of children.

Specified by:
  `isSorted` in interface `ITopic2`
Returns:
  true if the children should be sorted alphabetically

### getHref

public String getHref()
Description copied from interface: `IHelpResource`
Returns the URL (as a string) associated with this help resource.

Specified by:
  `getHref` in interface `IHelpResource`
Returns:
  the URL (as a string) associated with the resource

  Valid URL of a help resource is:

  - a /pluginID/path/to/resource, where
    - pluginID is the unique identifier of the plugin containing the help resource,
    - path/to/document is the help resource path, relative to the plugin directory.
    For example. /myplugin/mytoc.xml or /myplugin/references/myclass.html are vaild.
  - string representation of URI to an external document. In this case, all special characters have to be enoded such that the URI is appropriate to be opened with a web browser. http://eclipse.org/documents/my%20file.html and jar:file:/c:/my%20sources/src.zip!/mypackage/MyClass.html are examples of valid URIs.

### getLabel

public String getLabel()
Description copied from interface: `IHelpResource`
Returns the label of this help resource.

Specified by:
  `getLabel` in interface `IHelpResource`
Returns:
  the label

### getSubtopics

public ITopic[] getSubtopics()
Description copied from interface: `ITopic`
Obtains the topics contained in this node.

Specified by:
  `getSubtopics` in interface `ITopic`
Returns:
  Array of ITopic

### getCriteria

public ICriteria[] getCriteria()
Description copied from interface: `ITopic2`
Return the criteria information of topic.

Specified by:
  `getCriteria` in interface `ITopic2`
Returns:
  array of CriterionResource

### setHref

public void setHref(String href)

### setLabel

public void setLabel(String label)