Java API for modeling web page content and relationships.
For questions or support, please contact us:
Email: support@aoindustries.com
Phone: 1-800-519-9541
Phone: +1-251-607-9556
Web: https://aoindustries.com/contact
Constructor and Description |
---|
Element() |
Modifier and Type | Method and Description |
---|---|
Long |
addChildElement(Element childElement,
ElementWriter elementWriter)
Adds a child element to this element.
|
boolean |
equals(Object obj)
Two elements are equal when they are the same object or when they are
on the same page and have the same ID.
|
static StringBuilder |
generateIdPrefix(String template,
String prefix)
Deprecated.
Please use
XmlUtils.generateId(java.lang.String, java.lang.String) directly. |
protected abstract String |
getDefaultIdPrefix()
Gets the default element ID prefix for this type of element.
|
protected String |
getElementIdTemplate()
Gets the element ID template for generating IDs.
|
ElementRef |
getElementRef()
Gets an ElementRef for this element.
|
String |
getId()
When inside a page, every element must have a per-page unique ID, when one is not provided, it will be generated.
|
Page |
getPage()
Every element may (and usually will) exist within a page.
|
Element |
getParentElement()
Elements may be nested, gets the parent Element above this element.
|
int |
hashCode() |
boolean |
isHidden()
When hidden, an element is not added to common elements like navigation trees.
|
static boolean |
isValidId(String id)
Deprecated.
Please use
XmlUtils.isValidId(java.lang.String) directly. |
void |
setId(String id) |
addPageLink, appendLabel, checkNotFrozen, findTopLevelElements, freeze, getBody, getChildElements, getLabel, getPageLinks, getProperty, setBody, setProperty, toString
@Deprecated public static boolean isValidId(String id)
XmlUtils.isValidId(java.lang.String)
directly.@Deprecated public static StringBuilder generateIdPrefix(String template, String prefix)
XmlUtils.generateId(java.lang.String, java.lang.String)
directly.public boolean equals(Object obj)
protected String getElementIdTemplate()
Defaults to getLabel()
protected abstract String getDefaultIdPrefix()
public Page getPage()
public String getId()
public void setId(String id)
public ElementRef getElementRef() throws IllegalStateException
IllegalStateException
- if page not setpublic Element getParentElement()
public Long addChildElement(Element childElement, ElementWriter elementWriter)
addChildElement
in class Node
public boolean isHidden()
Copyright © 2013–2019 AO Industries, Inc.. All rights reserved.