DOMXMLObject.java revision 0
/*
* Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Sun designates this
* particular file as subject to the "Classpath" exception as provided
* by Sun in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
/*
* $Id: DOMXMLObject.java,v 1.16 2005/05/12 19:28:35 mullan Exp $
*/
/**
* DOM-based implementation of XMLObject.
*
* @author Sean Mullan
*/
/**
* Creates an <code>XMLObject</code> from the specified parameters.
*
* @param content a list of {@link XMLStructure}s. The list
* is defensively copied to protect against subsequent modification.
* May be <code>null</code> or empty.
* @param id the Id (may be <code>null</code>)
* @param mimeType the mime type (may be <code>null</code>)
* @param encoding the encoding (may be <code>null</code>)
* @return an <code>XMLObject</code>
* @throws ClassCastException if <code>content</code> contains any
* entries that are not of type {@link XMLStructure}
*/
} else {
throw new ClassCastException
("content["+i+"] is not a valid type");
}
}
}
}
/**
* Creates an <code>XMLObject</code> from an element.
*
* @param objElem an Object element
* @throws MarshalException if there is an error when unmarshalling
*/
throws MarshalException {
// unmarshal attributes
for (int i = 0; i < length; i++) {
continue;
continue;
continue;
}
//@@@FIXME: check for other dsig structures
}
}
} else {
}
}
public List getContent() {
return content;
}
return id;
}
public String getMimeType() {
return mimeType;
}
public String getEncoding() {
return encoding;
}
throws MarshalException {
// set attributes
// create and append any elements and mixed content, if necessary
if (object instanceof DOMStructure) {
} else {
}
}
}
if (this == o) {
return true;
}
if (!(o instanceof XMLObject)) {
return false;
}
}
return false;
}
return false;
}
return false;
}
} else {
return false;
}
}
}
return true;
}
}