Skip to content
Browse files

Tidy up org.jdom2.input - javadoc and create stax sub-package.

  • Loading branch information...
1 parent 27bb470 commit b3d4831fcfad3477643a06ad08925be1a44718b3 @rolfl rolfl committed Mar 16, 2012
View
4 core/src/java/org/jdom2/input/DOMBuilder.java
@@ -74,8 +74,8 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
/**
- * Builds a JDOM {@link org.jdom2.Document org.jdom2.Document} from a pre-existing
- * DOM {@link org.w3c.dom.Document org.w3c.dom.Document}.
+ * Builds a JDOM Document from a pre-existing DOM {@link org.w3c.dom.Document
+ * org.w3c.dom.Document}.
* <p>
* If you are building a document that has Namespace declarations, you should
* ensure that the Namespaces are correctly recorded in the DOM document before
View
2 core/src/java/org/jdom2/input/SAXBuilder.java
@@ -96,7 +96,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
import org.jdom2.input.sax.XMLReaders;
/**
- * Builds a JDOM document using a SAX parser.
+ * Builds a JDOM Document using a SAX parser.
* <p>
* SAXbuilder uses a third-party SAX parser (chosen by JAXP by default, or you
* can configure it manually) to handle the parsing duties and uses an instance
View
5 core/src/java/org/jdom2/input/StAXEventBuilder.java
@@ -1,6 +1,6 @@
/*--
- Copyright (C) 2011 Jason Hunter & Brett McLaughlin.
+ Copyright (C) 2011-2012 Jason Hunter & Brett McLaughlin.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -74,9 +74,10 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
import org.jdom2.JDOMFactory;
import org.jdom2.Namespace;
import org.jdom2.ProcessingInstruction;
+import org.jdom2.input.stax.DTDParser;
/**
- * Builds a JDOM document from a StAX-based XMLStremReader.
+ * Builds a JDOM Document from a StAX-based XMLEventReader.
* <p>
* XMLStreamReaders are pre-configured and as a result JDOM is not able to
* alter whether the input is validated, or whether the Stream has escaped
View
6 core/src/java/org/jdom2/input/StAXStreamBuilder.java
@@ -1,6 +1,6 @@
/*--
- Copyright (C) 2000-2011 Jason Hunter & Brett McLaughlin.
+ Copyright (C) 2011-2012 Jason Hunter & Brett McLaughlin.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -70,9 +70,11 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
import org.jdom2.JDOMException;
import org.jdom2.JDOMFactory;
import org.jdom2.Namespace;
+import org.jdom2.input.stax.DTDParser;
+import org.jdom2.input.stax.StAXFilter;
/**
- * Builds a JDOM document from a StAX-based XMLStremReader.
+ * Builds a JDOM Document from a StAX-based XMLStremReader.
* <p>
* XMLStreamReaders are pre-configured and as a result JDOM is not able to
* alter whether the input is validated, or whether the Stream has escaped
View
17 core/src/java/org/jdom2/input/package.html
@@ -1,10 +1,15 @@
<body>
-Classes to build JDOM documents from various sources. The most common builder
-class is SAXBuilder which constructs a JDOM document using a SAX parser and
-can pull content from files, streams, sockets, readers, and so on. It can use
-any underlying SAX parser to handle the parsing chores. SAXHandler provides
-support for SAXBuilder. DOMBuilder lets you build from a pre-existing DOM
-tree.
+Classes to build JDOM documents from various sources.
+<p>
+The most commonly used builder is SAXBuilder which constructs a JDOM document
+using a SAX parser and can pull content from files, streams, sockets, readers,
+and so on. It can use any underlying SAX parser to handle the parsing chores.
+<p>
+DOMBuilder lets you build JDOM content from existing <code>org.w3c.dom.*</code>
+instances.
+<p>
+The StAXStreamBuilder and StAXEventBuilder classes allow you to build JDOM
+content from StAX-based XMLStreamReader and XMLEventReader instances.
</body>
View
2 core/src/java/org/jdom2/input/DTDParser.java → .../java/org/jdom2/input/stax/DTDParser.java
@@ -52,7 +52,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
*/
-package org.jdom2.input;
+package org.jdom2.input.stax;
import java.util.HashMap;
import java.util.regex.Matcher;
View
2 ...va/org/jdom2/input/DefaultStAXFilter.java → ...g/jdom2/input/stax/DefaultStAXFilter.java
@@ -52,7 +52,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
*/
-package org.jdom2.input;
+package org.jdom2.input.stax;
import org.jdom2.Namespace;
View
2 .../src/java/org/jdom2/input/StAXFilter.java → ...java/org/jdom2/input/stax/StAXFilter.java
@@ -52,7 +52,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
*/
-package org.jdom2.input;
+package org.jdom2.input.stax;
import org.jdom2.Namespace;
View
60 core/src/java/org/jdom2/input/stax/package-info.java
@@ -0,0 +1,60 @@
+/*--
+
+ Copyright (C) 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/>.
+
+ */
+
+/**
+ Support classes for building JDOM documents and content using StAX readers.
+
+ */
+package org.jdom2.input.stax;
+
View
2 test/src/java/org/jdom2/test/cases/input/TestDTDParser.java
@@ -6,7 +6,7 @@
import org.jdom2.JDOMException;
import org.jdom2.JDOMFactory;
import org.jdom2.DefaultJDOMFactory;
-import org.jdom2.input.DTDParser;
+import org.jdom2.input.stax.DTDParser;
import org.jdom2.test.util.UnitTestUtil;
import org.junit.Test;
View
2 test/src/java/org/jdom2/test/cases/input/TestStAXStreamBuilder.java
@@ -22,9 +22,9 @@
import org.jdom2.DocType;
import org.jdom2.Document;
import org.jdom2.Element;
-import org.jdom2.input.DefaultStAXFilter;
import org.jdom2.input.SAXBuilder;
import org.jdom2.input.StAXStreamBuilder;
+import org.jdom2.input.stax.DefaultStAXFilter;
import org.jdom2.output.Format;
import org.jdom2.output.XMLOutputter;
import org.jdom2.test.util.UnitTestUtil;
View
2 test/src/java/org/jdom2/test/cases/output/TestStAXEventOutputter.java
@@ -46,10 +46,10 @@
import org.jdom2.ProcessingInstruction;
import org.jdom2.Text;
import org.jdom2.UncheckedJDOMFactory;
-import org.jdom2.input.DefaultStAXFilter;
import org.jdom2.input.SAXBuilder;
import org.jdom2.input.StAXStreamBuilder;
import org.jdom2.input.sax.SAXHandler;
+import org.jdom2.input.stax.DefaultStAXFilter;
import org.jdom2.output.Format;
import org.jdom2.output.Format.TextMode;
import org.jdom2.output.support.AbstractStAXEventProcessor;
View
2 test/src/java/org/jdom2/test/cases/output/TestStAXStreamOutputter.java
@@ -42,9 +42,9 @@
import org.jdom2.ProcessingInstruction;
import org.jdom2.Text;
import org.jdom2.UncheckedJDOMFactory;
-import org.jdom2.input.DefaultStAXFilter;
import org.jdom2.input.SAXBuilder;
import org.jdom2.input.StAXStreamBuilder;
+import org.jdom2.input.stax.DefaultStAXFilter;
import org.jdom2.output.Format;
import org.jdom2.output.Format.TextMode;
import org.jdom2.output.support.AbstractStAXStreamProcessor;

0 comments on commit b3d4831

Please sign in to comment.
Something went wrong with that request. Please try again.