XMLObject.java revision 0
0N/A * Portions Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. Sun designates this 0N/A * particular file as subject to the "Classpath" exception as provided 0N/A * by Sun in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 0N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 0N/A * CA 95054 USA or visit www.sun.com if you need additional information or 0N/A * have any questions. 0N/A * =========================================================================== 0N/A * (C) Copyright IBM Corp. 2003 All Rights Reserved. 0N/A * =========================================================================== 0N/A * A representation of the XML <code>Object</code> element as defined in 0N/A * W3C Recommendation for XML-Signature Syntax and Processing</a>. 0N/A * An <code>XMLObject</code> may contain any data and may include optional 0N/A * MIME type, ID, and encoding attributes. The XML Schema Definition is 0N/A * <element name="Object" type="ds:ObjectType"/> 0N/A * <complexType name="ObjectType" mixed="true"> 0N/A * <sequence minOccurs="0" maxOccurs="unbounded"> 0N/A * <any namespace="##any" processContents="lax"/> 0N/A * <attribute name="Id" type="ID" use="optional"/> 0N/A * <attribute name="MimeType" type="string" use="optional"/> 0N/A * <attribute name="Encoding" type="anyURI" use="optional"/> 0N/A * </complexType> 0N/A * A <code>XMLObject</code> instance may be created by invoking the 0N/A * {@link XMLSignatureFactory#newXMLObject newXMLObject} method of the 0N/A * {@link XMLSignatureFactory} class; for example: 0N/A * XMLSignatureFactory fac = XMLSignatureFactory.getInstance("DOM"); 0N/A * List content = Collections.singletonList(fac.newManifest(references))); 0N/A * XMLObject object = factory.newXMLObject(content, "object-1", null, null); 0N/A * <p>Note that this class is named <code>XMLObject</code> rather than 0N/A * <code>Object</code> to avoid naming clashes with the existing 0N/A * {@link java.lang.Object java.lang.Object} class. 0N/A * @author Sean Mullan 0N/A * @author JSR 105 Expert Group 0N/A * @author Joyce L. Leung 0N/A * @see XMLSignatureFactory#newXMLObject(List, String, String, String) 0N/A * URI that identifies the <code>Object</code> element (this can be 0N/A * specified as the value of the <code>type</code> parameter of the 0N/A * {@link Reference} class to identify the referent's type). 0N/A * Returns an {@link java.util.Collections#unmodifiableList unmodifiable 0N/A * list} of {@link XMLStructure}s contained in this <code>XMLObject</code>, 0N/A * which represent elements from any namespace. 0N/A *<p>If there is a public subclass representing the type of 0N/A * <code>XMLStructure</code>, it is returned as an instance of that class 0N/A * (ex: a <code>SignatureProperties</code> element would be returned 0N/A * as an instance of {@link javax.xml.crypto.dsig.SignatureProperties}). 0N/A * @return an unmodifiable list of <code>XMLStructure</code>s (may be empty 0N/A * but never <code>null</code>) 0N/A * Returns the Id of this <code>XMLObject</code>. 0N/A * @return the Id (or <code>null</code> if not specified) 0N/A * Returns the mime type of this <code>XMLObject</code>. The 0N/A * mime type is an optional attribute which describes the data within this 0N/A * <code>XMLObject</code> (independent of its encoding). 0N/A * @return the mime type (or <code>null</code> if not specified) 0N/A * Returns the encoding URI of this <code>XMLObject</code>. The encoding 0N/A * URI identifies the method by which the object is encoded. 0N/A * @return the encoding URI (or <code>null</code> if not specified)