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
Fields Modifier and Type Field Description static QNameELEMENT_NAMEDefault element nameprivate StringidName attributestatic StringID_ATTRIB_NAMEName attribute namestatic StringLOCAL_NAMEElement local namestatic StringNAMESPACEDefault namespacestatic StringNAMESPACE_PREFIXDefault namespace prefixprivate XMLObjectChildrenList<SimpleXMLObject>simpleXMLObjectsChild SimpleXMLObjectsprivate AttributeMapunknownAttributesanyAttribute wildcard attributes.private IndexedXMLObjectChildrenList<XMLObject>unknownXMLObjectsOther childrenprivate StringvalueValue of the object stored as text content in the element
-
Constructor Summary
Constructors Constructor Description SimpleXMLObject(String namspaceURI, String localName, String namespacePrefix)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetId()Gets the name attribute.List<XMLObject>getOrderedChildren()List<SimpleXMLObject>getSimpleXMLObjects()Gets the list of child SimpleXMLObjects.AttributeMapgetUnknownAttributes()List<XMLObject>getUnknownXMLObjects()List<XMLObject>getUnknownXMLObjects(QName typeOrName)StringgetValue()Gets the value of this object.voidsetId(String newId)Sets the name attribute.voidsetValue(String newValue)Sets the value of this object.-
Methods inherited from class org.opensaml.core.xml.AbstractXMLObject
detach, 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, setSchemaType
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opensaml.core.xml.XMLObject
detach, 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 Detail
-
NAMESPACE
public static final String NAMESPACE
Default namespace- See Also:
- Constant Field Values
-
NAMESPACE_PREFIX
public static final String NAMESPACE_PREFIX
Default namespace prefix- See Also:
- Constant Field Values
-
LOCAL_NAME
public static final String LOCAL_NAME
Element local name- See Also:
- Constant Field Values
-
ELEMENT_NAME
public static final QName ELEMENT_NAME
Default element name
-
ID_ATTRIB_NAME
public static final String ID_ATTRIB_NAME
Name attribute name- See Also:
- Constant Field Values
-
id
private String id
Name attribute
-
value
private String value
Value of the object stored as text content in the element
-
simpleXMLObjects
private XMLObjectChildrenList<SimpleXMLObject> simpleXMLObjects
Child SimpleXMLObjects
-
unknownXMLObjects
private IndexedXMLObjectChildrenList<XMLObject> unknownXMLObjects
Other children
-
unknownAttributes
private AttributeMap unknownAttributes
anyAttribute wildcard attributes.
-
-
Method Detail
-
getId
public String getId()
Gets the name attribute.- Returns:
- the name attribute
-
setId
public void setId(String newId)
Sets the name attribute.- Parameters:
newId- the name attribute
-
getValue
public String getValue()
Gets the value of this object.- Returns:
- the value of this object
-
setValue
public void setValue(String newValue)
Sets the value of this object.- Parameters:
newValue- the value of this object
-
getSimpleXMLObjects
public List<SimpleXMLObject> getSimpleXMLObjects()
Gets the list of child SimpleXMLObjects.- Returns:
- the list of child SimpleXMLObjects
-
getUnknownXMLObjects
public List<XMLObject> getUnknownXMLObjects()
- Specified by:
getUnknownXMLObjectsin interfaceElementExtensibleXMLObject
-
getUnknownXMLObjects
public List<XMLObject> getUnknownXMLObjects(QName typeOrName)
- Specified by:
getUnknownXMLObjectsin interfaceElementExtensibleXMLObject
-
getOrderedChildren
public List<XMLObject> getOrderedChildren()
- Specified by:
getOrderedChildrenin interfaceXMLObject
-
getUnknownAttributes
public AttributeMap getUnknownAttributes()
- Specified by:
getUnknownAttributesin interfaceAttributeExtensibleXMLObject
-
-