public class Categories extends Element
Modifier and Type | Class and Description |
---|---|
static class |
Categories.Fixed
Indicates whether the list of categories is a fixed or an open set.
|
Modifier and Type | Field and Description |
---|---|
static AttributeKey<Categories.Fixed> |
FIXED
Indicates whether the list of categories is a fixed or an open set.
|
static AttributeKey<java.lang.String> |
HREF
An IRI reference to a Category Document.
|
static ElementKey<java.lang.Void,Categories> |
KEY
The key for this element.
|
static AttributeKey<java.lang.String> |
SCHEME
Default scheme of the contained category elements.
|
Modifier | Constructor and Description |
---|---|
|
Categories()
Constructs an instance using the default key.
|
protected |
Categories(ElementKey<?,? extends Categories> key)
Subclass constructor, allows subclasses to supply their own element key.
|
protected |
Categories(ElementKey<?,? extends Categories> key,
Element source)
Constructs a new instance by doing a shallow copy of data from an existing
Element instance. |
Modifier and Type | Method and Description |
---|---|
Categories |
addCategory(Category category)
Adds a new category.
|
void |
clearCategories()
Removes all existing category instances.
|
java.util.List<Category> |
getCategories()
Returns the categories.
|
Categories.Fixed |
getFixed()
Returns the indicates whether the list of categories is a fixed or an open
set.
|
java.lang.String |
getHref()
Returns the an IRI reference to a Category Document.
|
java.lang.String |
getScheme()
Returns the default scheme of the contained category elements.
|
boolean |
hasCategories()
Returns whether it has the categories.
|
boolean |
hasFixed()
Returns whether it has the indicates whether the list of categories is a
fixed or an open set.
|
boolean |
hasHref()
Returns whether it has the an IRI reference to a Category Document.
|
boolean |
hasScheme()
Returns whether it has the default scheme of the contained category
elements.
|
Categories |
lock()
Locks this element.
|
static void |
registerMetadata(MetadataRegistry registry)
Registers the metadata for this element.
|
boolean |
removeCategory(Category category)
Removes an existing category.
|
Categories |
setFixed(Categories.Fixed fixed)
Sets the indicates whether the list of categories is a fixed or an open
set.
|
Categories |
setHref(java.lang.String href)
Sets the an IRI reference to a Category Document.
|
Categories |
setScheme(java.lang.String scheme)
Sets the default scheme of the contained category elements.
|
adapt, adapt, addElement, addElement, addElement, clear, createElement, createElement, eq, equals, getAttributeCount, getAttributeIterator, getAttributeIterator, getAttributeValue, getAttributeValue, getDefaultKey, getElement, getElement, getElementCount, getElementId, getElementIterator, getElementIterator, getElementKey, getElements, getElements, getElementSet, getElementSet, getElementValue, getElementValue, getTextValue, getTextValue, hasAttribute, hasAttribute, hasElement, hasElement, hashCode, hasTextValue, isLocked, narrow, removeAttribute, removeAttribute, removeAttributeValue, removeAttributeValue, removeElement, removeElement, removeElement, removeElement, replaceElement, resolve, resolve, sameClassAs, setAttributeValue, setAttributeValue, setElement, setElement, setElement, setTextValue, toString, validate, visit
public static final ElementKey<java.lang.Void,Categories> KEY
public static final AttributeKey<Categories.Fixed> FIXED
public static final AttributeKey<java.lang.String> HREF
public static final AttributeKey<java.lang.String> SCHEME
public Categories()
protected Categories(ElementKey<?,? extends Categories> key)
protected Categories(ElementKey<?,? extends Categories> key, Element source)
Element
instance. Will use the given ElementKey
as the key
for the element. This constructor is used when adapting from one element
key to another. You cannot call this constructor directly, instead use
Element.createElement(ElementKey, Element)
.key
- The key to use for this element.source
- source elementpublic static void registerMetadata(MetadataRegistry registry)
public Categories lock()
Element
public java.util.List<Category> getCategories()
public Categories addCategory(Category category)
category
- categorypublic boolean removeCategory(Category category)
category
- categorypublic void clearCategories()
public boolean hasCategories()
public Categories.Fixed getFixed()
public Categories setFixed(Categories.Fixed fixed)
fixed
- indicates whether the list of categories is a fixed or an open
set or null
to resetpublic boolean hasFixed()
public java.lang.String getHref()
public Categories setHref(java.lang.String href)
href
- an IRI reference to a Category Document or null
to
resetpublic boolean hasHref()
public java.lang.String getScheme()
public Categories setScheme(java.lang.String scheme)
scheme
- default scheme of the contained category elements or null
to resetpublic boolean hasScheme()