abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r421001 - in /incubator/abdera/java/trunk: core/src/main/java/org/apache/abdera/parser/Parser.java core/src/main/java/org/apache/abdera/util/AbstractParser.java parser/src/main/java/org/apache/abdera/parser/stax/FOMParser.java
Date Tue, 11 Jul 2006 21:53:34 GMT
Author: jmsnell
Date: Tue Jul 11 14:53:33 2006
New Revision: 421001

URL: http://svn.apache.org/viewvc?rev=421001&view=rev
Log:
Removing the parse(Object) options.  Custom Parser implementation can provide their own type-specific
parse methods if they so desire.

Modified:
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/parser/Parser.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbstractParser.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMParser.java

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/parser/Parser.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/parser/Parser.java?rev=421001&r1=421000&r2=421001&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/parser/Parser.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/parser/Parser.java Tue
Jul 11 14:53:33 2006
@@ -93,31 +93,5 @@
     ParserOptions options) 
       throws ParseException, URISyntaxException;
   
-  <T extends Element>Document<T> parse(
-      Object in) 
-        throws ParseException;
-    
-  <T extends Element>Document<T> parse(
-    Object in, 
-    URI base) 
-      throws ParseException;
-  
-  <T extends Element>Document<T> parse(
-    Object in, 
-    URI base, 
-    ParserOptions options) 
-      throws ParseException;
-  
-  <T extends Element>Document<T> parse(
-    Object in, 
-    String base) 
-      throws ParseException, URISyntaxException;
-  
-  <T extends Element>Document<T> parse(
-    Object in, 
-    String base, 
-    ParserOptions options) 
-      throws ParseException, URISyntaxException;
-  
   ParserOptions getDefaultParserOptions();
 }

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbstractParser.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbstractParser.java?rev=421001&r1=421000&r2=421001&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbstractParser.java
(original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbstractParser.java
Tue Jul 11 14:53:33 2006
@@ -94,36 +94,6 @@
     return parse(in, new URI(base), options);
   }
   
-  public <T extends Element>Document<T> parse(
-    Object in) 
-      throws ParseException {
-    return parse(in, (URI)null, getDefaultParserOptions());
-  }
-
-  public <T extends Element>Document<T> parse(
-    Object in, 
-    URI base) 
-      throws ParseException {
-    return parse(in, base, getDefaultParserOptions());
-  }
-
-  public <T extends Element>Document<T> parse(
-    Object in, 
-    String base) 
-      throws ParseException, 
-             URISyntaxException {
-    return parse(in, new URI(base), getDefaultParserOptions());
-  }
-  
-  public <T extends Element>Document<T> parse(
-    Object in, 
-    String base, 
-    ParserOptions options) 
-      throws ParseException, 
-             URISyntaxException {
-    return parse(in, new URI(base), options);
-  }
-  
   public abstract ParserOptions getDefaultParserOptions();
   
 }

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=421001&r1=421000&r2=421001&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
Tue Jul 11 14:53:33 2006
@@ -20,7 +20,6 @@
 import java.io.InputStream;
 import java.io.Reader;
 import java.net.URI;
-import java.net.URISyntaxException;
 
 import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamReader;
@@ -109,49 +108,6 @@
   @Override
   public ParserOptions getDefaultParserOptions() {
     return new FOMParserOptions();
-  }
-
-  public <T extends Element> Document<T> parse(
-    Object in) 
-      throws ParseException {
-    return parse(in, (URI)null, null);
-  }
-
-  public <T extends Element> Document<T> parse(
-    Object in, 
-    URI base) 
-      throws ParseException {
-    return parse(in, base, null);
-  }
-
-  public <T extends Element> Document<T> parse(
-    Object in, 
-    URI base, 
-    ParserOptions options) 
-      throws ParseException {
-    if (in instanceof InputStream)
-      return parse((InputStream)in, base, options);
-    else if (in instanceof Reader)
-      return parse((Reader)in, base, options);
-    else 
-      throw new IllegalArgumentException("Unsupported input");
-  }
-
-  public <T extends Element> Document<T> parse(
-    Object in, 
-    String base) 
-      throws ParseException, 
-             URISyntaxException {
-    return parse(in, new URI(base), null);
-  }
-
-  public <T extends Element> Document<T> parse(
-    Object in, 
-    String base, 
-    ParserOptions options) 
-      throws ParseException, 
-             URISyntaxException {
-    return parse(in, new URI(base), options);
   }
 
 }



Mime
View raw message