Package org.opensaml.core.xml.mock
Class SimpleXMLObject
java.lang.Object
org.opensaml.core.xml.AbstractXMLObject
org.opensaml.core.xml.mock.SimpleXMLObject
- All Implemented Interfaces:
AttributeExtensibleXMLObject,ElementExtensibleXMLObject,XMLObject
public class SimpleXMLObject
extends AbstractXMLObject
implements ElementExtensibleXMLObject, AttributeExtensibleXMLObject
Simple XMLObject that can be used for testing.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final QNameDefault element name.private StringName attribute.static final StringName attribute name.static final StringElement local name.static final StringDefault namespace.static final StringDefault namespace prefix.private XMLObjectChildrenList<SimpleXMLObject>Child SimpleXMLObjects.private AttributeMapanyAttribute wildcard attributes.private IndexedXMLObjectChildrenList<XMLObject>Other children.private StringValue of the object stored as text content in the element. -
Constructor Summary
ConstructorsConstructorDescriptionSimpleXMLObject(String namspaceURI, String localName, String namespacePrefix) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetId()Gets the name attribute.Gets an unmodifiable list of child elements in the order that they will appear in the DOM.Gets the list of child SimpleXMLObjects.Gets a mutable map of the attributes.Gets the list of XMLObjects added to this XMLObject as part of the "any" content model.getUnknownXMLObjects(QName typeOrName) Gets the list of XMLObjects added to this XMLObject as part of the "any" content model, and which match the specified QName.getValue()Gets the value of this object.voidSets the name attribute.voidSets the value of this object.Methods inherited from class org.opensaml.core.xml.AbstractXMLObject
detach, ensureDOM, getDOM, getElementQName, getIDIndex, getNamespaceManager, getNamespaces, getNoNamespaceSchemaLocation, getObjectMetadata, getParent, getSchemaLocation, getSchemaType, hasChildren, hasParent, isNil, isNilXSBoolean, manageQualifiedAttributeNamespace, prepareAttributeValueForAssignment, prepareElementContentForAssignment, prepareForAssignment, prepareForAssignment, prepareForAssignment, registerOwnID, releaseChildrenDOM, releaseDOM, releaseParentDOM, releaseThisAndChildrenDOM, releaseThisandParentDOM, resolveID, resolveIDFromRoot, setDOM, setElementNamespacePrefix, setElementQName, setNil, setNil, setNoNamespaceSchemaLocation, setParent, setSchemaLocation, setSchemaTypeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensaml.core.xml.XMLObject
detach, ensureDOM, getDOM, getElementQName, getIDIndex, getNamespaceManager, getNamespaces, getNoNamespaceSchemaLocation, getObjectMetadata, getParent, getSchemaLocation, getSchemaType, hasChildren, hasParent, isNil, isNilXSBoolean, releaseChildrenDOM, releaseDOM, releaseParentDOM, resolveID, resolveIDFromRoot, setDOM, setNil, setNil, setNoNamespaceSchemaLocation, setParent, setSchemaLocation
-
Field Details
-
NAMESPACE
Default namespace.- See Also:
-
NAMESPACE_PREFIX
Default namespace prefix.- See Also:
-
LOCAL_NAME
Element local name.- See Also:
-
ELEMENT_NAME
Default element name. -
ID_ATTRIB_NAME
Name attribute name.- See Also:
-
id
Name attribute. -
value
Value of the object stored as text content in the element. -
simpleXMLObjects
Child SimpleXMLObjects. -
unknownXMLObjects
Other children. -
unknownAttributes
anyAttribute wildcard attributes.
-
-
Constructor Details
-
Method Details
-
getId
Gets the name attribute.- Returns:
- the name attribute
-
setId
Sets the name attribute.- Parameters:
newId- the name attribute
-
getValue
Gets the value of this object.- Returns:
- the value of this object
-
setValue
Sets the value of this object.- Parameters:
newValue- the value of this object
-
getSimpleXMLObjects
Gets the list of child SimpleXMLObjects.- Returns:
- the list of child SimpleXMLObjects
-
getUnknownXMLObjects
Gets the list of XMLObjects added to this XMLObject as part of the "any" content model.- Specified by:
getUnknownXMLObjectsin interfaceElementExtensibleXMLObject- Returns:
- list of XMLObjects added to this XMLObject as part of the "any" content model
-
getUnknownXMLObjects
Gets the list of XMLObjects added to this XMLObject as part of the "any" content model, and which match the specified QName.- Specified by:
getUnknownXMLObjectsin interfaceElementExtensibleXMLObject- Parameters:
typeOrName- the QName of the statements to return- Returns:
- list of XMLObjects added to this XMLObject as part of the "any" content model TODO: think this should be typed List<? extends XMLObject>
-
getOrderedChildren
Gets an unmodifiable list of child elements in the order that they will appear in the DOM.- Specified by:
getOrderedChildrenin interfaceXMLObject- Returns:
- ordered list of child elements
-
getUnknownAttributes
Gets a mutable map of the attributes. The map key is the namespace qualified name of the attribute, the map value is the value of the attribute.- Specified by:
getUnknownAttributesin interfaceAttributeExtensibleXMLObject- Returns:
- a map of the attributes
-