org.opensaml.xml
Interface XMLObject

All Known Subinterfaces:
AgreementMethod, AttributeExtensibleXMLObject, CarriedKeyName, CipherData, CipherReference, CipherValue, CryptoBinary, DataReference, DHKeyValue, DigestMethod, DSAKeyValue, ElementExtensibleXMLObject, EncryptedData, EncryptedKey, EncryptedType, EncryptionMethod, EncryptionProperties, EncryptionProperty, Exponent, G, Generator, J, KANonce, KeyInfo, KeyInfoType, KeyName, KeyReference, KeySize, KeyValue, MgmtData, Modulus, OAEPparams, OriginatorKeyInfo, P, P, PgenCounter, PgenCounter, PGPData, PGPKeyID, PGPKeyPacket, Public, Q, Q, RecipientKeyInfo, ReferenceList, ReferenceType, RetrievalMethod, RSAKeyValue, Seed, Seed, SignableXMLObject, Signature, SPKIData, SPKISexp, Transform, Transforms, Transforms, ValidatingXMLObject, X509Certificate, X509CRL, X509Data, X509IssuerName, X509IssuerSerial, X509SerialNumber, X509SKI, X509SubjectName, XPath, XSAny, XSBase64Binary, XSInteger, XSQName, XSString, XSURI, Y
All Known Implementing Classes:
AbstractElementExtensibleXMLObject, AbstractExtensibleXMLObject, AbstractSignableXMLObject, AbstractValidatingSignableXMLObject, AbstractValidatingXMLObject, AbstractXMLObject, AgreementMethodImpl, CarriedKeyNameImpl, CipherDataImpl, CipherReferenceImpl, CipherValueImpl, CryptoBinaryImpl, DataReferenceImpl, DHKeyValueImpl, DigestMethodImpl, DSAKeyValueImpl, EncryptedDataImpl, EncryptedKeyImpl, EncryptedTypeImpl, EncryptionMethodImpl, EncryptionPropertiesImpl, EncryptionPropertyImpl, ExponentImpl, GeneratorImpl, GImpl, JImpl, KANonceImpl, KeyInfoImpl, KeyInfoTypeImpl, KeyNameImpl, KeyReferenceImpl, KeySizeImpl, KeyValueImpl, MgmtDataImpl, ModulusImpl, OAEPparamsImpl, OriginatorKeyInfoImpl, PgenCounterImpl, PgenCounterImpl, PGPDataImpl, PGPKeyIDImpl, PGPKeyPacketImpl, PImpl, PImpl, PublicImpl, QImpl, QImpl, RecipientKeyInfoImpl, ReferenceListImpl, ReferenceTypeImpl, RetrievalMethodImpl, RSAKeyValueImpl, SeedImpl, SeedImpl, SignatureImpl, SPKIDataImpl, SPKISexpImpl, TransformImpl, TransformsImpl, TransformsImpl, X509CertificateImpl, X509CRLImpl, X509DataImpl, X509IssuerNameImpl, X509IssuerSerialImpl, X509SerialNumberImpl, X509SKIImpl, X509SubjectNameImpl, XPathImpl, XSAnyImpl, XSBase64BinaryImpl, XSIntegerImpl, XSQNameImpl, XSStringImpl, XSURIImpl, YImpl

public interface XMLObject

A object that represents an XML element, usually of a specific schema type, that has been unmarshalled into this Java object.


Method Summary
 void addNamespace(Namespace namespace)
          Adds a namespace to the ones already scoped to this element.
 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.
 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.
 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.
 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.
 void removeNamespace(Namespace namespace)
          Removes a namespace from this element.
 XMLObject resolveID(String id)
          Find the XMLObject which is 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 which is 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 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.
 

Method Detail

addNamespace

void addNamespace(Namespace namespace)
Adds a namespace to the ones already scoped to this element.

Parameters:
namespace - the namespace to add

detach

void detach()
Detaches the XMLObject from its parent. This will release the parent's cached DOM (if it has one) and set this object's parent to null. It does not remove this object from its parent, that's the responsibility of the invoker of this method, nor does it re-root the cached DOM node (if there is one) in a new document. This is handled at marshalling time.


getDOM

Element getDOM()
Gets the DOM representation of this XMLObject, if one exists.

Returns:
the DOM representation of this XMLObject

getElementQName

QName getElementQName()
Gets the QName for this element. This QName MUST contain the namespace URI, namespace prefix, and local element name. Changes made to the returned QName are not reflected by the QName held by this element, that is, the returned QName is a copy of the internal QName member of this class.

Returns:
the QName for this attribute

getIDIndex

IDIndex getIDIndex()
Get the IDIndex holding the ID-to-XMLObject index mapping, rooted at this XMLObject's subtree.

Returns:
the IDIndex owned by this XMLObject

getNamespaces

Set<Namespace> getNamespaces()
Gets the namespaces that are scoped to this element.

Returns:
the namespaces that are scoped to this element

getNoNamespaceSchemaLocation

String getNoNamespaceSchemaLocation()
Gets the value of the XML Schema noNamespaceSchemaLocation attribute for this object.

Returns:
value of the XML Schema noNamespaceSchemaLocation attribute for this object

getOrderedChildren

List<XMLObject> getOrderedChildren()
Gets an unmodifiable list of child elements in the order that they will appear in the DOM.

Returns:
ordered list of child elements

getParent

XMLObject getParent()
Gets the parent of this element or null if there is no parent.

Returns:
the parent of this element or null

getSchemaLocation

String getSchemaLocation()
Gets the value of the XML Schema schemaLocation attribute for this object.

Returns:
schema location defined for this object

getSchemaType

QName getSchemaType()
Gets the XML schema type of this element. This translates to contents the xsi:type attribute for the element.

Returns:
XML schema type of this element

hasChildren

boolean hasChildren()
Checks if this XMLObject has children.

Returns:
true if this XMLObject has children, false if not

hasParent

boolean hasParent()
Checks to see if this object has a parent.

Returns:
true if the object has a parent, false if not

releaseChildrenDOM

void releaseChildrenDOM(boolean propagateRelease)
Releases the DOM representation of this XMLObject's children.

Parameters:
propagateRelease - true if all descendants of this element should release their DOM

releaseDOM

void releaseDOM()
Releases the DOM representation of this XMLObject, if there is one.


releaseParentDOM

void releaseParentDOM(boolean propagateRelease)
Releases the DOM representation of this XMLObject's parent.

Parameters:
propagateRelease - true if all ancestors of this element should release their DOM

removeNamespace

void removeNamespace(Namespace namespace)
Removes a namespace from this element.

Parameters:
namespace - the namespace to remove

resolveID

XMLObject resolveID(String id)
Find the XMLObject which is identified by the specified ID attribute, within the subtree of XMLObjects which has this XMLObject as its root.

Parameters:
id - the ID attribute to resolve to an XMLObject
Returns:
the XMLObject identified by the specified ID attribute value

resolveIDFromRoot

XMLObject resolveIDFromRoot(String id)
Find the XMLObject which is identified by the specified ID attribute, from the root of the tree of XMLObjects in which this XMLObject is a member.

Parameters:
id - the ID attribute to resolve to an XMLObject
Returns:
the XMLObject identified by the specified ID attribute value

setDOM

void setDOM(Element dom)
Sets the DOM representation of this XMLObject.

Parameters:
dom - DOM representation of this XMLObject

setNoNamespaceSchemaLocation

void setNoNamespaceSchemaLocation(String location)
Sets the value of the XML Schema noNamespaceSchemaLocation attribute for this object.

Parameters:
location - value of the XML Schema noNamespaceSchemaLocation attribute for this object

setParent

void setParent(XMLObject parent)
Sets the parent of this element.

Parameters:
parent - the parent of this element

setSchemaLocation

void setSchemaLocation(String location)
Sets the value of the XML Schema schemaLocation attribute for this object.

Parameters:
location - value of the XML Schema schemaLocation attribute for this object


Copyright © 2006-2010 Internet2. All Rights Reserved.