public final class ElementVisibilityInfo extends NamedItemVisibilityInfo
Info.CompareInfoByKey
Modifier and Type | Field and Description |
---|---|
static Name |
CLASS_ELEMENT |
static String |
CONFIG_NAME_VAR |
static Name |
ELEMENTS_ATTRIBUTE |
static Name |
INCLUDE_ELEMENT |
static Name |
LOCATION_ATTRIBUTE |
static Name |
NAME_ATTRIBUTE |
static Name |
PLATFORM_ATTRIBUTE |
static String[] |
PLATFORM_ATTRIBUTE_VALUES |
CATEGORY_ELEMENT, MERGE_ATTRIBUTE, mutableCopies, namedItemVisibility, VISIBLE_ATTRIBUTE
compareInfoByKey
Constructor and Description |
---|
ElementVisibilityInfo() |
ElementVisibilityInfo(ElementVisibility elemVisibility) |
Modifier and Type | Method and Description |
---|---|
ElementVisibilityInfo |
copy()
Returns a deep copy of this info object.
|
protected NamedItemVisibility |
createContainer(NamedItemVisibility.Category[] list) |
ElementVisibility |
getElementVisibility()
The stock element visibility of this configuration.
|
boolean |
load(Element element,
LoadContext loadContext,
List<LoadError> errors)
Updates this info object using data contained in specified XML element.
|
boolean |
save(NamespaceToPrefixes nsToPrefixes,
Element parent)
Saves this info object as XML by inserting one or more XML elements in
the root element of specified document.
|
void |
setElementVisibility(Document doc,
String preferencesKey,
Preferences preferences) |
load, parseCategory, save, translate
public static final Name ELEMENTS_ATTRIBUTE
public static final Name CLASS_ELEMENT
public static final Name INCLUDE_ELEMENT
public static final Name LOCATION_ATTRIBUTE
public static final Name PLATFORM_ATTRIBUTE
public static final Name NAME_ATTRIBUTE
public static final String[] PLATFORM_ATTRIBUTE_VALUES
public static final String CONFIG_NAME_VAR
public ElementVisibilityInfo()
public ElementVisibilityInfo(ElementVisibility elemVisibility)
public ElementVisibilityInfo copy()
Info
public ElementVisibility getElementVisibility()
null
. May not be modified.public void setElementVisibility(Document doc, String preferencesKey, Preferences preferences)
public boolean load(Element element, LoadContext loadContext, List<LoadError> errors)
Info
load
in class Info
element
- XML element used to update this info objectloadContext
- a context object created by the Loader
errors
- if element is found to be invalid, LoadError
s are added to this listtrue
if the info object has been successfully
updated; false
otherwiseprotected NamedItemVisibility createContainer(NamedItemVisibility.Category[] list)
createContainer
in class NamedItemVisibilityInfo
public boolean save(NamespaceToPrefixes nsToPrefixes, Element parent)
Info
save
in class Info
nsToPrefixes
- A namespace to prefix map which may be used to
convert objects such as XPaths to their string representationparent
- one or more child elements are appended to
this parent elementtrue
if child elements have been added to the
parent element; false
otherwise (generally because this info
object is ``empty'' and therefore there is nothing to be saved)