public interface XMLObject
Modifier and Type | Method and Description |
---|---|
void |
detach()
Detaches the XMLObject from its parent.
|
Element |
getDOM()
Gets the DOM representation of this XMLObject, if one exists.
|
QName |
getElementQName()
Gets the QName for this element.
|
IDIndex |
getIDIndex()
Get the IDIndex holding the ID-to-XMLObject index mapping, rooted at this XMLObject's subtree.
|
NamespaceManager |
getNamespaceManager()
Gets the
NamespaceManager instance for this object. |
Set<Namespace> |
getNamespaces()
Gets the namespaces that are scoped to this element.
|
String |
getNoNamespaceSchemaLocation()
Gets the value of the XML Schema noNamespaceSchemaLocation attribute for this object.
|
LockableClassToInstanceMultiMap<Object> |
getObjectMetadata()
Get the mutable multimap which holds additional information (represented by plain Java object instances)
associated with this XMLObject.
|
List<XMLObject> |
getOrderedChildren()
Gets an unmodifiable list of child elements in the order that they will appear in the DOM.
|
XMLObject |
getParent()
Gets the parent of this element or null if there is no parent.
|
String |
getSchemaLocation()
Gets the value of the XML Schema schemaLocation attribute for this object.
|
QName |
getSchemaType()
Gets the XML schema type of this element.
|
boolean |
hasChildren()
Checks if this XMLObject has children.
|
boolean |
hasParent()
Checks to see if this object has a parent.
|
Boolean |
isNil()
Gets whether the object declares that its element content
is null, which corresponds to an
xsi:nil
attribute of true . |
XSBooleanValue |
isNilXSBoolean()
Gets whether the object declares that its element content
is null, which corresponds to an
xsi:nil
attribute of true . |
void |
releaseChildrenDOM(boolean propagateRelease)
Releases the DOM representation of this XMLObject's children.
|
void |
releaseDOM()
Releases the DOM representation of this XMLObject, if there is one.
|
void |
releaseParentDOM(boolean propagateRelease)
Releases the DOM representation of this XMLObject's parent.
|
XMLObject |
resolveID(String id)
Find the XMLObject identified by the specified ID attribute, within the subtree of XMLObjects which has
this XMLObject as its root.
|
XMLObject |
resolveIDFromRoot(String id)
Find the XMLObject identified by the specified ID attribute, from the root of the tree of XMLObjects in
which this XMLObject is a member.
|
void |
setDOM(Element dom)
Sets the DOM representation of this XMLObject.
|
void |
setNil(Boolean newNil)
Sets whether the object declares that its element content
is null, which corresponds to an
xsi:nil
attribute of true . |
void |
setNil(XSBooleanValue newNil)
Sets whether the object declares that its element content
is null, which corresponds to an
xsi:nil
attribute of true . |
void |
setNoNamespaceSchemaLocation(String location)
Sets the value of the XML Schema noNamespaceSchemaLocation attribute for this object.
|
void |
setParent(XMLObject parent)
Sets the parent of this element.
|
void |
setSchemaLocation(String location)
Sets the value of the XML Schema schemaLocation attribute for this object.
|
void detach()
@Nullable Element getDOM()
@Nonnull QName getElementQName()
@Nonnull IDIndex getIDIndex()
@Nonnull NamespaceManager getNamespaceManager()
NamespaceManager
instance for this object.@Nonnull Set<Namespace> getNamespaces()
@Nullable String getNoNamespaceSchemaLocation()
@Nullable List<XMLObject> getOrderedChildren()
@Nullable XMLObject getParent()
@Nullable String getSchemaLocation()
@Nullable QName getSchemaType()
boolean hasChildren()
boolean hasParent()
void releaseChildrenDOM(boolean propagateRelease)
propagateRelease
- true if all descendants of this element should release their DOMvoid releaseDOM()
void releaseParentDOM(boolean propagateRelease)
propagateRelease
- true if all ancestors of this element should release their DOM@Nullable XMLObject resolveID(@Nonnull String id)
id
- the ID attribute to resolve to an XMLObject@Nullable XMLObject resolveIDFromRoot(@Nonnull String id)
id
- the ID attribute to resolve to an XMLObjectvoid setDOM(@Nullable Element dom)
dom
- DOM representation of this XMLObjectvoid setNoNamespaceSchemaLocation(@Nullable String location)
location
- value of the XML Schema noNamespaceSchemaLocation attribute for this objectvoid setParent(@Nullable XMLObject parent)
parent
- the parent of this elementvoid setSchemaLocation(@Nullable String location)
location
- value of the XML Schema schemaLocation attribute for this object@Nullable Boolean isNil()
xsi:nil
attribute of true
.
Note that it is up to the developer to ensure that the value of this attribute is consistent with the actual element content on the object instance.
Per the XML Schema specification, a value of true disallows element content, but not element attributes.
@Nullable XSBooleanValue isNilXSBoolean()
xsi:nil
attribute of true
.
Note that it is up to the developer to ensure that the value of this attribute is consistent with the actual element content on the object instance.
Per the XML Schema specification, a value of true disallows element content, but not element attributes.
void setNil(@Nullable Boolean newNil)
xsi:nil
attribute of true
.
Note that it is up to the developer to ensure that the value of this attribute is consistent with the actual element content on the object instance.
Per the XML Schema specification, a value of true disallows element content, but not element attributes.
newNil
- whether the object's content model is expressed as nullvoid setNil(@Nullable XSBooleanValue newNil)
xsi:nil
attribute of true
.
Note that it is up to the developer to ensure that the value of this attribute is consistent with the actual element content on the object instance.
Per the XML Schema specification, a value of true disallows element content, but not element attributes.
newNil
- whether the object's content model is expressed as null@Nonnull LockableClassToInstanceMultiMap<Object> getObjectMetadata()
Objects added to this multimap will be indexed and retrievable by their concrete Class
as well as by the Class
types representing all superclasses (excluding java.lang.Object
)
and all implemented interfaces.
Copyright © 1999–2019 Shibboleth Consortium. All rights reserved.