abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r421924 - in /incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax: ./ util/
Date Fri, 14 Jul 2006 15:28:47 GMT
Author: jmsnell
Date: Fri Jul 14 08:28:47 2006
New Revision: 421924

URL: http://svn.apache.org/viewvc?rev=421924&view=rev
Log:
Use a consistent FOM* naming scheme for the various utility classes

Added:
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMElementIterator.java
      - copied, changed from r421809, incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/ElementIterator.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMLinkIterator.java
      - copied, changed from r421809, incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/LinkIterator.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMSniffingInputStream.java
      - copied, changed from r421809, incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/SniffingInputStream.java
Removed:
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/ElementIterator.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/LinkIterator.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/SniffingInputStream.java
Modified:
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMParser.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMHelper.java

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMParser.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMParser.java?rev=421924&r1=421923&r2=421924&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMParser.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMParser.java
Fri Jul 14 08:28:47 2006
@@ -31,7 +31,7 @@
 import org.apache.abdera.parser.ParseException;
 import org.apache.abdera.parser.Parser;
 import org.apache.abdera.parser.ParserOptions;
-import org.apache.abdera.parser.stax.util.SniffingInputStream;
+import org.apache.abdera.parser.stax.util.FOMSniffingInputStream;
 import org.apache.abdera.util.AbstractParser;
 //import org.apache.abdera.util.SniffingInputStream;
 import org.apache.axiom.om.OMDocument;
@@ -80,10 +80,10 @@
       String charset = (options != null) ? options.getCharset() : null;
       boolean detect = (options != null) ? options.getAutodetectCharset() : true;
       if (charset == null && detect) {
-        SniffingInputStream sin = 
-          (in instanceof SniffingInputStream) ? 
-            (SniffingInputStream)in : 
-            new SniffingInputStream(in);
+        FOMSniffingInputStream sin = 
+          (in instanceof FOMSniffingInputStream) ? 
+            (FOMSniffingInputStream)in : 
+            new FOMSniffingInputStream(in);
         charset = sin.getEncoding();
         in = sin;
       }

Copied: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMElementIterator.java
(from r421809, incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/ElementIterator.java)
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMElementIterator.java?p2=incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMElementIterator.java&p1=incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/ElementIterator.java&r1=421809&r2=421924&rev=421924&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/ElementIterator.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMElementIterator.java
Fri Jul 14 08:28:47 2006
@@ -23,7 +23,7 @@
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.impl.traverse.OMChildrenIterator;
 
-public class ElementIterator extends OMChildrenIterator {
+public class FOMElementIterator extends OMChildrenIterator {
 
   /**
    * Field givenQName
@@ -49,12 +49,12 @@
    * @param currentChild
    * @param givenQName
    */
-  public ElementIterator(Element parent, Class _class) {
+  public FOMElementIterator(Element parent, Class _class) {
     super(((OMElement)parent).getFirstOMChild());
     this._class = _class;
   }
   
-  public ElementIterator(Element parent, Class _class, QName attribute, String value, String
defaultValue) {
+  public FOMElementIterator(Element parent, Class _class, QName attribute, String value,
String defaultValue) {
     this(parent, _class);
     this.attribute = attribute;
     this.value = value;

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMHelper.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMHelper.java?rev=421924&r1=421923&r2=421924&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMHelper.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMHelper.java
Fri Jul 14 08:28:47 2006
@@ -29,13 +29,13 @@
 
   @SuppressWarnings("unchecked")
   public static List<Category> getCategories(Element element, String scheme) {
-    Iterator i = new ElementIterator(element, Category.class, SCHEME, scheme, null);
+    Iterator i = new FOMElementIterator(element, Category.class, SCHEME, scheme, null);
     return new FOMList<Category>(i);
   }
   
   @SuppressWarnings("unchecked")
   public static List<Link> getLinks(Element element, String rel) {
-    Iterator i = new LinkIterator(element, Link.class, REL, rel, Link.REL_ALTERNATE);
+    Iterator i = new FOMLinkIterator(element, Link.class, REL, rel, Link.REL_ALTERNATE);
     return new FOMList<Link>(i);
   }
 }

Copied: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMLinkIterator.java
(from r421809, incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/LinkIterator.java)
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMLinkIterator.java?p2=incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMLinkIterator.java&p1=incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/LinkIterator.java&r1=421809&r2=421924&rev=421924&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/LinkIterator.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMLinkIterator.java
Fri Jul 14 08:28:47 2006
@@ -23,13 +23,13 @@
 import org.apache.abdera.model.Link;
 import org.apache.abdera.parser.stax.FOMLink;
 
-public class LinkIterator extends ElementIterator {
+public class FOMLinkIterator extends FOMElementIterator {
 
-  public LinkIterator(Element parent, Class _class, QName attribute, String value, String
defaultValue) {
+  public FOMLinkIterator(Element parent, Class _class, QName attribute, String value, String
defaultValue) {
     super(parent, _class, attribute, (value != null) ? FOMLink.getRelEquiv(value) : Link.REL_ALTERNATE,
defaultValue);
   }
 
-  public LinkIterator(Element parent, Class _class) {
+  public FOMLinkIterator(Element parent, Class _class) {
     super(parent, _class);
   }
 

Copied: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMSniffingInputStream.java
(from r421809, incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/SniffingInputStream.java)
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMSniffingInputStream.java?p2=incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMSniffingInputStream.java&p1=incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/SniffingInputStream.java&r1=421809&r2=421924&rev=421924&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/SniffingInputStream.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMSniffingInputStream.java
Fri Jul 14 08:28:47 2006
@@ -29,13 +29,13 @@
  * Will attempt to autodetect the character encoding from the stream
  * This will preserve the BOM if it exists
  */
-public class SniffingInputStream 
+public class FOMSniffingInputStream 
   extends FilterInputStream {
 
   private String encoding = null;
   private boolean bomset = false;
   
-  public SniffingInputStream(InputStream in) {
+  public FOMSniffingInputStream(InputStream in) {
     super(new BufferedInputStream(in));
     try {
       encoding = detectEncoding();



Mime
View raw message