public class XMLInfobox extends java.lang.Object implements ParagraphElementParent, StyledElement
Modifier and Type | Class and Description |
---|---|
class |
XMLInfobox.BaseProperty
An infobox property.
|
class |
XMLInfobox.EnumProperty
An infobox enum property.
|
class |
XMLInfobox.Property
An infobox property.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROPERTY_NAME
The key for the name property.
|
TYPE_NONE
Constructor and Description |
---|
XMLInfobox(java.lang.String id,
java.lang.String pack)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addElement(ParagraphElement element)
Add an element.
|
XMLInfobox.EnumProperty |
addEnumProperty(java.lang.String key,
java.lang.String state)
Create an enum property of a specified key and adds it to the infobox.
|
XMLInfobox.BaseProperty |
addProperty(java.lang.String key)
Create a property of a specified key and adds it to the infobox.
|
void |
bind(org.docgene.model.globals.InfoboxDefinition infoboxDef)
Bind the infobox to its associated definition.
|
int |
countProperties()
Return the number of properties, including the default.
|
java.lang.String |
getCaption()
Return the infobox caption.
|
org.docgene.model.globals.InfoboxDefinition |
getDefinition()
Return the infobox associated definition.
|
java.util.List<ParagraphElement> |
getElements()
Return the list of children elements.
|
java.lang.String |
getID()
Return the infobox ID.
|
java.lang.String |
getPackage()
Return the infobox reference package.
|
java.util.Map<java.lang.String,XMLInfobox.Property> |
getProperties()
Return the infobox properties.
|
XMLInfobox.Property |
getProperty(java.lang.String key)
Return the property of a specified key.
|
boolean |
hasCaption()
Return true if the infobox has a caption.
|
boolean |
hasProperty(java.lang.String key)
Return true if the infobox has a property of a specified key.
|
void |
setElements(java.util.List<ParagraphElement> elements)
Set the list of elements.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
countElements, getElement, getFirstElement, getLastElement, hasElements, isEmpty
getCustomStyles, getDeclaration, getInlinedStyle, getStyle, hasInlinedStyle, setCustomStyles, setCustomStyles, setInlinedStyle
public static final java.lang.String PROPERTY_NAME
public XMLInfobox(java.lang.String id, java.lang.String pack)
id
- the infobox IDpack
- the packagepublic java.lang.String getID()
public java.lang.String getPackage()
public void bind(org.docgene.model.globals.InfoboxDefinition infoboxDef)
infoboxDef
- the infobox definitionpublic int countProperties()
public org.docgene.model.globals.InfoboxDefinition getDefinition()
public java.util.Map<java.lang.String,XMLInfobox.Property> getProperties()
public XMLInfobox.BaseProperty addProperty(java.lang.String key)
key
- the property keypublic XMLInfobox.EnumProperty addEnumProperty(java.lang.String key, java.lang.String state)
key
- the property keystate
- the proeprty statepublic boolean hasProperty(java.lang.String key)
key
- the property keypublic XMLInfobox.Property getProperty(java.lang.String key)
key
- the property keypublic boolean hasCaption()
PROPERTY_NAME
key.public java.lang.String getCaption()
PROPERTY_NAME
key, if it exists.public void addElement(ParagraphElement element)
ParagraphElementParent
addElement
in interface ParagraphElementParent
element
- the elementpublic java.util.List<ParagraphElement> getElements()
ParagraphElementParent
getElements
in interface ParagraphElementParent
public void setElements(java.util.List<ParagraphElement> elements)
ParagraphElementParent
setElements
in interface ParagraphElementParent
elements
- the list of elementsCopyright © 2016-2024 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence