You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by ij...@apache.org on 2012/05/15 00:30:47 UTC

svn commit: r1338464 - in /jena/trunk/jena-core/src/main/java: com/hp/hpl/jena/rdf/arp/ARP.java com/hp/hpl/jena/rdf/arp/SAX2Model.java com/hp/hpl/jena/rdf/arp/SAX2RDF.java com/hp/hpl/jena/rdf/arp/package.html jena/schemagen.java

Author: ijd
Date: Mon May 14 22:30:47 2012
New Revision: 1338464

URL: http://svn.apache.org/viewvc?rev=1338464&view=rev
Log:
Fixes for link problems discovered by the link checker

Modified:
    jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/ARP.java
    jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/SAX2Model.java
    jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/SAX2RDF.java
    jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/package.html
    jena/trunk/jena-core/src/main/java/jena/schemagen.java

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/ARP.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/ARP.java?rev=1338464&r1=1338463&r2=1338464&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/ARP.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/ARP.java Mon May 14 22:30:47 2012
@@ -17,7 +17,7 @@
  */
 
 /* This file includes contributions by:
- * (c) Copyright 2003, Plugged In Software 
+ * (c) Copyright 2003, Plugged In Software
  * See end of file for BSD-style license.
  */
 
@@ -44,8 +44,8 @@ import com.hp.hpl.jena.rdf.arp.impl.RDFX
  * <li>Setting the statement handler.</li>
  * <li>Optionally setting the other handlers.</li>
  * </ul>
- * 
- * </li> 
+ *
+ * </li>
  * <li>Call a load method.</li>
  * </ol>
  * <p>
@@ -53,7 +53,7 @@ import com.hp.hpl.jena.rdf.arp.impl.RDFX
  * The SAXEvents generated by Xerces are then
  * analysed as RDF by ARP.
  * Errors may occur
- * in either the XML or the RDF part, see 
+ * in either the XML or the RDF part, see
  * {@link ARPHandlers#setErrorHandler} for details
  * of how to distinguish between them.</p>
  * <p>
@@ -62,22 +62,22 @@ import com.hp.hpl.jena.rdf.arp.impl.RDFX
  * returns false or when the {@link AResource#setUserData} method has been
  * used. In these cases ARP needs to remember the <code>rdf:nodeID</code>
  * usage through the file life time. </p>
- * <p>See <a href="../../../../../../../ARP/index.html">ARP documentation</a> for more information.</p>
+ * <p>See <a href="/documentation/io/index.html">ARP documentation</a> for more information.</p>
  * @author  Jeremy Carroll with contributions from Simon Raboczi
  *   and Andrew Newman
  */
-public class ARP implements ARPConfig 
+public class ARP implements ARPConfig
 {
 
     final private RDFXMLParser arpf;
-    
+
 /** Creates a new RDF Parser.
  * Can parse one file at a time.
- */    
+ */
     public ARP()  {
         arpf =  RDFXMLParser.create();
     }
-	/**
+    /**
  * When parsing a file, this returns a Locator giving the
  * position of the last XML event processed by ARP.
  * This may return null or misleading results before any
@@ -87,13 +87,13 @@ public class ARP implements ARPConfig 
     public Locator getLocator() {
         return arpf.getLocator();
     }
-    
+
 /** Load RDF/XML from a Reader.
  * @param in The input XML document.
  * @param xmlBase The base URI for the document.
  * @throws SAXException More serious error during XML or RDF processing; or thrown from the ErrorHandler.
  * @throws IOException Occurring during XML processing.
- */    
+ */
     public void load(Reader in,String xmlBase) throws SAXException, IOException {
         InputSource inputS = new InputSource(in);
         inputS.setSystemId(xmlBase);
@@ -110,8 +110,8 @@ public class ARP implements ARPConfig 
  * @param xmlBase The base URI for the document.
  * @throws SAXException More serious error during XML or RDF processing; or thrown from the ErrorHandler.
  * @throws IOException Occurring during XML processing.
- */    
-    public void load(InputStream in,String xmlBase) throws SAXException, 
+ */
+    public void load(InputStream in,String xmlBase) throws SAXException,
 IOException {
         //load(new InputStreamReader(in),xmlBase);
         InputSource inputS = new InputSource(in);
@@ -123,8 +123,8 @@ IOException {
  * @param in The input XML document.
  * @throws SAXException More serious error during XML or RDF processing; or thrown from the ErrorHandler.
  * @throws IOException Occurring during XML processing.
- */   
-    public void load(InputStream in) 
+ */
+    public void load(InputStream in)
      throws SAXException, IOException {
         load(in,"");
     }
@@ -132,7 +132,7 @@ IOException {
  * @param in The input XML document.
  * @throws SAXException More serious error during XML or RDF processing; or thrown from the ErrorHandler.
  * @throws IOException Occurring during XML processing.
- */    
+ */
     public void load(Reader in) throws SAXException, IOException {
         load(in,"");
     }
@@ -152,7 +152,7 @@ IOException {
      */
     @Override
     public ARPHandlers getHandlers() {
-    	return arpf.getHandlers();
+        return arpf.getHandlers();
     }
     /**
      * Copies the handlers from the argument
@@ -164,7 +164,7 @@ IOException {
      */
     @Override
     public void setHandlersWith(ARPHandlers handlers){
-    	arpf.setHandlersWith(handlers);
+        arpf.setHandlersWith(handlers);
     }
     /**
      * The options used during parsing.
@@ -179,14 +179,14 @@ IOException {
      * @see ARPOptions#setStrictErrorMode(int)
      * @see ARPOptions#setEmbedding(boolean)
      * @see ARPOptions#setErrorMode(int, int)
-     * 
+     *
      * @see #setOptionsWith
      * @return The handlers used during parsing.
      */
-    
+
     @Override
     public ARPOptions getOptions(){
-    	return arpf.getOptions();
+        return arpf.getOptions();
     }
 
     /**
@@ -199,17 +199,17 @@ IOException {
      */
     @Override
     public void setOptionsWith(ARPOptions opts){
-    	arpf.setOptionsWith(opts);
+        arpf.setOptionsWith(opts);
     }
 
     void setBadStatementHandler(StatementHandler sh) {
         arpf.setBadStatementHandler(sh);
-        
+
     }
 }
 
 /*
- *  (c) Copyright 2003, Plugged In Software 
+ *  (c) Copyright 2003, Plugged In Software
  *
  *  All rights reserved.
  *

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/SAX2Model.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/SAX2Model.java?rev=1338464&r1=1338463&r2=1338464&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/SAX2Model.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/SAX2Model.java Mon May 14 22:30:47 2012
@@ -27,16 +27,16 @@ import com.hp.hpl.jena.shared.JenaExcept
 
 /**
  * Use arbitrary SAX input to Jena. See <a
- * href="../../../../../../../ARP/sax.html">ARP SAX documentation</a>.
- * 
+ * href="/documentation/io/sax.html">ARP SAX documentation</a>.
+ *
  * @author Jeremy J. Carroll
- * 
+ *
  */
 public class SAX2Model extends SAX2RDF {
 
     /**
      * Factory method to create a new SAX2Model.
-     * 
+     *
      * @param base
      *            The retrieval URL, or the base URI to be used while parsing.
      * @param m
@@ -60,7 +60,7 @@ public class SAX2Model extends SAX2RDF {
      * the application needs to find this value in the outer context.
      * Optionally, namespace prefixes can be passed from the outer context using
      * {@link #startPrefixMapping}.
-     * 
+     *
      * @param base
      *            The retrieval URL, or the base URI to be used while parsing.
      * @param m
@@ -83,7 +83,7 @@ public class SAX2Model extends SAX2RDF {
 
     /**
      * Begin the scope of a prefix-URI Namespace mapping.
-     * 
+     *
      * <p>
      * This is passed to any {@link NamespaceHandler} associated with this
      * parser. It can be called before the initial <code>startElement</code>
@@ -96,12 +96,12 @@ public class SAX2Model extends SAX2RDF {
      * prefixes declared in the outer context, in which case, any output routine
      * will need to use a gensym for such namespaces.
      * </p>
-     * 
+     *
      * @param prefix
      *            The Namespace prefix being declared.
      * @param uri
      *            The Namespace URI the prefix is mapped to.
-     * 
+     *
      */
     @Override
     public void startPrefixMapping(String prefix, String uri)
@@ -117,7 +117,7 @@ public class SAX2Model extends SAX2RDF {
     /**
      * Constructor, see {@link #create(String, Model, String)} for top-level
      * javadoc.
-     * 
+     *
      * @param base
      * @param m
      * @param lang
@@ -136,7 +136,7 @@ public class SAX2Model extends SAX2RDF {
         JenaHandler rslt = new JenaHandler(m, errorHandler);
         rslt.useWith(getHandlers());
         return rslt;
-        
+
     }
     private boolean closed = false;
 
@@ -157,7 +157,7 @@ public class SAX2Model extends SAX2RDF {
      * Note that errors of class {@link ParseException}can be promoted using
      * the {@link ParseException#promote}method. See ARP documentation for
      * {@link org.xml.sax.ErrorHandler}for the details of error promotion.
-     * 
+     *
      * @param errHandler
      *            The new error handler.
      * @return The old error handler.
@@ -172,7 +172,7 @@ public class SAX2Model extends SAX2RDF {
     }
 
     /**
-     * 
+     *
      * Change a property of the RDF or XML parser.
      * <p>
      * I do not believe that many of the XML features or properties are in fact
@@ -251,7 +251,7 @@ public class SAX2Model extends SAX2RDF {
      * </tr>
      * </table></dd>
      * </dl>
-     * 
+     *
      * @param str
      *            The property to set.
      * @param value

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/SAX2RDF.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/SAX2RDF.java?rev=1338464&r1=1338463&r2=1338464&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/SAX2RDF.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/SAX2RDF.java Mon May 14 22:30:47 2012
@@ -34,7 +34,7 @@ import com.hp.hpl.jena.rdf.arp.impl.XMLH
  * The Java Developer's Almanac</a> for a discussion of how to transform a DOM
  * into a source of SAX events.
  * </p>
- * 
+ *
  * <p>
  * The use pattern is to create and initialize one of these,
  * then set it as the content, lexical and error handler
@@ -43,7 +43,7 @@ import com.hp.hpl.jena.rdf.arp.impl.XMLH
  * prefixes. This initializing can be done for XMLReaders
  * using {@link #installHandlers}.
  * </p>
- * 
+ *
  * <p>
  * To build a Jena model it is better to use {@link SAX2Model}.
  * The documentation here, covers usage both using the subclass
@@ -53,29 +53,26 @@ import com.hp.hpl.jena.rdf.arp.impl.XMLH
  * This class does not support multithreaded SAX sources, nor IO interruption.
  * </p>
  * <p>
- * There is further documentation:
- * <a href="../../../../../../../ARP/standalone.html#not-jena">here</a>
- * and
- * <a href="../../../../../../../ARP/sax.html#sax2rdf">here</a>.
+ * There is further documentation: <a href="/documentation/io/sax.html">here</a>.
  * </p>
  * @author Jeremy Carroll
  * */
 public class SAX2RDF extends SAX2RDFImpl
 implements ARPConfig {
 
-	/**
+    /**
      * Factory method to create a new SAX2RDF.
      * Use
      * {@link #getHandlers} or {@link #setHandlersWith} to provide
      * a {@link StatementHandler}, and usually an {@link org.xml.sax.ErrorHandler}
      *
-     * @param base The retrieval URL, or the base URI to be 
+     * @param base The retrieval URL, or the base URI to be
      * used while parsing.
      *  @return A new SAX2RDF
      * @throws ParseException
      */
-    static public SAX2RDF create(String base) throws SAXParseException { 
-        return new SAX2RDF(base,""); 
+    static public SAX2RDF create(String base) throws SAXParseException {
+        return new SAX2RDF(base,"");
     }
     /**
      * Factory method to create a new SAX2RDF.
@@ -85,7 +82,7 @@ implements ARPConfig {
      * needs to find this value in the outer context.
      * Optionally, namespace prefixes can be passed from the
      * outer context using {@link #startPrefixMapping}.
-     * @param base The retrieval URL, or the base URI to be 
+     * @param base The retrieval URL, or the base URI to be
      * used while parsing. Use
      * {@link #getHandlers} or {@link #setHandlersWith} to provide
      * a {@link StatementHandler}, and usually an {@link org.xml.sax.ErrorHandler}
@@ -93,17 +90,17 @@ implements ARPConfig {
      * @return A new SAX2RDF
      * @throws ParseException If base or lang is bad.
      */
-    static public SAX2RDF create(String base, String lang) throws SAXParseException { 
-        return new SAX2RDF(base,lang); 
-    }    
-    
-    
+    static public SAX2RDF create(String base, String lang) throws SAXParseException {
+        return new SAX2RDF(base,lang);
+    }
+
+
     /**
      * Begin the scope of a prefix-URI Namespace mapping.
      *
      *<p>This is passed to any {@link NamespaceHandler} associated
      *with this parser.
-     *It can be called before the initial 
+     *It can be called before the initial
      *<code>startElement</code> event, or other events associated
      *with the elements being processed.
      *When building a Jena Model, with {@link SAX2Model} it is not required to match this
@@ -113,79 +110,79 @@ implements ARPConfig {
      *remembered with the Model, and may be used in some
      *output routines. It is permitted to not call this method
      *for prefixes declared in the outer context, in which case,
-     *any output routine will need to use a gensym for such 
+     *any output routine will need to use a gensym for such
      *namespaces.
      *</p>
      * @param prefix The Namespace prefix being declared.
      * @param uri The Namespace URI the prefix is mapped to.
-     * 
+     *
      */
     @Override
     public void startPrefixMapping (String prefix, String uri) throws SAXParseException
-	 { super.startPrefixMapping(prefix,uri);
+     { super.startPrefixMapping(prefix,uri);
     }
 
     SAX2RDF(String base,  String lang) throws SAXParseException {
-    	super(base,lang);
-    	initParse(base);
+        super(base,lang);
+        initParse(base);
     }
 
-    /**The handlers used for processing ARP events. 
+    /**The handlers used for processing ARP events.
      * Do not use with a {@link SAX2Model}.
 
-	 * @see com.hp.hpl.jena.rdf.arp.ARPConfig#getHandlers()
-	 */
-	@Override
+     * @see com.hp.hpl.jena.rdf.arp.ARPConfig#getHandlers()
+     */
+    @Override
     public ARPHandlers getHandlers() {
-		return super.getHandlers();
-	}
-    /**Copys handlers used for processing ARP events. 
+        return super.getHandlers();
+    }
+    /**Copys handlers used for processing ARP events.
      * Do not use with a {@link SAX2Model}.
-	
-	 * @see com.hp.hpl.jena.rdf.arp.ARPConfig#setHandlersWith(ARPHandlers)
-	 */
-	@Override
+
+     * @see com.hp.hpl.jena.rdf.arp.ARPConfig#setHandlersWith(ARPHandlers)
+     */
+    @Override
     public void setHandlersWith(ARPHandlers handlers) {
-		super.setHandlersWith(handlers);
-	}
-	/* (non-Javadoc)
-	 * @see com.hp.hpl.jena.rdf.arp.ARPConfig#getOptions()
-	 */
-	@Override
+        super.setHandlersWith(handlers);
+    }
+    /* (non-Javadoc)
+     * @see com.hp.hpl.jena.rdf.arp.ARPConfig#getOptions()
+     */
+    @Override
     public ARPOptions getOptions() {
-		return super.getOptions();
-	}
-	/* (non-Javadoc)
-	 * @see com.hp.hpl.jena.rdf.arp.ARPConfig#setOptions(com.hp.hpl.jena.rdf.arp.ARPOptions)
-	 */
-	@Override
+        return super.getOptions();
+    }
+    /* (non-Javadoc)
+     * @see com.hp.hpl.jena.rdf.arp.ARPConfig#setOptions(com.hp.hpl.jena.rdf.arp.ARPOptions)
+     */
+    @Override
     public void setOptionsWith(ARPOptions opts) {
-		super.setOptionsWith(opts);
-		
-	}
-	/**
-	 * Initializes an XMLReader to use the SAX2RDF object
-	 * as its handler for all events, and to use namespaces
-	 * and namespace prefixes.
-	 * @param rdr The XMLReader to initialize.
-	 * @param sax2rdf The SAX2RDF instance to use.
-	 */
-	static public void installHandlers(XMLReader rdr, XMLHandler sax2rdf) 
-	throws SAXException 
-	{
-		rdr.setEntityResolver(sax2rdf);
-		rdr.setDTDHandler(sax2rdf);
-		rdr.setContentHandler(sax2rdf);
-		rdr.setErrorHandler(sax2rdf);
-		rdr.setFeature("http://xml.org/sax/features/namespaces", true);
-		rdr.setFeature(
-			"http://xml.org/sax/features/namespace-prefixes",
-			false);
-		rdr.setProperty(
-			"http://xml.org/sax/properties/lexical-handler",
-			sax2rdf);
-		rdr.setFeature(
-		        "http://apache.org/xml/features/allow-java-encodings",true);
-	
-	}
+        super.setOptionsWith(opts);
+
+    }
+    /**
+     * Initializes an XMLReader to use the SAX2RDF object
+     * as its handler for all events, and to use namespaces
+     * and namespace prefixes.
+     * @param rdr The XMLReader to initialize.
+     * @param sax2rdf The SAX2RDF instance to use.
+     */
+    static public void installHandlers(XMLReader rdr, XMLHandler sax2rdf)
+    throws SAXException
+    {
+        rdr.setEntityResolver(sax2rdf);
+        rdr.setDTDHandler(sax2rdf);
+        rdr.setContentHandler(sax2rdf);
+        rdr.setErrorHandler(sax2rdf);
+        rdr.setFeature("http://xml.org/sax/features/namespaces", true);
+        rdr.setFeature(
+            "http://xml.org/sax/features/namespace-prefixes",
+            false);
+        rdr.setProperty(
+            "http://xml.org/sax/properties/lexical-handler",
+            sax2rdf);
+        rdr.setFeature(
+                "http://apache.org/xml/features/allow-java-encodings",true);
+
+    }
 }

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/package.html
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/package.html?rev=1338464&r1=1338463&r2=1338464&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/package.html (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/package.html Mon May 14 22:30:47 2012
@@ -24,18 +24,16 @@
 <p>A parser for <a href="http://www.w3.org/TR/rdf-syntax-grammar">RDF/XML</a>.
 </p>
 <p>
-See the 
-<a href="../../../../../../../ARP/index.html">ARP documentation</a> 
-and 
-the 
-<a href="../../../../../../../IO/iohowto.html#input">I/O mini howto</a> for more information.
+See the
+<a href="/documentation/io/index.html">ARP documentation</a>
+for more information.
 </p>
 <!--
-<p>The interaction between ARP and Xerces 
+<p>The interaction between ARP and Xerces
 seems to include a significant
 memory leak possibly caused by Xerces interning some strings, on behalf of ARP.
 This feature cannot be turned off.
-This is not a new bug, so ARP users will not experience a degradation 
+This is not a new bug, so ARP users will not experience a degradation
 in performance. However, for users who have limited memory, or who are processing
 large files, or files from many diverse sources,
 or for long-lived applications such as web servers, it is important to
@@ -45,7 +43,7 @@ form an open set in RDF/XML, unlike most
 </p>
 <p>
 A potential work around is to use a SAX parser other than Xerces and then
-use {@link com.hp.hpl.jena.rdf.arp.SAX2Model SAX2Model} or 
+use {@link com.hp.hpl.jena.rdf.arp.SAX2Model SAX2Model} or
 {@link com.hp.hpl.jena.rdf.arp.SAX2RDF SAX2RDF} to parse the SAX event stream as RDF.
 </p>
 <p>

Modified: jena/trunk/jena-core/src/main/java/jena/schemagen.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/jena/schemagen.java?rev=1338464&r1=1338463&r2=1338464&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/jena/schemagen.java (original)
+++ jena/trunk/jena-core/src/main/java/jena/schemagen.java Mon May 14 22:30:47 2012
@@ -86,7 +86,7 @@ public class schemagen {
 
 
 
-    /** List of Java reserved keywords, see <a href="http://java.sun.com/docs/books/tutorial/java/nutsandbolts/_keywords.html">this list</a>. */
+    /** List of Java reserved keywords, see <a href="http://docs.oracle.com/javase/tutorial/java/nutsandbolts/_keywords.html">this list</a>. */
     public static final String[] JAVA_KEYWORDS = {
         "abstract",    "continue",    "for",         "new",         "switch",
         "assert",      "default",     "goto",        "package",     "synchronized",