@@ -1,6 +1,6 @@
/*--
Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.
Copyright (C) 2000-2012 Jason Hunter & Brett McLaughlin.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -63,6 +63,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* @author Ken Rune Holland
* @author Phil Nelson
* @author Bradley S. Huffman
* @author Rolf Lear
*/
public class DefaultJDOMFactory implements JDOMFactory {

@@ -1,6 +1,6 @@
/*--
Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.
Copyright (C) 2000-2012 Jason Hunter & Brett McLaughlin.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -61,10 +61,11 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT

/**
* Traverse all a parent's descendants (all children at any level below
* the parent).
* the parent - excludes the parent itself).
*
* @author Bradley S. Huffman
* @author Jason Hunter
* @author Rolf Lear
*/
class DescendantIterator implements Iterator<Content> {

@@ -1,6 +1,6 @@
/*--
Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.
Copyright (C) 2000-2012 Jason Hunter & Brett McLaughlin.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -56,7 +56,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT

/**
* An XML DOCTYPE declaration. Method allow the user to get and set the
* root element name, public id, and system id.
* root element name, public id, system id and internal subset.
*
* @author Brett McLaughlin
* @author Jason Hunter
@@ -171,7 +171,7 @@ public String getElementName() {
* This will set the root element name declared by this
* DOCTYPE declaration.
*
* @return DocType <code>DocType</code> this DocType object
* @return this <code>DocType</code> instance
* @param elementName <code>String</code> name of
* root element being constrained.
* @throws IllegalNameException if the given root element name is not a
@@ -1,6 +1,6 @@
/*--
Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.
Copyright (C) 2000-2012 Jason Hunter & Brett McLaughlin.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -69,6 +69,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* @author Jason Hunter
* @author Jools Enticknap
* @author Bradley S. Huffman
* @author Rolf Lear
*/
public class Document extends CloneBase implements Parent {

@@ -730,6 +731,10 @@ public <F extends Content> Iterator<F> getDescendants(final Filter<F> filter) {
return new FilterIterator<F>(new DescendantIterator(this), filter);
}

/**
* Always returns null, Document cannot have a parent.
* @return null
*/
@Override
public Parent getParent() {
return null; // documents never have parents
@@ -738,7 +743,8 @@ public Parent getParent() {


/**
* @see org.jdom2.Parent#getDocument()
* Always returns this Document Instance
* @return 'this' because this Document is it's own Document
*/
@Override
public Document getDocument() {
@@ -747,11 +753,13 @@ public Document getDocument() {

/**
* Assigns an arbitrary object to be associated with this document under
* the given "id" string. Null values are permitted. Strings beginning
* with "http://www.jdom.org/ are reserved for JDOM use.
* the given "id" string. Null values are permitted. 'id' Strings beginning
* with "http://www.jdom.org/ are reserved for JDOM use. Properties set with
* this method will not be serialized with the rest of this Document, should
* serialization need to be done.
*
* @param id the id of the stored object
* @param value the object to store
* @param id the id of the stored <code>Object</code>
* @param value the <code>Object</code> to store
*/
public void setProperty(String id, Object value) {
if (propertyMap == null) {
@@ -765,11 +773,13 @@ public void setProperty(String id, Object value) {
* string, or null if there is no binding or if the binding explicitly
* stored a null value.
*
* @param id the id of the stored object to return
* @return the object associated with the given id
* @param id the id of the stored <code>Object</code> to return
* @return the <code>Object</code> associated with the given id
*/
public Object getProperty(String id) {
if (propertyMap == null) return null;
if (propertyMap == null) {
return null;
}
return propertyMap.get(id);
}

@@ -1,6 +1,6 @@
/*--
Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.
Copyright (C) 2000-2012 Jason Hunter & Brett McLaughlin.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -61,6 +61,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* @author Brett McLaughlin
* @author Jason Hunter
* @author Philip Nelson
* @author Rolf Lear
*/
public class EntityRef extends Content {

@@ -1,6 +1,6 @@
/*--
Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.
Copyright (C) 2000-2012 Jason Hunter & Brett McLaughlin.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -61,6 +61,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* Traverse a parent's children that match the supplied filter.
*
* @author Bradley S. Huffman
* @author Rolf Lear
* @param <T> The Generic type of content returned by this FilterIterator.
*/
class FilterIterator<T> implements Iterator<T> {
@@ -1,6 +1,6 @@
/*--
Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.
Copyright (C) 2000-2012 Jason Hunter & Brett McLaughlin.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -1,6 +1,6 @@
/*--
Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.
Copyright (C) 2000-2012 Jason Hunter & Brett McLaughlin.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -1,6 +1,6 @@
/*--
Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.
Copyright (C) 2000-2012 Jason Hunter & Brett McLaughlin.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -1,6 +1,6 @@
/*--
Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.
Copyright (C) 2000-2012 Jason Hunter & Brett McLaughlin.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -1,3 +1,57 @@
/*--
Copyright (C) 2011-2012 Jason Hunter & Brett McLaughlin.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions, and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions, and the disclaimer that follows
these conditions in the documentation and/or other materials
provided with the distribution.
3. The name "JDOM" must not be used to endorse or promote products
derived from this software without prior written permission. For
written permission, please contact <request_AT_jdom_DOT_org>.
4. Products derived from this software may not be called "JDOM", nor
may "JDOM" appear in their name, without prior written permission
from the JDOM Project Management <request_AT_jdom_DOT_org>.
In addition, we request (but do not require) that you include in the
end-user documentation provided with the redistribution and/or in the
software itself an acknowledgement equivalent to the following:
"This product includes software developed by the
JDOM Project (http://www.jdom.org/)."
Alternatively, the acknowledgment may be graphical using the logos
available at http://www.jdom.org/images/logos.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
This software consists of voluntary contributions made by many
individuals on behalf of the JDOM Project and was originally
created by Jason Hunter <jhunter_AT_jdom_DOT_org> and
Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information
on the JDOM Project, please see <http://www.jdom.org/>.
*/

package org.jdom2;

import javax.xml.transform.TransformerFactory;
@@ -1,6 +1,6 @@
/*--
Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.
Copyright (C) 2000-2012 Jason Hunter & Brett McLaughlin.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -1,6 +1,6 @@
/*--
Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.
Copyright (C) 2000-2012 Jason Hunter & Brett McLaughlin.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -296,7 +296,9 @@ public String toString() {
}

/**
* This returns a probably unique hash code for the <code>Namespace</code>.
* This returns the hash code for the <code>Namespace</code> that conforms
* to the 'equals()' contract.
* <p>
* If two namespaces have the same URI, they are equal and have the same
* hash code, even if they have different prefixes.
*
@@ -1,6 +1,6 @@
/*--
Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.
Copyright (C) 2000-2012 Jason Hunter & Brett McLaughlin.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -68,6 +68,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
*
* @author Bradley S. Huffman
* @author Jason Hunter
* @author Rolf Lear
*/
public interface Parent extends Cloneable, NamespaceAware, Serializable {

@@ -1,6 +1,6 @@
/*--
Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.
Copyright (C) 2000-2012 Jason Hunter & Brett McLaughlin.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -460,12 +460,6 @@ public String toString() {
.toString();
}

/**
* This will return a clone of this <code>ProcessingInstruction</code>.
*
* @return <code>Object</code> - clone of this
* <code>ProcessingInstruction</code>.
*/
@Override
public ProcessingInstruction clone() {
ProcessingInstruction pi = (ProcessingInstruction) super.clone();
@@ -1,6 +1,6 @@
/*--
Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.
Copyright (C) 2000-2012 Jason Hunter & Brett McLaughlin.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -252,12 +252,6 @@ public String toString() {
.toString();
}

/**
* This will return a clone of this <code>Text</code> node, with the
* same character content, but no parent.
*
* @return <code>Text</code> - cloned node.
*/
@Override
public Text clone() {
Text text = (Text)super.clone();
@@ -1,6 +1,6 @@
/*--
Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.
Copyright (C) 2000-2012 Jason Hunter & Brett McLaughlin.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -62,6 +62,8 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* input is absolutely correct. This factory can speed builds, but any
* problems in the input will be uncaught until later when they could cause
* infinite loops, malformed XML, or worse. Use with extreme caution.
*
* @author Various Authors - history is not complete
*/
public class UncheckedJDOMFactory extends DefaultJDOMFactory {

@@ -1,6 +1,6 @@
/*--
Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.
Copyright (C) 2000-2012 Jason Hunter & Brett McLaughlin.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -64,6 +64,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* @author Elliotte Rusty Harold
* @author Jason Hunter
* @author Bradley S. Huffman
* @author Rolf Lear
*/
final public class Verifier {