public abstract class AbstractAttributeGroup
extends Object
SecurityAttributes
.
In DDMS | 2.0 | 3.0 | 3.1 | 4.0.1/4.1 | 5.0 |
Extensions of this class are generally expected to be immutable. It is assumed that after the constructor on a component has been called, the component will be well-formed and valid.
History |
---|
None. |
Nested Elements | |||
---|---|---|---|
|
Attributes | |||
---|---|---|---|
|
Validation Rules | |||
---|---|---|---|
|
Modifier and Type | Field and Description |
---|---|
protected static String |
INCOMPATIBLE_VERSION_MESSAGE |
Constructor and Description |
---|
AbstractAttributeGroup()
Empty constructor
|
Modifier and Type | Method and Description |
---|---|
protected static void |
addJson(com.google.gson.JsonObject object,
String name,
List<?> value)
Adds a list of values to a JSON object, but only if it is not empty and not null.
|
protected static void |
addJson(com.google.gson.JsonObject object,
String name,
Object value)
Adds a value to a JSON object, but only if it is not empty and not null.
|
abstract String |
getHTMLTextOutput(OutputFormat format,
String prefix)
Outputs to HTML or Text with a prefix at the beginning of each meta tag or line.
|
abstract com.google.gson.JsonObject |
getJSONObject()
Renders this component as a JSON object, which can either be converted to
a JSON string or inserted into the parent JSON object.
|
abstract String |
getName()
Returns a name that describes this attribute group.
|
protected String |
getNamespace()
Accessor for the XML namespace of these attributes
|
List<ValidationMessage> |
getValidationWarnings()
Returns a list of any warning messages that occurred during validation.
|
protected List<ValidationMessage> |
getWarnings()
Accessor for the list of validation warnings.
|
abstract boolean |
isEmpty()
Checks if any attributes have been set.
|
protected void |
setNamespace(String namespace)
Accessor for the XML namespace of these attributes
|
protected void |
validate(DDMSVersion version)
Base validation case for attribute groups.
|
protected static final String INCOMPATIBLE_VERSION_MESSAGE
protected void validate(DDMSVersion version) throws InvalidDDMSException
version
- the DDMS version to validate against. This cannot be stored in the attribute group because some
DDMSVersions have the same attribute XML namespace (e.g. XLink, ISM, NTK, GML after DDMS 2.0).InvalidDDMSException
- if any required information is missing or malformedpublic List<ValidationMessage> getValidationWarnings()
protected List<ValidationMessage> getWarnings()
This is the private copy that should be manipulated during validation. Lazy initialization.
public abstract boolean isEmpty()
public abstract com.google.gson.JsonObject getJSONObject()
I consider this to be an internal method, that unfortunately must be marked as public to allow cross-package access when generating output. Use toJSON() as the formal, public method to generate output.
public abstract String getName()
public abstract String getHTMLTextOutput(OutputFormat format, String prefix)
I consider this to be an internal method, that unfortunately must be marked as public to allow cross-package access when generating output. Use toHTML() and toText() as the formal, public methods to generate output.
format
- the desired format of this outputprefix
- the prefix to addprotected static void addJson(com.google.gson.JsonObject object, String name, Object value)
object
- the object to add toname
- the name of the array, if addedvalue
- the value to addprotected static void addJson(com.google.gson.JsonObject object, String name, List<?> value)
object
- the object to add toname
- the name of the array, if addedvalue
- the value to add, converted into a JSON arrayprotected String getNamespace()
protected void setNamespace(String namespace)
Copyright 2010 - 2019 by Brian Uri!
Generated on 09/15/2016 12:36 PM
https://ddmsence.urizone.net/