[Mulgara-svn] r1714 - in trunk/src/jar: ant-task/java/org/mulgara/ant/task/itql client-jrdf/java/org/mulgara/client/jrdf client-jrdf/java/org/mulgara/client/jrdf/answer client-jrdf/java/org/mulgara/client/jrdf/exception client-jrdf/java/org/mulgara/client/jrdf/itql client-jrdf/java/org/mulgara/client/jrdf/test client-jrdf/java/org/mulgara/client/jrdf/util client-jrdf/java/org/mulgara/client/jrdf/writer content-mbox/java/org/mulgara/content/mbox/parser content-mbox/java/org/mulgara/content/mbox/parser/config content-mbox/java/org/mulgara/content/mbox/parser/exception content-mbox/java/org/mulgara/content/mbox/parser/model content-mbox/java/org/mulgara/content/mbox/parser/model/exception content-mp3/java/org/mulgara/content/mp3 content-mp3/java/org/mulgara/content/mp3/parser content-mp3/java/org/mulgara/content/mp3/parser/api content-mp3/java/org/mulgara/content/mp3/parser/exception query/java/org/mulgara/query/operation query/java/org/mulgara/server

pag at mulgara.org pag at mulgara.org
Wed Jun 3 01:46:01 UTC 2009


Author: pag
Date: 2009-06-02 18:46:00 -0700 (Tue, 02 Jun 2009)
New Revision: 1714

Modified:
   trunk/src/jar/ant-task/java/org/mulgara/ant/task/itql/ITQLCommandUnitTest.java
   trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/AbstractGraphFactory.java
   trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/ClientClosableIterator.java
   trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/ClientGraph.java
   trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/ClientTripleFactory.java
   trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/GraphElementBuilder.java
   trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/RemoteGraphProxy.java
   trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/VirtualClosableIteratorProxy.java
   trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/answer/ClosableAnswerIteratorProxy.java
   trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/answer/RemoteAnswerGraphProxy.java
   trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/exception/JRDFClientException.java
   trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/itql/ItqlGraphProxy.java
   trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/itql/SessionGraphProxy.java
   trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/test/ClientGraphUnitTest.java
   trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/test/ItqlGraphUnitTest.java
   trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/test/SessionGraphUnitTest.java
   trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/ClientGraphUtil.java
   trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/ClosableArrayIteratorProxy.java
   trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/DefaultClosableIteratorProxy.java
   trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/NodeComparator.java
   trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/ObjectNodeComparator.java
   trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/OrderedClosableIteratorProxy.java
   trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/PredicateNodeComparator.java
   trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/SPOComparator.java
   trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/SubjectNodeComparator.java
   trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/UniqueSubjectIterator.java
   trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/writer/MemoryXMLWriter.java
   trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/Handler.java
   trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/MBoxParserUnitTest.java
   trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/MboxFolder.java
   trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/MboxFolderImpl.java
   trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/MboxMessage.java
   trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/MboxReader.java
   trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/MboxStore.java
   trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/MboxStoreImpl.java
   trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/MboxUrlConnection.java
   trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/MimeMessageToPart.java
   trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/QuollEmailAddress.java
   trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/config/ConfigManager.java
   trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/exception/IOProcessingException.java
   trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/exception/MBoxProcessException.java
   trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/exception/MimeMessageProcessException.java
   trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/exception/MimeProcessingException.java
   trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/exception/UnsupportedEncodingProcessingException.java
   trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/model/MBox.java
   trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/model/MBoxManager.java
   trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/model/ModelFactory.java
   trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/model/exception/FactoryException.java
   trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/model/exception/InvalidMBoxException.java
   trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/model/exception/ModelException.java
   trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/model/exception/VocabularyException.java
   trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/MP3StatementsUnitTest.java
   trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/ID3ParsersUnitTest.java
   trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/ID3v1ParserImpl.java
   trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/ID3v2ParserImpl.java
   trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/IdentifierProcessor.java
   trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/ParserFactory.java
   trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/api/MP3Conversion.java
   trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/exception/ConversionException.java
   trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/exception/FactoryException.java
   trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/exception/IdentifierException.java
   trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/exception/ParserException.java
   trunk/src/jar/query/java/org/mulgara/query/operation/Rollback.java
   trunk/src/jar/query/java/org/mulgara/server/JRDFSession.java
   trunk/src/jar/query/java/org/mulgara/server/JenaSession.java
   trunk/src/jar/query/java/org/mulgara/server/NonRemoteSessionException.java
   trunk/src/jar/query/java/org/mulgara/server/ResourceManagerInstanceAdaptor.java
   trunk/src/jar/query/java/org/mulgara/server/SessionFactoryConfiguration.java
   trunk/src/jar/query/java/org/mulgara/server/SessionFactoryException.java
Log:
Removed warnings. These included: unused imports, variables that were never read, generics, unused loggers, and missing serialization IDs on serializable classes (mostly exceptions). Some formatting was updated as well, particularly where opening braces were on a new line, and 'catch' and 'else' were put on a new line after a closing brace.

Modified: trunk/src/jar/ant-task/java/org/mulgara/ant/task/itql/ITQLCommandUnitTest.java
===================================================================
--- trunk/src/jar/ant-task/java/org/mulgara/ant/task/itql/ITQLCommandUnitTest.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/ant-task/java/org/mulgara/ant/task/itql/ITQLCommandUnitTest.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -60,7 +60,6 @@
 public class ITQLCommandUnitTest extends TestCase {
 
   /** Log category */
-  @SuppressWarnings("unused")
   private final static Logger log = Logger.getLogger(ITQLCommandUnitTest.class);
 
   /** Description of the Field */

Modified: trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/AbstractGraphFactory.java
===================================================================
--- trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/AbstractGraphFactory.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/AbstractGraphFactory.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -70,8 +70,8 @@
   /**
    * Logger. This is named after the class.
    */
-  private final static Logger logger = Logger.getLogger(AbstractGraphFactory.class.
-      getName());
+  @SuppressWarnings("unused")
+  private final static Logger logger = Logger.getLogger(AbstractGraphFactory.class.getName());
 
   /**
    * Returns a ClientGraph backed by an Answer.

Modified: trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/ClientClosableIterator.java
===================================================================
--- trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/ClientClosableIterator.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/ClientClosableIterator.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -55,17 +55,16 @@
  *
  * @licence <a href="{@docRoot}/../../LICENCE">Mozilla Public License v1.1</a>
  */
-public class ClientClosableIterator
-    implements ClosableIterator {
+public class ClientClosableIterator<T> implements ClosableIterator<T> {
 
   /**
    * Logger. This is named after the class.
    */
-  private final static Logger log = Logger.getLogger(ClientClosableIterator.class.
-      getName());
+  @SuppressWarnings("unused")
+  private final static Logger log = Logger.getLogger(ClientClosableIterator.class.getName());
 
   /** Proxy that does all of the real work */
-  private VirtualClosableIteratorProxy proxy = null;
+  private VirtualClosableIteratorProxy<T> proxy = null;
 
   /** Graph that created this iterator */
   private RemoteGraphProxy creator = null;
@@ -75,7 +74,7 @@
    *
    */
   public ClientClosableIterator(RemoteGraphProxy creator,
-                                VirtualClosableIteratorProxy proxy) {
+                                VirtualClosableIteratorProxy<T> proxy) {
 
     super();
 
@@ -86,8 +85,7 @@
     }
     if (proxy == null) {
 
-      throw new IllegalArgumentException("VirtualClosableIteratorProxy cannot " +
-                                         " be null.");
+      throw new IllegalArgumentException("VirtualClosableIteratorProxy cannot be null.");
     }
 
     this.creator = creator;
@@ -124,7 +122,7 @@
    * @return the next element in the iteration.
    * @exception NoSuchElementException iteration has no more elements.
    */
-  public Object next() {
+  public T next() {
 
     return proxy.next();
   }

Modified: trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/ClientGraph.java
===================================================================
--- trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/ClientGraph.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/ClientGraph.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -59,9 +59,13 @@
  */
 public class ClientGraph implements Graph {
 
+  /** Generated serialization ID */
+  private static final long serialVersionUID = 4410126271252082706L;
+
   /**
    * Logger. This is named after the class.
    */
+  @SuppressWarnings("unused")
   private final static Logger log = Logger.getLogger(ClientGraph.class.getName());
 
   /** Proxy that does all of the real work */
@@ -100,19 +104,17 @@
    * @return True if the statement is found in the model, otherwise false.
    * @throws GraphException If there was an error accessing the graph.
    */
-  public boolean contains(SubjectNode subject, PredicateNode predicate,
-      ObjectNode object) throws GraphException {
+  public boolean contains(SubjectNode subject, PredicateNode predicate, ObjectNode object) throws GraphException {
 
     //create a triple from the arguments and use
     try {
 
-      Triple triple = this.getElementFactory().createTriple(subject, predicate,
-          object);
+      Triple triple = this.getElementFactory().createTriple(subject, predicate, object);
 
       return this.contains(triple);
-    }
-    catch (GraphElementFactoryException factoryException) {
 
+    } catch (GraphElementFactoryException factoryException) {
+
       throw new GraphException("Could not create Triple.", factoryException);
     }
   }
@@ -142,19 +144,18 @@
    * @throws GraphException If there was an error accessing the graph.
    * @return ClosableIterator
    */
-  public ClosableIterator find(SubjectNode subject, PredicateNode predicate,
+  public ClosableIterator<Triple> find(SubjectNode subject, PredicateNode predicate,
       ObjectNode object) throws GraphException {
 
     //create a triple from the arguments and use
     try {
 
-      Triple triple = this.getElementFactory().createTriple(subject, predicate,
-          object);
+      Triple triple = this.getElementFactory().createTriple(subject, predicate, object);
 
       return this.find(triple);
-    }
-    catch (GraphElementFactoryException factoryException) {
 
+    } catch (GraphElementFactoryException factoryException) {
+
       throw new GraphException("Could not create Triple.", factoryException);
     }
   }
@@ -168,7 +169,7 @@
    * @throws GraphException If there was an error accessing the graph.
    * @return ClosableIterator
    */
-  public ClosableIterator find(Triple triple) throws GraphException {
+  public ClosableIterator<Triple> find(Triple triple) throws GraphException {
 
     return proxy.find(triple);
   }
@@ -181,19 +182,17 @@
    * @param object The object.
    * @throws GraphException If the statement can't be made.
    */
-  public void add(SubjectNode subject, PredicateNode predicate,
-      ObjectNode object) throws GraphException {
+  public void add(SubjectNode subject, PredicateNode predicate, ObjectNode object) throws GraphException {
 
     //create a triple from the arguments and use
     try {
 
-      Triple triple = this.getElementFactory().createTriple(subject, predicate,
-          object);
+      Triple triple = this.getElementFactory().createTriple(subject, predicate, object);
 
       this.add(triple);
-    }
-    catch (GraphElementFactoryException factoryException) {
 
+    } catch (GraphElementFactoryException factoryException) {
+
       throw new GraphException("Could not create Triple.", factoryException);
     }
   }
@@ -207,7 +206,7 @@
   public void add(Triple triple) throws GraphException {
 
     //create an Iterator from a single element Triple array
-    Iterator iter = proxy.createClosableIterator(new Triple [] {triple});
+    Iterator<Triple> iter = proxy.createClosableIterator(new Triple [] {triple});
 
     this.add(iter);
   }
@@ -218,7 +217,7 @@
    * @param triples The triple iterator.
    * @throws GraphException
    */
-  public void add(Iterator triples) throws GraphException {
+  public void add(Iterator<Triple> triples) throws GraphException {
 
      proxy.add(triples);
   }
@@ -238,12 +237,10 @@
     //create a triple from the arguments and use
     try {
 
-      Triple triple = this.getElementFactory().createTriple(subject, predicate,
-          object);
+      Triple triple = this.getElementFactory().createTriple(subject, predicate, object);
 
       this.remove(triple);
-    }
-    catch (GraphElementFactoryException factoryException) {
+    } catch (GraphElementFactoryException factoryException) {
 
       throw new GraphException("Could not create Triple.", factoryException);
     }
@@ -259,7 +256,7 @@
   public void remove(Triple triple) throws GraphException {
 
     //create an Iterator from a single element Triple array
-    Iterator iter = proxy.createClosableIterator(new Triple [] {triple});
+    Iterator<Triple> iter = proxy.createClosableIterator(new Triple [] {triple});
 
     this.remove(iter);
   }
@@ -270,7 +267,7 @@
    * @param triples The triple iterator.
    * @throws GraphException
    */
-  public void remove(Iterator triples) throws GraphException {
+  public void remove(Iterator<Triple> triples) throws GraphException {
 
     proxy.remove(triples);
   }

Modified: trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/ClientTripleFactory.java
===================================================================
--- trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/ClientTripleFactory.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/ClientTripleFactory.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -60,6 +60,7 @@
   /**
    * Logger. This is named after the class.
    */
+  @SuppressWarnings("unused")
   private final static Logger log = Logger.getLogger(ClientTripleFactory.class.getName());
 
 

Modified: trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/GraphElementBuilder.java
===================================================================
--- trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/GraphElementBuilder.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/GraphElementBuilder.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -63,8 +63,8 @@
   /**
    * Logger. This is named after the class.
    */
-  private final static Logger log = Logger.getLogger(GraphElementBuilder.class.
-      getName());
+  @SuppressWarnings("unused")
+  private final static Logger log = Logger.getLogger(GraphElementBuilder.class.getName());
 
   /** Does most of the work */
   private GraphElementFactory factory = null;
@@ -187,10 +187,10 @@
    * @param triples Triple[]
    * @return ClientClosableIterator
    */
-  public ClientClosableIterator createClosableIterator(RemoteGraphProxy creator, Triple [] triples) {
+  public ClientClosableIterator<Triple> createClosableIterator(RemoteGraphProxy creator, Triple [] triples) {
 
     ClosableArrayIteratorProxy proxy = new ClosableArrayIteratorProxy(triples);
 
-    return new ClientClosableIterator(creator, proxy);
+    return new ClientClosableIterator<Triple>(creator, proxy);
   }
 }

Modified: trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/RemoteGraphProxy.java
===================================================================
--- trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/RemoteGraphProxy.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/RemoteGraphProxy.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -82,7 +82,7 @@
    * @param triple The triple to find.
    * @throws GraphException If there was an error accessing the graph.
    */
-  public ClosableIterator find(Triple triple) throws GraphException;
+  public ClosableIterator<Triple> find(Triple triple) throws GraphException;
 
   /**
    * Adds an iterator containing triples into the graph.
@@ -90,7 +90,7 @@
    * @param triples The triple iterator.
    * @throws GraphExcepotion If the statements can't be made.
    */
-  public void add(Iterator triples) throws GraphException;
+  public void add(Iterator<Triple> triples) throws GraphException;
 
   /**
    * Removes an iterator containing triples from the graph.
@@ -98,7 +98,7 @@
    * @param triples The triple iterator.
    * @throws GraphExcepotion If the statements can't be revoked.
    */
-  public void remove(Iterator triples) throws GraphException;
+  public void remove(Iterator<Triple> triples) throws GraphException;
 
   /**
    * Returns the node factory for the graph, or creates one.
@@ -134,7 +134,7 @@
    *
    * @param iter Iterator
    */
-  public void unregister(Iterator iter);
+  public void unregister(Iterator<?> iter);
 
   /**
    * Factory method used to create an iterator for the Triples.
@@ -142,7 +142,7 @@
    * @param triples Triple[]
    * @return ClientClosableIterator
    */
-  public ClientClosableIterator createClosableIterator(Triple [] triples);
+  public ClientClosableIterator<Triple> createClosableIterator(Triple [] triples);
 
   /**
    * Returns the session associated with the graph.

Modified: trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/VirtualClosableIteratorProxy.java
===================================================================
--- trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/VirtualClosableIteratorProxy.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/VirtualClosableIteratorProxy.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -82,6 +82,6 @@
  *
  * @licence <a href="{@docRoot}/../../LICENCE">Mozilla Public License v1.1</a>
  */
-public interface VirtualClosableIteratorProxy extends ClosableIterator {
+public interface VirtualClosableIteratorProxy<T> extends ClosableIterator<T> {
 
 }

Modified: trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/answer/ClosableAnswerIteratorProxy.java
===================================================================
--- trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/answer/ClosableAnswerIteratorProxy.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/answer/ClosableAnswerIteratorProxy.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -63,12 +63,12 @@
  * Portions by Paul Gearon.
  * @copyright &copy;2006 <a href="http://www.herzumsoftware.com/">Herzum Software LLC</a>
  */
-public class ClosableAnswerIteratorProxy
-    implements VirtualClosableIteratorProxy {
+public class ClosableAnswerIteratorProxy implements VirtualClosableIteratorProxy<Triple> {
 
   /**
    * Logger. This is named after the class.
    */
+  @SuppressWarnings("unused")
   private final static Logger log = Logger.getLogger(
       ClosableAnswerIteratorProxy.class.getName());
 
@@ -225,7 +225,7 @@
    * @return the next element in the iteration.
    * @exception NoSuchElementException iteration has no more elements.
    */
-  public Object next() {
+  public Triple next() {
 
     //ensure the iterator is not closed
     if (this.closed) {
@@ -458,7 +458,7 @@
           throw new IllegalStateException(JRDF_STATE_ERROR_STRING);
         }
         //wrap the last triple to be returned in an Iterator
-        Set lastTriple = new HashSet();
+        Set<Triple> lastTriple = new HashSet<Triple>();
         lastTriple.add(this.lastTriple);
 
         //remove

Modified: trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/answer/RemoteAnswerGraphProxy.java
===================================================================
--- trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/answer/RemoteAnswerGraphProxy.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/answer/RemoteAnswerGraphProxy.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -68,8 +68,8 @@
   /**
    * Logger. This is named after the class.
    */
-  private final static Logger log = Logger.getLogger(RemoteAnswerGraphProxy.class.
-      getName());
+  @SuppressWarnings("unused")
+  private final static Logger log = Logger.getLogger(RemoteAnswerGraphProxy.class.getName());
 
   /** Data source */
   private Answer answer = null;
@@ -78,7 +78,7 @@
   private GraphElementBuilder builder = null;
 
   /** Map of Clasable iterator to be closed with this graph */
-  private Set iterators = null;
+  private Set<ClosableIterator<Triple>> iterators = null;
 
   /** Indicates the Proxy has been closed */
   private boolean closed = false;
@@ -108,7 +108,7 @@
     this.session = session;
     this.answer = dataSource;
     this.builder = new GraphElementBuilder();
-    this.iterators = new HashSet();
+    this.iterators = new HashSet<ClosableIterator<Triple>>();
   }
 
   /**
@@ -129,7 +129,7 @@
     }
 
     //do a search for the triple
-    ClosableIterator iter = this.find(triple);
+    ClosableIterator<Triple> iter = this.find(triple);
 
     //if a null iterator gets returned there is a problem
     if (iter == null) {
@@ -148,7 +148,7 @@
    * @param triple The triple to find.
    * @throws GraphException If there was an error accessing the graph.
    */
-  public ClosableIterator find(Triple triple) throws GraphException {
+  public ClosableIterator<Triple> find(Triple triple) throws GraphException {
 
     //ensure the graph is not closed
     if (this.closed) {
@@ -173,7 +173,7 @@
    * @param triples The triple iterator.
    * @throws GraphExcepotion If the statements can't be made.
    */
-  public void add(Iterator triples) throws GraphException {
+  public void add(Iterator<Triple> triples) throws GraphException {
 
     throw new UnsupportedOperationException("RemoteAnswerGraphProxy does not " +
                                             "support add(Triple). Graph is " +
@@ -186,7 +186,7 @@
    * @param triples The triple iterator.
    * @throws GraphExcepotion If the statements can't be revoked.
    */
-  public void remove(Iterator triples) throws GraphException {
+  public void remove(Iterator<Triple> triples) throws GraphException {
 
     throw new UnsupportedOperationException("RemoteAnswerGraphProxy does not " +
                                             "support remove(Triple). Graph is " +
@@ -251,12 +251,10 @@
 
       //check if there are 0 rows (returns 0, 1 or N)
       return (this.answer.getRowCardinality() <= 0);
-    }
-    catch (TuplesException tuplesException) {
+    } catch (TuplesException tuplesException) {
 
       //rethrow
-      throw new JRDFClientException("Could not determine if Answer is empty.",
-                                    tuplesException);
+      throw new JRDFClientException("Could not determine if Answer is empty.", tuplesException);
     }
   }
 
@@ -275,10 +273,10 @@
 //        this.answer.close();
 
         //close all created ClosableIterators
-        Iterator iter = this.iterators.iterator();
+        Iterator<ClosableIterator<Triple>> iter = this.iterators.iterator();
         while (iter.hasNext()) {
 
-          ( (ClosableIterator) iter.next()).close();
+          iter.next().close();
         }
       }
 
@@ -296,7 +294,7 @@
    *
    * @param iter Iterator
    */
-  public void unregister(Iterator iter) {
+  public void unregister(Iterator<?> iter) {
 
     this.iterators.remove(iter);
   }
@@ -307,7 +305,7 @@
    * @param triples Triple[]
    * @return ClientClosableIterator
    */
-  public ClientClosableIterator createClosableIterator(Triple[] triples) {
+  public ClientClosableIterator<Triple> createClosableIterator(Triple[] triples) {
 
     //ensure the graph is not closed
     if (this.closed) {
@@ -316,7 +314,7 @@
     }
 
     //create iterator and hold a reference to it
-    ClientClosableIterator iterator = this.builder.createClosableIterator(
+    ClientClosableIterator<Triple> iterator = this.builder.createClosableIterator(
         this, triples);
     this.iterators.add(iterator);
 
@@ -330,7 +328,7 @@
    * @param answer Answer
    * @return ClientClosableIterator
    */
-  public ClientClosableIterator createClosableIterator(Triple filter,
+  public ClientClosableIterator<Triple> createClosableIterator(Triple filter,
       Answer answer) throws JRDFClientException {
 
     //ensure the graph is not closed
@@ -344,7 +342,7 @@
         (Answer) answer.clone());
 
     //create iterator and hold a reference to it (for closing)
-    ClientClosableIterator iterator = new ClientClosableIterator(this, proxy);
+    ClientClosableIterator<Triple> iterator = new ClientClosableIterator<Triple>(this, proxy);
     this.iterators.add(iterator);
 
     return iterator;

Modified: trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/exception/JRDFClientException.java
===================================================================
--- trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/exception/JRDFClientException.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/exception/JRDFClientException.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -81,6 +81,9 @@
  */
 public class JRDFClientException extends RuntimeException {
 
+  /** Generated serialization ID. */
+  private static final long serialVersionUID = 228262747346817478L;
+
   /**
    * Create an exception.
    *

Modified: trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/itql/ItqlGraphProxy.java
===================================================================
--- trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/itql/ItqlGraphProxy.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/itql/ItqlGraphProxy.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -74,8 +74,8 @@
   /**
    * Logger. This is named after the class.
    */
-  private final static Logger log = Logger.getLogger(ItqlGraphProxy.class.
-      getName());
+  @SuppressWarnings("unused")
+  private final static Logger log = Logger.getLogger(ItqlGraphProxy.class.getName());
 
   /** Database Session */
   private JRDFSession session = null;
@@ -87,7 +87,7 @@
   private GraphElementBuilder builder = null;
 
   /** Map of Clasable iterator to be closed with this graph */
-  private List iterators = null;
+  private List<ClosableIterator<Triple>> iterators = null;
 
   /** Indicates the Proxy has been closed */
   private boolean closed = false;
@@ -99,19 +99,16 @@
    * @param modelURI URI
    * @throws GraphException
    */
-  public ItqlGraphProxy(JRDFSession session, URI modelURI)
-      throws GraphException {
+  public ItqlGraphProxy(JRDFSession session, URI modelURI) throws GraphException {
 
     super();
 
     //validate
     if (session == null) {
-
       throw new GraphException("Session cannot be null.");
     }
 
     if (modelURI == null) {
-
       throw new GraphException("Graph URI cannot be null.");
     }
 
@@ -119,7 +116,7 @@
     this.session = session;
     this.modelURI = modelURI;
     this.builder = new GraphElementBuilder();
-    this.iterators = new ArrayList();
+    this.iterators = new ArrayList<ClosableIterator<Triple>>();
   }
 
   /**
@@ -151,7 +148,7 @@
    * @throws GraphException If there was an error accessing the graph.
    * @return ClosableIterator
    */
-  public ClosableIterator find(Triple triple) throws GraphException {
+  public ClosableIterator<Triple> find(Triple triple) throws GraphException {
 
     //ensure the graph is not closed
     if (this.closed) {
@@ -163,11 +160,10 @@
       Answer answer = this.session.find(this.modelURI, triple.getSubject(),
           triple.getPredicate(), triple.getObject());
       return this.createClosableIterator(answer);
+
+    } catch (JRDFClientException clientException) {
+      throw new GraphException("Could not create new ClosableIterator.", clientException);
     }
-    catch (JRDFClientException clientException) {
-      throw new GraphException("Could not create new ClosableIterator.",
-          clientException);
-    }
   }
 
   /**
@@ -176,26 +172,23 @@
    * @param triples The triple iterator.
    * @throws GraphException If the statements can't be made.
    */
-  public void add(Iterator triples) throws GraphException {
+  public void add(Iterator<Triple> triples) throws GraphException {
 
     //ensure the graph is not closed
     if (this.closed) {
-
       throw new JRDFClientException("Graph has been closed.");
     }
 
     //insert a set of triples into the session
     try {
 
-      Set tripleSet = new HashSet();
+      Set<Triple> tripleSet = new HashSet<Triple>();
       while (triples.hasNext()) {
-
         tripleSet.add(triples.next());
       }
       session.insert(this.modelURI, tripleSet);
-    }
-    catch (QueryException queryException) {
 
+    } catch (QueryException queryException) {
       throw new GraphException("Could not add triples.", queryException);
     }
   }
@@ -206,11 +199,10 @@
    * @param triples The triple iterator.
    * @throws GraphException If the statements can't be revoked.
    */
-  public void remove(Iterator triples) throws GraphException {
+  public void remove(Iterator<Triple> triples) throws GraphException {
 
     //ensure the graph is not closed
     if (this.closed) {
-
       throw new JRDFClientException("Graph has been closed.");
     }
 
@@ -218,10 +210,10 @@
     try {
 
       Triple currentTriple = null;
-      Set tripleSet = new HashSet();
+      Set<Triple> tripleSet = new HashSet<Triple>();
       while (triples.hasNext()) {
 
-        currentTriple = (Triple) triples.next();
+        currentTriple = triples.next();
 
         //check that the triple occurs before adding it
         if (!this.contains(currentTriple)) {
@@ -233,9 +225,8 @@
         tripleSet.add(currentTriple);
       }
       session.delete(this.modelURI, tripleSet);
-    }
-    catch (QueryException queryException) {
 
+    } catch (QueryException queryException) {
       throw new GraphException("Could not remove triples.", queryException);
     }
   }
@@ -249,7 +240,6 @@
 
     //ensure the graph is not closed
     if (this.closed) {
-
       throw new JRDFClientException("Graph has been closed.");
     }
 
@@ -265,7 +255,6 @@
 
     //ensure the graph is not closed
     if (this.closed) {
-
       throw new JRDFClientException("Graph has been closed.");
     }
 
@@ -276,26 +265,20 @@
       //execute and get row count
       answer = this.session.find(this.modelURI, null, null, null);
       return answer.getRowCount();
-    }
-    catch (Exception exception) {
 
+    } catch (Exception exception) {
       //rethrow
-      throw new JRDFClientException("Could not determine number of Triples.",
-          exception);
-    }
-    finally {
+      throw new JRDFClientException("Could not determine number of Triples.", exception);
+    } finally {
 
       //close the answer
       if (answer != null) {
 
         try {
-
           answer.close();
-        }
-        catch (TuplesException tuplesException) {
 
-          throw new JRDFClientException("Could not close Answer.",
-              tuplesException);
+        } catch (TuplesException tuplesException) {
+          throw new JRDFClientException("Could not close Answer.", tuplesException);
         }
       }
     }
@@ -310,7 +293,6 @@
 
     //ensure the graph is not closed
     if (this.closed) {
-
       throw new JRDFClientException("Graph has been closed.");
     }
 
@@ -330,7 +312,7 @@
 
       //close all created ClosableIterators
       while (iterators.size() != 0) {
-        ((ClosableIterator) iterators.remove(0)).close();
+        iterators.remove(0).close();
       }
     }
 
@@ -342,7 +324,7 @@
    *
    * @param iter Iterator
    */
-  public void unregister(Iterator iter) {
+  public void unregister(Iterator<?> iter) {
     if (iterators.contains(iter)) {
       this.iterators.remove(iter);
     }
@@ -354,17 +336,15 @@
    * @param triples Triple[]
    * @return ClientClosableIterator
    */
-  public ClientClosableIterator createClosableIterator(Triple[] triples) {
+  public ClientClosableIterator<Triple> createClosableIterator(Triple[] triples) {
 
     //ensure the graph is not closed
     if (this.closed) {
-
       throw new JRDFClientException("Graph has been closed.");
     }
 
     //create iterator and hold a reference to it
-    ClientClosableIterator iterator = this.builder.createClosableIterator(this,
-        triples);
+    ClientClosableIterator<Triple> iterator = this.builder.createClosableIterator(this, triples);
     this.iterators.add(iterator);
 
     return iterator;
@@ -378,20 +358,17 @@
    * @return ClientClosableIterator
    * @throws JRDFClientException
    */
-  public ClientClosableIterator createClosableIterator(Triple filter,
-      Answer answer) throws JRDFClientException {
+  public ClientClosableIterator<Triple> createClosableIterator(Triple filter, Answer answer) throws JRDFClientException {
 
     //ensure the graph is not closed
     if (this.closed) {
-
       throw new JRDFClientException("Graph has been closed.");
     }
 
-    ClosableAnswerIteratorProxy proxy = new ClosableAnswerIteratorProxy(this,
-        filter, answer);
+    ClosableAnswerIteratorProxy proxy = new ClosableAnswerIteratorProxy(this, filter, answer);
 
     //create iterator and hold a reference to it (for closing)
-    ClientClosableIterator iterator = new ClientClosableIterator(this, proxy);
+    ClientClosableIterator<Triple> iterator = new ClientClosableIterator<Triple>(this, proxy);
     this.iterators.add(iterator);
 
     return iterator;
@@ -404,12 +381,10 @@
    * @return ClientClosableIterator
    * @throws JRDFClientException
    */
-  public ClientClosableIterator createClosableIterator(Answer answer) throws
-      JRDFClientException {
+  public ClientClosableIterator<Triple> createClosableIterator(Answer answer) throws JRDFClientException {
 
     //ensure the graph is not closed
     if (this.closed) {
-
       throw new JRDFClientException("Graph has been closed.");
     }
 
@@ -418,11 +393,9 @@
       //this filter will allow all triples through
       Triple filter = this.builder.createTriple(null, null, null);
       return this.createClosableIterator(filter, answer);
-    }
-    catch (GraphElementFactoryException factoryException) {
+    } catch (GraphElementFactoryException factoryException) {
 
-      throw new JRDFClientException("Could not create null filter Triple.",
-          factoryException);
+      throw new JRDFClientException("Could not create null filter Triple.", factoryException);
     }
   }
 

Modified: trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/itql/SessionGraphProxy.java
===================================================================
--- trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/itql/SessionGraphProxy.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/itql/SessionGraphProxy.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -29,7 +29,6 @@
 
 // Java 2 standard packages
 import java.util.*;
-import java.io.*;
 import java.net.*;
 
 // Log4J
@@ -74,8 +73,8 @@
   /**
    * Logger. This is named after the class.
    */
-  private final static Logger log = Logger.getLogger(SessionGraphProxy.class.
-      getName());
+  @SuppressWarnings("unused")
+  private final static Logger log = Logger.getLogger(SessionGraphProxy.class.getName());
 
   /** Database Session */
   private JRDFSession session = null;
@@ -87,7 +86,7 @@
   private GraphElementBuilder builder = null;
 
   /** Map of Clasable iterator to be closed with this graph */
-  private List iterators = null;
+  private List<ClosableIterator<Triple>> iterators = null;
 
   /** Indicates the Proxy has been closed */
   private boolean closed = false;
@@ -118,7 +117,7 @@
     this.session = session;
     this.modelURI = modelURI;
     this.builder = new GraphElementBuilder();
-    this.iterators = new ArrayList();
+    this.iterators = new ArrayList<ClosableIterator<Triple>>();
   }
 
   /**
@@ -156,7 +155,7 @@
    * @throws GraphException If there was an error accessing the graph.
    * @return ClosableIterator
    */
-  public ClosableIterator find(Triple triple) throws GraphException {
+  public ClosableIterator<Triple> find(Triple triple) throws GraphException {
 
     //ensure the graph is not closed
     if (this.closed) {
@@ -168,11 +167,10 @@
       Answer answer = this.session.find(this.modelURI, triple.getSubject(),
           triple.getPredicate(), triple.getObject());
       return this.createClosableIterator(answer);
+
+    } catch (JRDFClientException clientException) {
+      throw new GraphException("Could not create new ClosableIterator.", clientException);
     }
-    catch (JRDFClientException clientException) {
-      throw new GraphException("Could not create new ClosableIterator.",
-                               clientException);
-    }
   }
 
   /**
@@ -181,25 +179,24 @@
    * @param triples The triple iterator.
    * @throws GraphException If the statements can't be made.
    */
-  public void add(Iterator triples) throws GraphException {
+  public void add(Iterator<Triple> triples) throws GraphException {
 
     //ensure the graph is not closed
     if (this.closed) {
-
       throw new JRDFClientException("Graph has been closed.");
     }
 
     //insert a set of triples into the session
     try{
 
-      Set tripleSet = new HashSet();
+      Set<Triple> tripleSet = new HashSet<Triple>();
       while (triples.hasNext()) {
 
         tripleSet.add(triples.next());
       }
       session.insert(this.modelURI, tripleSet);
-    } catch (QueryException queryException) {
 
+    } catch (QueryException queryException) {
       throw new GraphException("Could not add triples.", queryException);
     }
   }
@@ -210,11 +207,10 @@
    * @param triples The triple iterator.
    * @throws GraphException If the statements can't be revoked.
    */
-  public void remove(Iterator triples) throws GraphException {
+  public void remove(Iterator<Triple> triples) throws GraphException {
 
     //ensure the graph is not closed
     if (this.closed) {
-
       throw new JRDFClientException("Graph has been closed.");
     }
 
@@ -222,7 +218,7 @@
     try {
 
       Triple currentTriple = null;
-      Set tripleSet = new HashSet();
+      Set<Triple> tripleSet = new HashSet<Triple>();
       while (triples.hasNext()) {
 
         currentTriple = (Triple) triples.next();
@@ -239,8 +235,8 @@
         tripleSet.add(currentTriple);
       }
       session.delete(this.modelURI, tripleSet);
-    } catch (QueryException queryException) {
 
+    } catch (QueryException queryException) {
       throw new GraphException("Could not remove triples.", queryException);
     }
   }
@@ -254,7 +250,6 @@
 
     //ensure the graph is not closed
     if (this.closed) {
-
       throw new JRDFClientException("Graph has been closed.");
     }
 
@@ -270,7 +265,6 @@
 
     //ensure the graph is not closed
     if (this.closed) {
-
       throw new JRDFClientException("Graph has been closed.");
     }
 
@@ -281,14 +275,11 @@
       //execute and get row count
       answer = this.session.find(this.modelURI, null, null, null);
       return answer.getRowCount();
-    }
-    catch (Exception exception) {
+    } catch (Exception exception) {
 
       //rethrow
-      throw new JRDFClientException("Could not determine number of Triples.",
-                                    exception);
-    }
-    finally {
+      throw new JRDFClientException("Could not determine number of Triples.", exception);
+    } finally {
 
       //close the answer
       if (answer != null) {
@@ -296,11 +287,9 @@
         try {
 
           answer.close();
-        }
-        catch (TuplesException tuplesException) {
+        } catch (TuplesException tuplesException) {
 
-          throw new JRDFClientException("Could not close Answer.",
-                                        tuplesException);
+          throw new JRDFClientException("Could not close Answer.", tuplesException);
         }
       }
     }
@@ -315,7 +304,6 @@
 
     //ensure the graph is not closed
     if (this.closed) {
-
       throw new JRDFClientException("Graph has been closed.");
     }
 
@@ -335,7 +323,7 @@
 
       //close all created ClosableIterators
       while (iterators.size() != 0) {
-        ((ClosableIterator) iterators.remove(0)).close();
+        iterators.remove(0).close();
       }
     }
 
@@ -347,7 +335,7 @@
    *
    * @param iter Iterator
    */
-  public void unregister(Iterator iter) {
+  public void unregister(Iterator<?> iter) {
     if (iterators.contains(iter)) {
       this.iterators.remove(iter);
     }
@@ -359,17 +347,15 @@
    * @param triples Triple[]
    * @return ClientClosableIterator
    */
-  public ClientClosableIterator createClosableIterator(Triple[] triples) {
+  public ClientClosableIterator<Triple> createClosableIterator(Triple[] triples) {
 
     //ensure the graph is not closed
     if (this.closed) {
-
       throw new JRDFClientException("Graph has been closed.");
     }
 
     //create iterator and hold a reference to it
-    ClientClosableIterator iterator = this.builder.createClosableIterator(
-       this, triples);
+    ClientClosableIterator<Triple> iterator = this.builder.createClosableIterator( this, triples);
     this.iterators.add(iterator);
 
     return iterator;
@@ -383,7 +369,7 @@
    * @return ClientClosableIterator
    * @throws JRDFClientException
    */
-  public ClientClosableIterator createClosableIterator(Triple filter,
+  public ClientClosableIterator<Triple> createClosableIterator(Triple filter,
       Answer answer) throws JRDFClientException {
 
     //ensure the graph is not closed
@@ -396,7 +382,7 @@
         filter, answer);
 
     //create iterator and hold a reference to it (for closing)
-    ClientClosableIterator iterator = new ClientClosableIterator(this, proxy);
+    ClientClosableIterator<Triple> iterator = new ClientClosableIterator<Triple>(this, proxy);
     this.iterators.add(iterator);
 
     return iterator;
@@ -409,12 +395,11 @@
    * @return ClientClosableIterator
    * @throws JRDFClientException
    */
-  public ClientClosableIterator createClosableIterator(Answer answer) throws
+  public ClientClosableIterator<Triple> createClosableIterator(Answer answer) throws
       JRDFClientException {
 
     //ensure the graph is not closed
     if (this.closed) {
-
       throw new JRDFClientException("Graph has been closed.");
     }
 
@@ -425,8 +410,7 @@
       return this.createClosableIterator(filter, answer);
     } catch (GraphElementFactoryException factoryException) {
 
-      throw new JRDFClientException("Could not create null filter Triple.",
-                                    factoryException);
+      throw new JRDFClientException("Could not create null filter Triple.", factoryException);
     }
   }
 

Modified: trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/test/ClientGraphUnitTest.java
===================================================================
--- trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/test/ClientGraphUnitTest.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/test/ClientGraphUnitTest.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -251,7 +251,7 @@
 
     //create a triple and use it to filter the objects
     Triple triple = factory.createTriple(null, null, null);
-    ClosableIterator iter = client.find(triple);
+    ClosableIterator<Triple> iter = client.find(triple);
 
     //compare with answer
     compareAnswerToIterator(answer, iter, factory);
@@ -286,7 +286,7 @@
     Triple triple = factory.createTriple(factory.createResource(URI.create(
         subject)),
                                          null, null);
-    ClosableIterator iter = client.find(triple);
+    ClosableIterator<Triple> iter = client.find(triple);
     compareAnswerToIterator(getSubject("<" + subject + ">"), iter,
                                  factory);
     iter.close();
@@ -325,7 +325,7 @@
                                          factory.createResource(URI.create(
         predicate)),
                                          null);
-    ClosableIterator iter = client.find(triple);
+    ClosableIterator<Triple> iter = client.find(triple);
     compareAnswerToIterator(getPredicate("<" + predicate + ">"), iter,
                                  factory);
     iter.close();
@@ -365,7 +365,7 @@
     Triple triple = factory.createTriple(null, null,
                                          factory.createResource(URI.
         create(object)));
-    ClosableIterator iter = client.find(triple);
+    ClosableIterator<Triple> iter = client.find(triple);
     compareAnswerToIterator(getObject("<" + object + ">"), iter,
                                  factory);
     iter.close();
@@ -420,7 +420,7 @@
    * @param iterator ClosableITerator
    * @throws Exception
    */
-  private void compareAnswerToIterator(Answer answer, ClosableIterator iterator,
+  private void compareAnswerToIterator(Answer answer, ClosableIterator<Triple> iterator,
                                        GraphElementFactory factory) throws
       Exception {
 

Modified: trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/test/ItqlGraphUnitTest.java
===================================================================
--- trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/test/ItqlGraphUnitTest.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/test/ItqlGraphUnitTest.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -28,7 +28,6 @@
 package org.mulgara.client.jrdf.test;
 
 // Java packages
-import java.io.*;
 import java.net.*;
 import java.util.*;
 
@@ -102,11 +101,11 @@
   public Graph newGraph() throws Exception {
 
     //reset graph
-    this.dropModel(this.modelURI);
-    this.createModel(this.modelURI);
+    this.dropModel(modelURI);
+    this.createModel(modelURI);
 
     //create and return graph
-    return new ClientGraph(new ItqlGraphProxy(session, this.modelURI));
+    return new ClientGraph(new ItqlGraphProxy(session, modelURI));
   }
 
   /**
@@ -163,7 +162,7 @@
     assertEquals(1, graph.getNumberOfTriples());
 
     // Create iterator.
-    ClosableIterator iter = graph.find(null, null, null);
+    graph.find(null, null, null);
 
     // Close the graph.
     graph.close();
@@ -183,7 +182,7 @@
     assertEquals(1, graph.getNumberOfTriples());
 
     // Create iterator.
-    ClosableIterator iter = graph.find(null, null, null);
+    ClosableIterator<Triple> iter = graph.find(null, null, null);
     iter.close();
 
     // Close the graph.
@@ -228,7 +227,7 @@
     assertEquals(2, graph.getNumberOfTriples());
 
     // Add using iterator
-    ArrayList list = new ArrayList();
+    ArrayList<Triple> list = new ArrayList<Triple>();
     list.add(graph.getElementFactory().createTriple(ref2, ref2, ref1));
     list.add(graph.getElementFactory().createTriple(ref1, ref2, ref2));
 
@@ -250,31 +249,26 @@
     try {
 
       String hostname = InetAddress.getLocalHost().getCanonicalHostName();
-      this.serverURI = new URI("rmi", hostname, "/" + SERVER_NAME, null);
-      this.modelURI = new URI("rmi", hostname, "/" + SERVER_NAME, MODEL_NAME);
+      serverURI = new URI("rmi", hostname, "/" + SERVER_NAME, null);
+      modelURI = new URI("rmi", hostname, "/" + SERVER_NAME, MODEL_NAME);
 
       //get session
-      SessionFactory sessionFactory = SessionFactoryFinder.newSessionFactory(
-          this.serverURI, true);
+      SessionFactory sessionFactory = SessionFactoryFinder.newSessionFactory(serverURI, true);
       this.session = (JRDFSession) sessionFactory.newJRDFSession();
 
       //initialize model
-      this.createModel(this.modelURI);
+      this.createModel(modelURI);
 
       //let superclass set up too
       super.setUp();
-    }
-    catch (Exception exception) {
+    } catch (Exception exception) {
 
       //try to tear down first
       try {
-
         tearDown();
-      }
-      finally {
+      } catch (Throwable t) { }
 
-        throw exception;
-      }
+      throw exception;
     }
   }
 
@@ -285,7 +279,7 @@
    */
   public void tearDown() throws Exception {
 
-    this.dropModel(this.modelURI);
+    this.dropModel(modelURI);
 
     //allow super to close down too
     super.tearDown();

Modified: trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/test/SessionGraphUnitTest.java
===================================================================
--- trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/test/SessionGraphUnitTest.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/test/SessionGraphUnitTest.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -28,9 +28,7 @@
 package org.mulgara.client.jrdf.test;
 
 // Java packages
-import java.io.*;
 import java.net.*;
-import java.util.*;
 
 // JRDF
 import org.jrdf.graph.*;
@@ -101,11 +99,11 @@
   public Graph newGraph() throws Exception {
 
     //reset graph
-    this.dropModel(this.modelURI);
-    this.createModel(this.modelURI);
+    this.dropModel(modelURI);
+    this.createModel(modelURI);
 
     //create and return graph
-    return AbstractGraphFactory.createGraph(this.serverURI, this.modelURI);
+    return AbstractGraphFactory.createGraph(serverURI, modelURI);
   }
 
   /**
@@ -161,7 +159,7 @@
     assertEquals(1, graph.getNumberOfTriples());
 
     // Create iterator.
-    ClosableIterator iter = graph.find(null, null, null);
+    graph.find(null, null, null);
 
     // Close the graph.
     graph.close();
@@ -181,7 +179,7 @@
     assertEquals(1, graph.getNumberOfTriples());
 
     // Create iterator.
-    ClosableIterator iter = graph.find(null, null, null);
+    ClosableIterator<Triple> iter = graph.find(null, null, null);
     iter.close();
 
     // Close the graph.
@@ -201,31 +199,26 @@
     try {
 
       String hostname = InetAddress.getLocalHost().getCanonicalHostName();
-      this.serverURI = new URI("rmi", hostname, "/" + SERVER_NAME, null);
-      this.modelURI = new URI("rmi", hostname, "/" + SERVER_NAME, MODEL_NAME);
+      serverURI = new URI("rmi", hostname, "/" + SERVER_NAME, null);
+      modelURI = new URI("rmi", hostname, "/" + SERVER_NAME, MODEL_NAME);
 
       //get session
-      SessionFactory sessionFactory = SessionFactoryFinder.newSessionFactory(
-          this.serverURI, true);
+      SessionFactory sessionFactory = SessionFactoryFinder.newSessionFactory(serverURI, true);
       this.session = (JRDFSession) sessionFactory.newJRDFSession();
 
       //initialize model
-      this.createModel(this.modelURI);
+      this.createModel(modelURI);
 
       //let superclass set up too
       super.setUp();
-    }
-    catch (Exception exception) {
+    } catch (Exception exception) {
 
       //try to tear down first
       try {
 
         tearDown();
-      }
-      finally {
-
-        throw exception;
-      }
+      } catch (Throwable t) { }
+      throw exception;
     }
   }
 
@@ -236,7 +229,7 @@
    */
   public void tearDown() throws Exception {
 
-    this.dropModel(this.modelURI);
+    this.dropModel(modelURI);
 
     //allow super to close down too
     super.tearDown();

Modified: trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/ClientGraphUtil.java
===================================================================
--- trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/ClientGraphUtil.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/ClientGraphUtil.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -58,9 +58,6 @@
 
 package org.mulgara.client.jrdf.util;
 
-//Java 2 packages
-import java.util.Iterator;
-
 //local packages
 import org.jrdf.graph.*;
 import org.jrdf.util.ClosableIterator;
@@ -97,7 +94,7 @@
    * @return ClosableIterator
    * @throws GraphException
    */
-  public static ClosableIterator orderBySubject(ClosableIterator iterator) throws
+  public static ClosableIterator<Triple> orderBySubject(ClosableIterator<Triple> iterator) throws
       GraphException {
 
     //validate
@@ -107,11 +104,11 @@
     }
 
     //Get all Triples
-    VirtualClosableIteratorProxy allTriplesProxy = new
-        DefaultClosableIteratorProxy(iterator);
+    VirtualClosableIteratorProxy<Triple> allTriplesProxy = new
+        DefaultClosableIteratorProxy<Triple>(iterator);
 
     //Order the Triples
-    return new OrderedClosableIteratorProxy(allTriplesProxy,
+    return new OrderedClosableIteratorProxy<Triple>(allTriplesProxy,
                                             new SubjectNodeComparator());
   }
 
@@ -123,7 +120,7 @@
    * @return ClosableIterator
    * @throws GraphException
    */
-  public static ClosableIterator orderBySPO(ClosableIterator iterator) throws
+  public static ClosableIterator<Triple> orderBySPO(ClosableIterator<Triple> iterator) throws
       GraphException {
 
     //validate
@@ -133,11 +130,11 @@
     }
 
     //wrap the iterator
-    VirtualClosableIteratorProxy allTriplesProxy = new
-        DefaultClosableIteratorProxy(iterator);
+    VirtualClosableIteratorProxy<Triple> allTriplesProxy = new
+        DefaultClosableIteratorProxy<Triple>(iterator);
 
     //Order the Triples
-    return new OrderedClosableIteratorProxy(allTriplesProxy, new SPOComparator());
+    return new OrderedClosableIteratorProxy<Triple>(allTriplesProxy, new SPOComparator());
   }
 
   /**
@@ -148,7 +145,7 @@
    * @return ClosableIterator
    * @throws GraphException
    */
-  public static ClosableIterator getUniqueSubjects(Graph graph) throws
+  public static ClosableIterator<Triple> getUniqueSubjects(Graph graph) throws
       GraphException {
 
     //validate
@@ -158,10 +155,10 @@
     }
 
     //Get all Triples
-    ClosableIterator allTriples = graph.find(null, null, null);
+    ClosableIterator<Triple> allTriples = graph.find(null, null, null);
 
     //Order the Triples
-    OrderedClosableIteratorProxy orderedTriples = (OrderedClosableIteratorProxy)
+    OrderedClosableIteratorProxy<Triple> orderedTriples = (OrderedClosableIteratorProxy<Triple>)
         orderBySubject(allTriples);
 
     //return an UniqueSubjectIterator.

Modified: trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/ClosableArrayIteratorProxy.java
===================================================================
--- trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/ClosableArrayIteratorProxy.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/ClosableArrayIteratorProxy.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -39,6 +39,7 @@
 
 /**
  * A VirtualClosableIteratorProxy implementation that uses an array of Triples.
+ * This might have been a general implementation but was specifically created for Triples.
  *
  * @created 2004-07-29
  *
@@ -58,20 +59,21 @@
  * @licence <a href="{@docRoot}/../../LICENCE">Mozilla Public License v1.1</a>
  */
 public class ClosableArrayIteratorProxy
-    implements VirtualClosableIteratorProxy {
+    implements VirtualClosableIteratorProxy<Triple> {
 
   /**
    * Logger. This is named after the class.
    */
+  @SuppressWarnings("unused")
   private final static Logger log = Logger.getLogger(
       ClosableArrayIteratorProxy.class.
       getName());
 
   /** Data Source used by the iterator */
-  private List data = null;
+  private List<Triple> data = null;
 
   /** does all the work */
-  private Iterator iterator = null;
+  private Iterator<Triple> iterator = null;
 
   /** Indicates the Iterator has been closed */
   private boolean closed = false;
@@ -92,7 +94,7 @@
     }
 
     //copy data to List
-    this.data = new ArrayList();
+    this.data = new ArrayList<Triple>();
     final int length = dataSource.length;
     for (int i = 0; i < length; i++) {
 
@@ -144,7 +146,7 @@
    * @return the next element in the iteration.
    * @exception NoSuchElementException iteration has no more elements.
    */
-  public Object next() {
+  public Triple next() {
 
     //ensure the iterator is not closed
     if (this.closed) {

Modified: trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/DefaultClosableIteratorProxy.java
===================================================================
--- trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/DefaultClosableIteratorProxy.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/DefaultClosableIteratorProxy.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -35,7 +35,6 @@
 
 // JRDF
 import org.mulgara.client.jrdf.*;
-import org.jrdf.graph.*;
 import org.jrdf.util.*;
 
 /**
@@ -58,23 +57,23 @@
  *
  * @licence <a href="{@docRoot}/../../LICENCE">Mozilla Public License v1.1</a>
  */
-public class DefaultClosableIteratorProxy
-    implements VirtualClosableIteratorProxy {
+public class DefaultClosableIteratorProxy<T>
+    implements VirtualClosableIteratorProxy<T> {
 
   /**
    * Logger. This is named after the class.
    */
-  private final static Logger log = Logger.getLogger(
-      DefaultClosableIteratorProxy.class.getName());
+  @SuppressWarnings("unused")
+  private final static Logger log = Logger.getLogger(DefaultClosableIteratorProxy.class.getName());
 
   /** does all the work */
-  private ClosableIterator iterator = null;
+  private ClosableIterator<T> iterator = null;
 
   /**
    * Default Constructor
    *
    */
-  public DefaultClosableIteratorProxy(ClosableIterator iterator) {
+  public DefaultClosableIteratorProxy(ClosableIterator<T> iterator) {
 
     super();
 
@@ -111,7 +110,7 @@
    * @return the next element in the iteration.
    * @exception NoSuchElementException iteration has no more elements.
    */
-  public Object next() {
+  public T next() {
 
     return this.iterator.next();
   }

Modified: trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/NodeComparator.java
===================================================================
--- trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/NodeComparator.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/NodeComparator.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -65,14 +65,13 @@
  *
  * @licence <a href="{@docRoot}/../../LICENCE">Mozilla Public License v1.1</a>
  */
-public class NodeComparator
-    implements Comparator {
+public class NodeComparator<T> implements Comparator<T> {
 
   /**
    * Logger. This is named after the class.
    */
-  private final static Logger log = Logger.getLogger(NodeComparator.class.
-      getName());
+  @SuppressWarnings("unused")
+  private final static Logger log = Logger.getLogger(NodeComparator.class.getName());
 
   /** Value of a URIReference when compared to another type */
   private static final int URI_NODE_VALUE = 3;
@@ -96,14 +95,12 @@
     //validate
     if (! (node1 instanceof Node)) {
 
-      throw new IllegalArgumentException("'node1' is not a JRDF Node. node1: " +
-                                         node1);
+      throw new IllegalArgumentException("'node1' is not a JRDF Node. node1: " + node1);
     }
 
     if (! (node2 instanceof Node)) {
 
-      throw new IllegalArgumentException("'node2' is not a JRDF Node. node2: " +
-                                         node1);
+      throw new IllegalArgumentException("'node2' is not a JRDF Node. node2: " + node1);
     }
 
     return this.compare( (Node) node1, (Node) node2);
@@ -129,23 +126,19 @@
     if (nodeValue1 != nodeValue2) {
 
       compare = nodeValue1 - nodeValue2;
-    }
-    else {
+    } else {
 
       //determine types and call appropriate method
       if (nodeValue1 == URI_NODE_VALUE) {
 
         compare = this.compare( (URIReference) node1, (URIReference) node2);
-      }
-      else if (nodeValue1 == LITERAL_NODE_VALUE) {
+      } else if (nodeValue1 == LITERAL_NODE_VALUE) {
 
         compare = this.compare( (Literal) node1, (Literal) node2);
-      }
-      else if (nodeValue1 == BLANK_NODE_VALUE) {
+      } else if (nodeValue1 == BLANK_NODE_VALUE) {
 
         compare = this.compare( (BlankNode) node1, (BlankNode) node2);
-      }
-      else {
+      } else {
 
         //should not get here...
         throw new IllegalStateException("Invalid Node type: " +

Modified: trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/ObjectNodeComparator.java
===================================================================
--- trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/ObjectNodeComparator.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/ObjectNodeComparator.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -53,49 +53,22 @@
  *
  * @licence <a href="{@docRoot}/../../LICENCE">Mozilla Public License v1.1</a>
  */
-public class ObjectNodeComparator
-    extends NodeComparator {
+public class ObjectNodeComparator extends NodeComparator<Triple> {
 
   /**
    * Logger. This is named after the class.
    */
-  private final static Logger log = Logger.getLogger(ObjectNodeComparator.class.
-      getName());
+  @SuppressWarnings("unused")
+  private final static Logger log = Logger.getLogger(ObjectNodeComparator.class.getName());
 
   /**
-   * Compares the ObjectNode for two JRDF Triples. ObjectNode must be an
-   * URIReference, Literal or BlankNode.
-   *
-   * @param triple1 Object
-   * @param triple2 Object
-   * @return int
-   */
-  public int compare(Object triple1, Object triple2) {
-
-    //validate
-    if (! (triple1 instanceof Triple)) {
-
-      throw new IllegalArgumentException("'triple1' is not a JRDF Triple. " +
-                                         "triple1: " + triple1);
-    }
-
-    if (! (triple2 instanceof Triple)) {
-
-      throw new IllegalArgumentException("'triple2' is not a JRDF Triple. " +
-                                         "triple2: " + triple2);
-    }
-
-    return this.compare((Triple) triple1, (Triple) triple2);
-  }
-
-  /**
    * Compares two JRDF Triples.
    *
    * @param triple1 Triple
    * @param triple2 Triple
    * @return int
    */
-  private int compare (Triple triple1, Triple triple2) {
+  public int compare (Triple triple1, Triple triple2) {
 
     //validate
     if (triple1 == null) {

Modified: trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/OrderedClosableIteratorProxy.java
===================================================================
--- trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/OrderedClosableIteratorProxy.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/OrderedClosableIteratorProxy.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -35,7 +35,6 @@
 
 // JRDF
 import org.mulgara.client.jrdf.*;
-import org.jrdf.graph.*;
 
 /**
  * A Non-scalable ClosableIteratorProxy that orders the contents of another
@@ -58,23 +57,24 @@
  *
  * @licence <a href="{@docRoot}/../../LICENCE">Mozilla Public License v1.1</a>
  */
-public class OrderedClosableIteratorProxy
-    implements VirtualClosableIteratorProxy {
+public class OrderedClosableIteratorProxy<T>
+    implements VirtualClosableIteratorProxy<T> {
 
   /**
    * Logger. This is named after the class.
    */
+  @SuppressWarnings("unused")
   private final static Logger log = Logger.getLogger(
       OrderedClosableIteratorProxy.class.getName());
 
   /** Data Source used by the iterator */
-  private List data = null;
+  private List<T> data = null;
 
   /** Does all the work */
-  private Iterator iterator = null;
+  private Iterator<T> iterator = null;
 
   /** Needs to be closed when this Iterator is closed */
-  private VirtualClosableIteratorProxy proxy = null;
+  private VirtualClosableIteratorProxy<T> proxy = null;
 
   /** Indicates that the Iterator has already been closed */
   private boolean closed = false;
@@ -85,8 +85,8 @@
    * @param proxy VirtualClosableIteratorProxy
    * @param comparator Comparator
    */
-  public OrderedClosableIteratorProxy(VirtualClosableIteratorProxy proxy,
-                                      Comparator comparator) {
+  public OrderedClosableIteratorProxy(VirtualClosableIteratorProxy<T> proxy,
+                                      Comparator<T> comparator) {
 
     super();
 
@@ -100,7 +100,7 @@
     this.proxy = proxy;
 
     //copy data to List
-    this.data = new ArrayList();
+    this.data = new ArrayList<T>();
     while (this.proxy.hasNext()) {
 
       this.data.add(this.proxy.next());
@@ -155,7 +155,7 @@
    * @return the next element in the iteration.
    * @exception NoSuchElementException iteration has no more elements.
    */
-  public Object next() {
+  public T next() {
 
     //ensure the iterator is not closed
     if (this.closed) {

Modified: trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/PredicateNodeComparator.java
===================================================================
--- trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/PredicateNodeComparator.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/PredicateNodeComparator.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -53,49 +53,22 @@
  *
  * @licence <a href="{@docRoot}/../../LICENCE">Mozilla Public License v1.1</a>
  */
-public class PredicateNodeComparator
-    extends NodeComparator {
+public class PredicateNodeComparator extends NodeComparator<Triple> {
 
   /**
    * Logger. This is named after the class.
    */
-  private final static Logger log = Logger.getLogger(PredicateNodeComparator.class.
-      getName());
+  @SuppressWarnings("unused")
+  private final static Logger log = Logger.getLogger(PredicateNodeComparator.class.getName());
 
   /**
-   * Compares the PredicateNode for two JRDF Triples. PredicateNode must be an
-   * URIReference, Literal or BlankNode.
-   *
-   * @param triple1 Object
-   * @param triple2 Object
-   * @return int
-   */
-  public int compare(Object triple1, Object triple2) {
-
-    //validate
-    if (! (triple1 instanceof Triple)) {
-
-      throw new IllegalArgumentException("'triple1' is not a JRDF Triple. " +
-                                         "triple1: " + triple1);
-    }
-
-    if (! (triple2 instanceof Triple)) {
-
-      throw new IllegalArgumentException("'triple2' is not a JRDF Triple. " +
-                                         "triple2: " + triple2);
-    }
-
-    return this.compare((Triple) triple1, (Triple) triple2);
-  }
-
-  /**
    * Compares two JRDF Triples.
    *
    * @param triple1 Triple
    * @param triple2 Triple
    * @return int
    */
-  private int compare (Triple triple1, Triple triple2) {
+  public int compare (Triple triple1, Triple triple2) {
 
     //validate
     if (triple1 == null) {

Modified: trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/SPOComparator.java
===================================================================
--- trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/SPOComparator.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/SPOComparator.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -62,48 +62,22 @@
  *
  * @licence <a href="{@docRoot}/../../LICENCE">Mozilla Public License v1.1</a>
  */
-public class SPOComparator
-    extends NodeComparator {
+public class SPOComparator extends NodeComparator<Triple> {
 
   /**
    * Logger. This is named after the class.
    */
-  private final static Logger log = Logger.getLogger(SPOComparator.class.
-      getName());
+  @SuppressWarnings("unused")
+  private final static Logger log = Logger.getLogger(SPOComparator.class.getName());
 
   /**
-   * Compares the Nodes for two JRDF Triples.
-   *
-   * @param triple1 Object
-   * @param triple2 Object
-   * @return int
-   */
-  public int compare(Object triple1, Object triple2) {
-
-    //validate
-    if (! (triple1 instanceof Triple)) {
-
-      throw new IllegalArgumentException("'triple1' is not a JRDF Triple. " +
-                                         "triple1: " + triple1);
-    }
-
-    if (! (triple2 instanceof Triple)) {
-
-      throw new IllegalArgumentException("'triple2' is not a JRDF Triple. " +
-                                         "triple2: " + triple2);
-    }
-
-    return this.compare((Triple) triple1, (Triple) triple2);
-  }
-
-  /**
    * Compares two JRDF Triples.
    *
    * @param triple1 Triple
    * @param triple2 Triple
    * @return int
    */
-  private int compare (Triple triple1, Triple triple2) {
+  public int compare (Triple triple1, Triple triple2) {
 
     //validate
     if (triple1 == null) {

Modified: trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/SubjectNodeComparator.java
===================================================================
--- trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/SubjectNodeComparator.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/SubjectNodeComparator.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -53,49 +53,22 @@
  *
  * @licence <a href="{@docRoot}/../../LICENCE">Mozilla Public License v1.1</a>
  */
-public class SubjectNodeComparator
-    extends NodeComparator {
+public class SubjectNodeComparator extends NodeComparator<Triple> {
 
   /**
    * Logger. This is named after the class.
    */
-  private final static Logger log = Logger.getLogger(SubjectNodeComparator.class.
-      getName());
+  @SuppressWarnings("unused")
+  private final static Logger log = Logger.getLogger(SubjectNodeComparator.class.getName());
 
   /**
-   * Compares the SubjectNode for two JRDF Triples. SubjectNode must be an
-   * URIReference, Literal or BlankNode.
-   *
-   * @param triple1 Object
-   * @param triple2 Object
-   * @return int
-   */
-  public int compare(Object triple1, Object triple2) {
-
-    //validate
-    if (! (triple1 instanceof Triple)) {
-
-      throw new IllegalArgumentException("'triple1' is not a JRDF Triple. " +
-                                         "triple1: " + triple1);
-    }
-
-    if (! (triple2 instanceof Triple)) {
-
-      throw new IllegalArgumentException("'triple2' is not a JRDF Triple. " +
-                                         "triple2: " + triple2);
-    }
-
-    return this.compare((Triple) triple1, (Triple) triple2);
-  }
-
-  /**
    * Compares two JRDF Triples.
    *
    * @param triple1 Triple
    * @param triple2 Triple
    * @return int
    */
-  private int compare (Triple triple1, Triple triple2) {
+  public int compare (Triple triple1, Triple triple2) {
 
     //validate
     if (triple1 == null) {

Modified: trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/UniqueSubjectIterator.java
===================================================================
--- trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/UniqueSubjectIterator.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/util/UniqueSubjectIterator.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -58,16 +58,16 @@
  * @licence <a href="{@docRoot}/../../LICENCE">Mozilla Public License v1.1</a>
  */
 public class UniqueSubjectIterator
-    implements VirtualClosableIteratorProxy {
+    implements VirtualClosableIteratorProxy<Triple> {
 
   /**
    * Logger. This is named after the class.
    */
-  private final static Logger log = Logger.getLogger(
-      UniqueSubjectIterator.class.getName());
+  @SuppressWarnings("unused")
+  private final static Logger log = Logger.getLogger(UniqueSubjectIterator.class.getName());
 
   /** Needs to be closed when this Iterator is closed */
-  private OrderedClosableIteratorProxy proxy = null;
+  private OrderedClosableIteratorProxy<Triple> proxy = null;
 
   /** Pre-cached "next" triple with an Unique SubjectNode */
   private Triple nextTriple = null;
@@ -87,7 +87,7 @@
    * @param proxy OrderedClosableIteratorProxy
    * @throws GraphException
    */
-  public UniqueSubjectIterator(OrderedClosableIteratorProxy proxy) throws
+  public UniqueSubjectIterator(OrderedClosableIteratorProxy<Triple> proxy) throws
       GraphException {
 
     super();
@@ -95,8 +95,7 @@
     //validate
     if (proxy == null) {
 
-      throw new IllegalArgumentException("OrderedClosableIteratorProxy cannot "+
-                                         "be null.");
+      throw new IllegalArgumentException("OrderedClosableIteratorProxy cannot be null.");
     }
 
     //initialize members
@@ -107,11 +106,9 @@
     try {
 
       this.getNext();
-    }
-    catch (GraphElementFactoryException factoryException) {
+    } catch (GraphElementFactoryException factoryException) {
 
-      throw new GraphException("Could not retrieve first Triple.",
-                               factoryException);
+      throw new GraphException("Could not retrieve first Triple.", factoryException);
     }
   }
 
@@ -156,7 +153,7 @@
    * @exception NoSuchElementException iteration has no more elements.
    * @exception JRDFClientException Cannot retrieve next Triple.
    */
-  public Object next() {
+  public Triple next() {
 
     //ensure the iterator is not closed
     if (this.closed) {
@@ -171,11 +168,9 @@
     try {
 
       this.getNext();
-    }
-    catch (GraphElementFactoryException factoryException) {
+    } catch (GraphElementFactoryException factoryException) {
 
-      throw new JRDFClientException("Could not get next value.",
-                                    factoryException);
+      throw new JRDFClientException("Could not get next value.", factoryException);
     }
 
     return triple;
@@ -220,8 +215,7 @@
 
         //create new Triple
         this.currentSubject = proxyTriple.getSubject();
-        this.nextTriple = this.builder.createTriple(this.currentSubject, null,
-                                                    null);
+        this.nextTriple = this.builder.createTriple(this.currentSubject, null, null);
 
         //stop looking
         break;

Modified: trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/writer/MemoryXMLWriter.java
===================================================================
--- trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/writer/MemoryXMLWriter.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/client-jrdf/java/org/mulgara/client/jrdf/writer/MemoryXMLWriter.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -72,8 +72,8 @@
   /**
    * Logger. This is named after the class.
    */
-  private final static Logger log = Logger.getLogger(MemoryXMLWriter.class.
-      getName());
+  @SuppressWarnings("unused")
+  private final static Logger log = Logger.getLogger(MemoryXMLWriter.class.getName());
 
   /** Prefix used to abbreviate RDF Namespace */
   private static final String RDF_PREFIX = "rdf";
@@ -84,8 +84,11 @@
   /** Convenience reference to the new line character */
   private static final String NEWLINE = System.getProperty("line.separator");
 
-  /** Map used to replace commonly used namespaces with prefixes */
-  protected Map namespaces = null;
+  /**
+   * Map used to replace commonly used namespaces with prefixes. Values can be
+   * either Strings or URIs, so a general type is used.
+   */
+  protected Map<String,Object> namespaces = null;
 
   /**
    * Default Constructor
@@ -233,12 +236,12 @@
       out.print(NEWLINE + "<!DOCTYPE rdf:RDF [");
 
       //print namespaces
-      Set keys = this.namespaces.keySet();
+      Set<String> keys = this.namespaces.keySet();
 
       if (keys != null) {
 
-        Iterator keyIter = keys.iterator();
-        Object currentKey = null;
+        Iterator<String> keyIter = keys.iterator();
+        String currentKey = null;
         Object currentValue = null;
 
         while (keyIter.hasNext()) {
@@ -250,16 +253,14 @@
               && (currentValue != null)) {
 
             //write as: <!ENTITY ns 'http://example.org/abc#'>
-            out.print(NEWLINE + "  <!ENTITY " + currentKey + " '" +
-                      currentValue + "'>");
+            out.print(NEWLINE + "  <!ENTITY " + currentKey + " '" + currentValue + "'>");
           }
         }
       }
 
       //close the opening tag (add a space for readability)
       out.print("]>" + NEWLINE + NEWLINE);
-    }
-    else {
+    } else {
 
       throw new IllegalArgumentException("Cannot write to null Writer.");
     }
@@ -280,12 +281,12 @@
       out.print("<rdf:RDF ");
 
       //print namespaces
-      Set keys = this.namespaces.keySet();
+      Set<String> keys = this.namespaces.keySet();
 
       if (keys != null) {
 
-        Iterator keyIter = keys.iterator();
-        Object currentKey = null;
+        Iterator<String> keyIter = keys.iterator();
+        String currentKey = null;
         Object currentValue = null;
 
         while (keyIter.hasNext()) {
@@ -297,16 +298,14 @@
               && (currentValue != null)) {
 
            //use entities: xmlns:ns="&ns;"
-            out.print(NEWLINE + "  xmlns:" + currentKey + "=\"&" + currentKey +
-                      ";\"");
+            out.print(NEWLINE + "  xmlns:" + currentKey + "=\"&" + currentKey + ";\"");
           }
         }
       }
 
       //close the opening tag (add a space for readability)
       out.print(">" + NEWLINE + NEWLINE);
-    }
-    else {
+    } else {
 
       throw new IllegalArgumentException("Cannot write to null Writer.");
     }
@@ -328,13 +327,13 @@
         && (graph != null)) {
 
       //iterator used to access subjects
-      ClosableIterator subjectIter = ClientGraphUtil.getUniqueSubjects(graph);
+      ClosableIterator<Triple> subjectIter = ClientGraphUtil.getUniqueSubjects(graph);
 
       //write every (unique) subject
       if (subjectIter != null) {
 
         //current Triple
-        Object triple = null;
+        Triple triple = null;
 
         //current Subject
         SubjectNode subject = null;
@@ -344,10 +343,9 @@
           //get the next triple
           triple = subjectIter.next();
 
-          if ( (triple != null)
-              && (triple instanceof Triple)) {
+          if (triple != null) {
 
-            subject = ( (Triple) triple).getSubject();
+            subject = triple.getSubject();
 
             this.writeSubject(graph, subject, out);
           }
@@ -356,8 +354,7 @@
         //close the Iterator
         subjectIter.close();
       }
-    }
-    else {
+    } else {
 
       //message for exception to be thrown
       String message = "Could not write Graph. Invlaid arguments provided. ";
@@ -389,8 +386,7 @@
 
       //print closing RDF tag
       out.println("</" + RDF_PREFIX + ":RDF>");
-    }
-    else {
+    } else {
 
       throw new IllegalArgumentException("Cannot write to null Writer.");
     }
@@ -428,8 +424,7 @@
    * @param writer PrintWriter
    * @throws GraphException
    */
-  protected void writeOpeningTag(Graph graph, SubjectNode subject,
-                                 PrintWriter writer) throws
+  protected void writeOpeningTag(Graph graph, SubjectNode subject, PrintWriter writer) throws
       GraphException {
 
     if (writer != null) {
@@ -441,18 +436,15 @@
         if (subject instanceof BlankNode) {
 
           this.writeOpeningTag(graph, (BlankNode) subject, writer);
-        }
-        else {
+        } else {
 
           writer.print("  <" + RDF_PREFIX + ":Description " + RDF_PREFIX +
                        ":about=\"" + this.getNodeString(subject) + "\">" +
                        NEWLINE);
         }
-      }
-      else {
+      } else {
 
-        throw new IllegalArgumentException("Could not write opening tag for " +
-                                           "subject. Subject Node is null.");
+        throw new IllegalArgumentException("Could not write opening tag for subject. Subject Node is null.");
       }
     }
   }
@@ -475,8 +467,7 @@
 
       //opening tag
       writer.print("  <" + this.getURI(subjectType) + ">" + NEWLINE);
-    }
-    else {
+    } else {
 
       //opening tag
       writer.print("  <" + RDF_PREFIX + ":Description>" + NEWLINE);
@@ -491,16 +482,14 @@
    * @param writer PrintWriter
    * @throws GraphException
    */
-  protected void writeClosingTag(Graph graph, SubjectNode subject,
-                                 PrintWriter writer) throws
+  protected void writeClosingTag(Graph graph, SubjectNode subject, PrintWriter writer) throws
       GraphException {
 
     //Blank Nodes are written differently
     if (subject instanceof BlankNode) {
 
       this.writeClosingTag(graph, (BlankNode) subject, writer);
-    }
-    else {
+    } else {
 
       //closing tag
       writer.print("  </" + RDF_PREFIX + ":Description>" + NEWLINE);
@@ -515,8 +504,7 @@
    * @param writer PrintWriter
    * @throws GraphException
    */
-  protected void writeClosingTag(Graph graph, BlankNode subject,
-                                 PrintWriter writer) throws
+  protected void writeClosingTag(Graph graph, BlankNode subject, PrintWriter writer) throws
       GraphException {
 
     ObjectNode subjectType = this.getSubjectType(graph, subject);
@@ -526,8 +514,7 @@
 
       //closing tag
       writer.print("  </" + this.getURI(subjectType) + ">" + NEWLINE);
-    }
-    else {
+    } else {
 
       //closing tag
       writer.print("  </" + RDF_PREFIX + ":Description>" + NEWLINE);
@@ -550,10 +537,10 @@
                                   PrintWriter writer) throws GraphException {
 
     //get all statements for the Subject
-    ClosableIterator subjectIter = graph.find(subject, null, null);
+    ClosableIterator<Triple> subjectIter = graph.find(subject, null, null);
 
     //order the statements by predicate, then object (for sequences).
-    ClosableIterator tripleIter = ClientGraphUtil.orderBySPO(subjectIter);
+    ClosableIterator<Triple> tripleIter = ClientGraphUtil.orderBySPO(subjectIter);
 
     if (tripleIter != null) {
 
@@ -609,8 +596,7 @@
     if (object instanceof Literal) {
 
       this.writeStatement(graph, subject, predicate, (Literal) object, writer);
-    }
-    else if (object instanceof BlankNode) {
+    } else if (object instanceof BlankNode) {
 
       //write as:  <predicateURI> *blank node as subject* </predicateURI>
       writer.println("    <" + this.getURI(predicate) + ">");
@@ -619,8 +605,7 @@
       this.writeSubject(graph, (BlankNode) object, writer);
 
       writer.println("    </" + this.getURI(predicate) + ">");
-    }
-    else if (subject instanceof BlankNode) {
+    } else if (subject instanceof BlankNode) {
 
       //predicatNode representing RDF Type
       PredicateNode rdfTypeNode = null;
@@ -628,11 +613,9 @@
       try {
 
         rdfTypeNode = graph.getElementFactory().createResource(RDF.TYPE);
-      }
-      catch (GraphElementFactoryException factoryException) {
+      } catch (GraphElementFactoryException factoryException) {
 
-        throw new GraphException("Could not create RDF Type node.",
-                                 factoryException);
+        throw new GraphException("Could not create RDF Type node.", factoryException);
       }
 
       //do not write the RDF Type element
@@ -640,16 +623,13 @@
 
         //write as:  <predicateURI rdf:resource="resourceURI"/>
         writer.println("    <" + this.getURI(predicate) + " " + RDF_PREFIX +
-                       ":resource=\"" + this.getNodeString(object) + "\"" +
-                       "/>");
+                       ":resource=\"" + this.getNodeString(object) + "\"/>");
       }
-    }
-    else {
+    } else {
 
       //write as:  <predicateURI rdf:resource="resourceURI"/>
       writer.println("    <" + this.getURI(predicate) + " " + RDF_PREFIX +
-                     ":resource=\"" + this.getNodeString(object) + "\"" +
-                     "/>");
+                     ":resource=\"" + this.getNodeString(object) + "\"/>");
     }
   }
 
@@ -686,8 +666,7 @@
                      ":datatype=\"" + datatype + "\">" +
                      buffer.toString() +
                      "</" + this.getURI(predicate) + ">");
-    }
-    else {
+    } else {
 
       //write as:  <predicateURI>"Literal value"</predicateURI>
       writer.println("    <" + this.getURI(predicate) + ">" +
@@ -704,8 +683,7 @@
    * @throws GraphException
    * @return ObjectNode
    */
-  protected ObjectNode getSubjectType(Graph graph, SubjectNode subject) throws
-      GraphException {
+  protected ObjectNode getSubjectType(Graph graph, SubjectNode subject) throws GraphException {
 
     //value to be returned
     ObjectNode type = null;
@@ -722,15 +700,13 @@
     try {
 
       rdfType = graph.getElementFactory().createResource(RDF.TYPE);
-    }
-    catch (GraphElementFactoryException factoryException) {
+    } catch (GraphElementFactoryException factoryException) {
 
-      throw new GraphException("Could not create RDF Type node.",
-                               factoryException);
+      throw new GraphException("Could not create RDF Type node.", factoryException);
     }
 
     //get the Subject's RDF type
-    ClosableIterator typeIter = graph.find(subject, rdfType, null);
+    ClosableIterator<Triple> typeIter = graph.find(subject, rdfType, null);
 
     if (typeIter != null) {
 
@@ -741,13 +717,10 @@
 
         typeTriple = typeIter.next();
 
-        if ( (typeTriple != null)
-            && (typeTriple instanceof Triple)) {
+        if (typeTriple != null) {
 
           type = ( (Triple) typeTriple).getObject();
-        }
-        else {
-
+        } else {
           throw new GraphException("Could not find RDF type for Subject: " +
                                    subject + " . Invalid Triple returned.");
         }
@@ -780,26 +753,22 @@
         if (node instanceof URIReference) {
 
           uri = ( (URIReference) node).getURI().toString();
-        }
-        else if (node instanceof BlankNode) {
 
+        } else if (node instanceof BlankNode) {
+
           uri = new URI("#" + ( (BlankNode) node).toString()).toString();
-        }
-        else {
 
+        } else {
+
           uri = node.toString();
         }
-      }
-      catch (URISyntaxException uriException) {
+      } catch (URISyntaxException uriException) {
 
-        throw new GraphException("Could not get URI for Node: " + node +
-                                 ".", uriException);
+        throw new GraphException("Could not get URI for Node: " + node + ".", uriException);
       }
-    }
-    else {
+    } else {
 
-      throw new GraphException("Could not get URI for Node: " + node +
-                               ". Node is null.");
+      throw new GraphException("Could not get URI for Node: " + node + ". Node is null.");
     }
 
     //return the URI with any namespaces replaced with prefixes
@@ -827,29 +796,26 @@
         if (node instanceof URIReference) {
 
           object = ( (URIReference) node).getURI().toString();
-        }
-        else if (node instanceof BlankNode) {
 
+        } else if (node instanceof BlankNode) {
+
           object = new URI("#" + ( (BlankNode) node).toString()).toString();
-        }
-        else if (node instanceof Literal) {
 
+        } else if (node instanceof Literal) {
+
           object = ((Literal) node).getLexicalForm();
+
         } else {
 
           object = node.toString();
         }
-      }
-      catch (URISyntaxException uriException) {
+      } catch (URISyntaxException uriException) {
 
-        throw new GraphException("Could not get String for ObjectNode: " + node +
-                                 ".", uriException);
+        throw new GraphException("Could not get String for ObjectNode: " + node + ".", uriException);
       }
-    }
-    else {
+    } else {
 
-      throw new GraphException("Could not get String for ObjectNode: " + node +
-                               ". ObjectNode is null.");
+      throw new GraphException("Could not get String for ObjectNode: " + node + ". ObjectNode is null.");
     }
 
     return object;
@@ -870,10 +836,10 @@
     if (original != null) {
 
       //replace any URI occurances with namespace prefixes
-      Set keys = this.namespaces.keySet();
+      Set<String> keys = this.namespaces.keySet();
 
-      Iterator keyIter = keys.iterator();
-      Object currentKey = null;
+      Iterator<String> keyIter = keys.iterator();
+      String currentKey = null;
       Object currentValue = null;
 
       if (keyIter != null) {
@@ -884,7 +850,7 @@
           currentValue = this.namespaces.get(currentKey);
 
           //validate the Objects
-          if ( (currentKey != null)
+          if ((currentKey != null)
               && (currentValue != null)) {
 
 //            int index = uriAsString.indexOf(currentValue.toString());
@@ -892,12 +858,11 @@
             if (original.equals(currentValue.toString())) {
 
               uri = "&" + currentKey + ";";
-            }
-            else if (original.startsWith(currentValue.toString())) {
 
+            } else if (original.startsWith(currentValue.toString())) {
+
               //replace with namespace
-              uri = original.replaceAll(currentValue.toString(),
-                                        currentKey + ":");
+              uri = original.replaceAll(currentValue.toString(), currentKey + ":");
             }
           }
         }
@@ -940,7 +905,7 @@
   protected void populateNamespaces(Graph graph) throws GraphException {
 
     //default namespaces
-    this.namespaces = new HashMap();
+    this.namespaces = new HashMap<String,Object>();
     this.namespaces.put(RDF_PREFIX, RDF.BASE_URI);
     this.namespaces.put(RDFS_PREFIX, RDFS.BASE_URI);
     this.namespaces.put("owl", "http://www.w3.org/2002/07/owl#");
@@ -953,7 +918,7 @@
     }
 
     //get all statements
-    ClosableIterator tripleIter = graph.find(null, null, null);
+    ClosableIterator<Triple> tripleIter = graph.find(null, null, null);
 
     if (tripleIter != null) {
 
@@ -1030,8 +995,7 @@
         //remove everything after the last '/'
         int index = uriString.lastIndexOf('/');
         newURI = uriString.substring(0, index) + "/";
-      }
-      else {
+      } else {
 
         //'#' comes after last '/' (remove entire fragment)
         newURI = uriString.replaceAll(uri.getFragment(), "");

Modified: trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/Handler.java
===================================================================
--- trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/Handler.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/Handler.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -27,17 +27,10 @@
 
 package org.mulgara.content.mbox.parser;
 
-import java.text.*;
 import java.io.*;
 import java.net.*;
-import java.util.*;
 
-import javax.mail.*;
-import javax.mail.internet.*;
-import javax.mail.search.*;
 
-import junit.framework.*;
-
 /**
  * This is the handler for the mbox protocol.  This will treat the address
  * given as a file URL.

Modified: trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/MBoxParserUnitTest.java
===================================================================
--- trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/MBoxParserUnitTest.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/MBoxParserUnitTest.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -29,7 +29,6 @@
 
 // Java 2 standard packages
 import java.io.*;
-import java.text.*;
 import java.util.*;
 import java.net.*;
 import java.lang.reflect.Constructor;
@@ -46,11 +45,8 @@
 // Local packages
 import org.mulgara.content.Content;
 import org.mulgara.content.NotModifiedException;
-import org.mulgara.content.mbox.parser.*;
-import org.mulgara.content.mbox.parser.exception.*;
 import org.mulgara.content.mbox.parser.model.*;
 import org.mulgara.content.mbox.parser.model.exception.*;
-import org.mulgara.util.TempDir;
 
 /**
  * Unit testing for the mime message to RDF parser.
@@ -2017,21 +2013,17 @@
     if (log.isDebugEnabled()) {
 
       // Container for our iterator
-      ClosableIterator attachmentIterator = null;
+      ClosableIterator<Triple> attachmentIterator = null;
 
       try {
 
         // Get all "filename" triples
-        attachmentIterator = graph.find(null,
-                                        (PredicateNode) vocab.get(EmailVocab.
-            SIZE),
-                                        null);
+        attachmentIterator = graph.find(null, (PredicateNode)vocab.get(EmailVocab.SIZE), null);
 
       } catch (GraphException graphException) {
 
         // Log the error
-        log.debug("Unable to find attachment filenames in mbox graph.",
-                  graphException);
+        log.debug("Unable to find attachment filenames in mbox graph.", graphException);
 
         // Since this debugging we don't really need to do anything
         // with the exception
@@ -2039,8 +2031,7 @@
 
       while (attachmentIterator.hasNext()) {
 
-        log.debug("Invalid Attachment filename: " +
-                  (Triple) attachmentIterator.next());
+        log.debug("Invalid Attachment filename: " + (Triple)attachmentIterator.next());
       }
     }
 
@@ -2063,8 +2054,7 @@
 
       // Check that we have the correct attachment filename value
       assertTrue("Could not find attachment 'attachment.atmt' as expected.",
-                 graph.find(null,
-                            (PredicateNode) vocab.get(EmailVocab.FILE_NAME),
+                 graph.find(null, (PredicateNode)vocab.get(EmailVocab.FILE_NAME),
                             objectNode).hasNext());
     } catch (GraphException graphException) {
 
@@ -2077,21 +2067,17 @@
     }
 
     // Container for our iterator
-    ClosableIterator attachmentIterator = null;
+    ClosableIterator<Triple> attachmentIterator = null;
 
     try {
 
       // Get all "filename" triples
-      attachmentIterator = graph.find(null,
-                                      (PredicateNode) vocab.get(EmailVocab.
-          FILE_NAME),
-                                      null);
+      attachmentIterator = graph.find(null, (PredicateNode)vocab.get(EmailVocab.FILE_NAME), null);
 
     } catch (GraphException graphException) {
 
       // Log the error
-      log.debug("Unable to find attachment filenames in mbox graph.",
-                graphException);
+      log.debug("Unable to find attachment filenames in mbox graph.", graphException);
 
       // Fail the test
       fail("Unable to find attachment filenames in mbox graph.");
@@ -2122,8 +2108,8 @@
   public Content createContentObject(File contentFile) {
 
     // Containers for construction of content object
-    Class contentClass = null;
-    Constructor constructor = null;
+    Class<?> contentClass = null;
+    Constructor<?> constructor = null;
     Content content = null;
 
     try {

Modified: trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/MboxFolder.java
===================================================================
--- trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/MboxFolder.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/MboxFolder.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -27,14 +27,7 @@
 
 package org.mulgara.content.mbox.parser;
 
-import java.io.*;
-import java.net.*;
-import java.text.*;
-import java.util.*;
-import java.util.zip.*;
 import javax.mail.*;
-import javax.mail.event.*;
-import javax.mail.internet.*;
 import javax.mail.search.*;
 
 /*

Modified: trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/MboxFolderImpl.java
===================================================================
--- trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/MboxFolderImpl.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/MboxFolderImpl.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -31,7 +31,6 @@
 import java.net.*;
 import java.text.*;
 import java.util.*;
-import java.util.zip.*;
 import javax.mail.*;
 import javax.mail.event.*;
 import javax.mail.internet.*;
@@ -105,7 +104,7 @@
   public Flags permanentFlags = null;
 
   private MboxReader reader;
-  private ArrayList messages;
+  private ArrayList<Message> messages;
   private boolean open = false;
   private boolean readOnly = true;
   private int type = HOLDS_MESSAGES;
@@ -284,24 +283,19 @@
    * This deletes all the messages marked as deleted.
    * @exception MessagingException if a messaging error occurred
    */
-  public synchronized Message[] expunge()
-    throws MessagingException
-  {
-    ArrayList ve = new ArrayList();
-    if (open && this.messages !=null)
-    {
-      ArrayList vm = new ArrayList();
-      Iterator iter = messages.iterator();
-      while(iter.hasNext())
-      {
-        Message message = (Message) iter.next();
+  public synchronized Message[] expunge() throws MessagingException {
+
+    ArrayList<Message> ve = new ArrayList<Message>();
+    if (open && this.messages != null) {
+      ArrayList<Message> vm = new ArrayList<Message>();
+      Iterator<Message> iter = messages.iterator();
+      while (iter.hasNext()) {
+
+        Message message = iter.next();
         Flags flags = message.getFlags();
-        if (flags.contains(Flags.Flag.DELETED))
-        {
+        if (flags.contains(Flags.Flag.DELETED)) {
           ve.add(message);
-        }
-        else
-        {
+        } else {
           vm.add(message);
         }
       }
@@ -309,8 +303,7 @@
     }
 
     Message[] expunged = collectionToMessageArray(ve);
-    if (expunged.length > 0)
-    {
+    if (expunged.length > 0) {
       notifyMessageRemovedListeners(true, expunged);
     }
     return expunged;
@@ -319,18 +312,15 @@
   /**
    * Indicates whether this folder is open.
    */
-  public boolean isOpen()
-  {
+  public boolean isOpen() {
     return open;
   }
 
   /**
    * Returns the permanent flags for this folder.
    */
-  public Flags getPermanentFlags()
-  {
-    if (permanentFlags == null)
-    {
+  public Flags getPermanentFlags() {
+    if (permanentFlags == null) {
       Flags tmpFlags = new Flags();
       tmpFlags.add(Flags.Flag.DELETED);
       tmpFlags.add(Flags.Flag.SEEN);
@@ -347,8 +337,7 @@
    * @return the number of messages in this folder.
    * @exception MessagingException if a messaging error occurred
    */
-  public int getMessageCount() throws MessagingException
-  {
+  public int getMessageCount() throws MessagingException {
     return reader.getMessageCount();
   }
 
@@ -357,8 +346,7 @@
    *
    * @exception MessagingException if a messaging error occurred
    */
-  public Message getMessage(int msgnum) throws MessagingException
-  {
+  public Message getMessage(int msgnum) throws MessagingException {
 
     if (logger.isDebugEnabled()) {
 
@@ -366,13 +354,10 @@
     }
 
     // Use a reader to get that getFile().
-    try
-    {
+    try {
 
-      return reader.getMessage(msgnum-1);
-    }
-    catch (ArrayIndexOutOfBoundsException e)
-    {
+      return reader.getMessage(msgnum - 1);
+    } catch (ArrayIndexOutOfBoundsException e) {
       throw new MessagingException("No such message", e);
     }
   }
@@ -382,8 +367,7 @@
    *
    * @exception MessagingException if a messaging error occurred
    */
-  public synchronized Message[] getMessages()	throws MessagingException
-  {
+  public synchronized Message[] getMessages()	throws MessagingException {
     this.synchronizeMessages();
     this.saveMessages();
 
@@ -393,24 +377,18 @@
   /**
    * Appends messages to this folder.
    */
-  public synchronized void appendMessages(Message[] messages)
-      throws MessagingException
-  {
+  public synchronized void appendMessages(Message[] messages) throws MessagingException {
     synchronizeMessages();
 
-    ArrayList added = new ArrayList();
-    for (int i=0; i<messages.length; i++)
-    {
-      if (messages[i] instanceof MimeMessage)
-      {
-        MboxMessage message = new MboxMessage(this,
-          (MimeMessage) messages[i], i);
+    ArrayList<Message> added = new ArrayList<Message>();
+    for (int i = 0; i < messages.length; i++) {
+      if (messages[i] instanceof MimeMessage) {
+        MboxMessage message = new MboxMessage(this, (MimeMessage)messages[i], i);
         added.add(message);
         this.messages.add(message);
       }
     }
-    if (added.size()>0)
-    {
+    if (added.size() > 0) {
       Message[] n = this.collectionToMessageArray(added);
       notifyMessageAddedListeners(n);
     }
@@ -424,9 +402,7 @@
    *
    * @exception MessagingException ignore
    */
-  public void fetch(Message amessage[], FetchProfile fetchprofile)
-    throws MessagingException
-  {
+  public void fetch(Message amessage[], FetchProfile fetchprofile) throws MessagingException {
   }
 
   /**
@@ -434,9 +410,7 @@
    *
    * @return the parent folder.
    */
-  public Folder getParent()
-    throws MessagingException
-  {
+  public Folder getParent() throws MessagingException {
     return store.getFolder(getFile().getParent());
   }
 
@@ -445,11 +419,8 @@
    *
    * @return the subfolders of this folder.
    */
-  public Folder[] list()
-    throws MessagingException
-  {
-    if (type!=HOLDS_FOLDERS)
-    {
+  public Folder[] list() throws MessagingException {
+    if (type != HOLDS_FOLDERS) {
       throw new MessagingException("This folder can't contain subfolders");
     }
 
@@ -457,15 +428,11 @@
     {
       String[] files = getFile().list();
       Folder[] folders = new Folder[files.length];
-      for (int i=0; i<files.length; i++)
-      {
-        folders[i] = store.getFolder(getFile().getAbsolutePath()+
-          getFile().separator+files[i]);
+      for (int i = 0; i < files.length; i++) {
+        folders[i] = store.getFolder(getFile().getAbsolutePath() + File.separator + files[i]);
       }
       return folders;
-    }
-    catch (SecurityException e)
-    {
+    } catch (SecurityException e) {
       throw new MessagingException("Access denied", e);
     }
   }
@@ -473,23 +440,19 @@
   /**
    * Returns the subfolders of this folder matching the specified pattern.
    */
-  public Folder[] list(String pattern)
-    throws MessagingException
-  {
-    if (type!=HOLDS_FOLDERS)
-    {
+  public Folder[] list(String pattern) throws MessagingException {
+    if (type!=HOLDS_FOLDERS) {
       throw new MessagingException("This folder can't contain subfolders");
     }
-    try
-    {
+    try {
       String[] files = getFile().list(new MboxFilenameFilter(pattern));
       Folder[] folders = new Folder[files.length];
-      for (int i=0; i<files.length; i++)
-        folders[i] = store.getFolder(getFile().getAbsolutePath()+getFile().separator+files[i]);
+      for (int i=0; i<files.length; i++) {
+        folders[i] = store.getFolder(getFile().getAbsolutePath() + File.separator + files[i]);
+      }
       return folders;
-    }
-    catch (SecurityException e)
-    {
+
+    } catch (SecurityException e) {
       throw new MessagingException("Access denied", e);
     }
   }
@@ -499,48 +462,39 @@
    *
    * @return the separator character.
    */
-  public char getSeparator()
-    throws MessagingException
-  {
-    return getFile().separatorChar;
+  public char getSeparator() throws MessagingException {
+    return File.separatorChar;
   }
 
   /**
    * Creates this folder in the store.
    */
-  public boolean create(int type)
-    throws MessagingException
-  {
-    if (getFile().exists())
-      throw new MessagingException("Folder already exists");
-    switch (type)
-    {
-      case HOLDS_FOLDERS:
-      try
-      {
+  public boolean create(int type) throws MessagingException {
+
+    if (getFile().exists()) throw new MessagingException("Folder already exists");
+    switch (type) {
+
+    case HOLDS_FOLDERS:
+      try {
         getFile().mkdirs();
         this.type = type;
         notifyFolderListeners(FolderEvent.CREATED);
         return true;
-      }
-      catch (SecurityException e)
-      {
+
+      } catch (SecurityException e) {
         throw new MessagingException("Access denied", e);
       }
       case HOLDS_MESSAGES:
-      try
-      {
+      try {
         // save the changes
-        synchronized (this)
-        {
-          if (messages==null) messages = new ArrayList();
+        synchronized (this) {
+          if (messages == null) messages = new ArrayList<Message>();
           OutputStream os = new BufferedOutputStream(getOutputStream());
           Message[] m = this.collectionToMessageArray(this.messages);
-          for (int i=0; i<m.length; i++)
-          {
+          for (int i = 0; i < m.length; i++) {
             Address[] f = m[i].getFrom();
-            String top = "From "+((f.length>0) ? f[0].toString() : "-")+" "+
-                df.format(m[i].getSentDate())+"\n";
+            String top = "From " + ((f.length>0) ? f[0].toString() : "-") + " "+
+                df.format(m[i].getSentDate()) + "\n";
             os.write(top.getBytes());
             m[i].writeTo(os);
           }
@@ -549,13 +503,9 @@
         this.type = type;
         notifyFolderListeners(FolderEvent.CREATED);
         return true;
-      }
-      catch (IOException e)
-      {
+      } catch (IOException e) {
         throw new MessagingException("I/O error writing mailbox", e);
-      }
-      catch (SecurityException e)
-      {
+      } catch (SecurityException e) {
         throw new MessagingException("Access denied", e);
       }
     }
@@ -565,45 +515,32 @@
   /**
    * Deletes this folder.
    */
-  public boolean delete(boolean recurse)
-    throws MessagingException
-  {
-    if (recurse)
-    {
-      try
-      {
-        if (type==HOLDS_FOLDERS)
-        {
+  public boolean delete(boolean recurse) throws MessagingException {
+    if (recurse) {
+      try {
+        if (type == HOLDS_FOLDERS) {
           Folder[] folders = list();
-          for (int i=0; i<folders.length; i++)
-            if (!folders[i].delete(recurse))
-              return false;
+          for (int i = 0; i < folders.length; i++) {
+            if (!folders[i].delete(recurse)) return false;
+          }
         }
         getFile().delete();
         notifyFolderListeners(FolderEvent.DELETED);
         return true;
-      }
-      catch (SecurityException e)
-      {
+      } catch (SecurityException e) {
         throw new MessagingException("Access denied", e);
       }
-    }
-    else
-    {
-      try
-      {
-        if (type==HOLDS_FOLDERS)
-        {
+    } else {
+      try {
+        if (type == HOLDS_FOLDERS) {
           Folder[] folders = list();
-          if (folders.length>0)
-            return false;
+          if (folders.length > 0) return false;
         }
         getFile().delete();
         notifyFolderListeners(FolderEvent.DELETED);
         return true;
-      }
-      catch (SecurityException e)
-      {
+
+      } catch (SecurityException e) {
         throw new MessagingException("Access denied", e);
       }
     }
@@ -612,24 +549,18 @@
   /**
    * Mbox folders cannot be created, deleted, or renamed.
    */
-  public boolean renameTo(Folder folder)
-    throws MessagingException
-  {
-    try
-    {
+  public boolean renameTo(Folder folder) throws MessagingException {
+    try {
       String filename = folder.getFullName();
-      if (filename!=null)
-      {
+      if (filename != null) {
         getFile().renameTo(new File(filename));
         ((MboxStoreImpl)store).folders.clear();
         notifyFolderListeners(FolderEvent.RENAMED);
         return true;
-      }
-      else
+      } else {
         throw new MessagingException("Illegal filename: null");
-    }
-    catch (SecurityException e)
-    {
+      }
+    } catch (SecurityException e) {
       throw new MessagingException("Access denied", e);
     }
   }
@@ -637,57 +568,45 @@
   /**
    * Mbox folders cannot contain subfolders.
    */
-  public Folder getFolder(String filename)
-    throws MessagingException
-  {
-    return store.getFolder(getFile().getAbsolutePath() + getFile().separator +
-      filename);
+  public Folder getFolder(String filename) throws MessagingException {
+    return store.getFolder(getFile().getAbsolutePath() + File.separator + filename);
   }
 
-  public Message[] search(SearchTerm term) throws MessagingException
-  {
+  public Message[] search(SearchTerm term) throws MessagingException {
     return super.search(term);
   }
 
-  public Message[] search(SearchTerm term, Message[] messages)
-    throws MessagingException
-  {
+  public Message[] search(SearchTerm term, Message[] messages) throws MessagingException {
     return super.search(term, messages);
   }
 
   /**
    * Locks this mailbox.  Not implementented yet.
    */
-  public synchronized boolean acquireLock()
-  {
+  public synchronized boolean acquireLock() {
     return true;
   }
 
   /**
    * Unlocks this mailbox.  Not implemented yet.
    */
-  public synchronized boolean releaseLock()
-  {
+  public synchronized boolean releaseLock() {
     return true;
   }
 
   // Reads messages from the disk getFile().
-  private ArrayList readMessages() throws MessagingException
-  {
-    synchronized (this)
-    {
-      return reader.getMessagesAsArrayList(0, reader.getMessageCount()-1);
+  private ArrayList<Message> readMessages() throws MessagingException {
+    synchronized (this) {
+      return reader.getMessagesAsArrayList(0, reader.getMessageCount() - 1);
     }
   }
 
   /**
    * Synchronizes the source file with the current message list.
    */
-  private void synchronizeMessages() throws MessagingException
-  {
+  private void synchronizeMessages() throws MessagingException {
     // Modified this to speed it up.
-    if (getFile().lastModified() != fileLastModified)
-    {
+    if (getFile().lastModified() != fileLastModified) {
       fileLastModified = getFile().lastModified();
 
       // we should never be in the position where we've removed messages
@@ -702,38 +621,31 @@
       // FIXME:  these are both really, really, really bad assumptions.
       //
 
-      ArrayList tmpMessages = readMessages();
+      ArrayList<Message> tmpMessages = readMessages();
 
-      if (messages == null)
-      {
+      if (messages == null) {
         messages = tmpMessages;
-      }
-      else
-      {
-        ArrayList messagesAdded = new ArrayList();
-        ArrayList finalMessages = new ArrayList();
+      } else {
+        ArrayList<Message> messagesAdded = new ArrayList<Message>();
+        ArrayList<Message> finalMessages = new ArrayList<Message>();
         int j = -1;
         MboxMessage tmpMessage;
 
-        for (int index =0; index < tmpMessages.size(); index++)
-        {
+        for (int index =0; index < tmpMessages.size(); index++) {
+
           tmpMessage = (MboxMessage) tmpMessages.get(index);
           String tmpUniqueId = tmpMessage.getMessageID();
           String uniqueId = null;
 
           while (uniqueId != tmpUniqueId &&
-                 (!tmpUniqueId.equals(uniqueId)) && j < messages.size() - 1)
-          {
+                 (!tmpUniqueId.equals(uniqueId)) && j < messages.size() - 1) {
             uniqueId = ((MboxMessage)messages.get(++j)).getMessageID();
           }
 
-          if (j < messages.size() -1)
-          {
+          if (j < messages.size() -1) {
             finalMessages.add(messages.get(j));
-          }
-          else
-          {
-            Object newMessage = tmpMessages.get(index);
+          } else {
+            Message newMessage = tmpMessages.get(index);
             finalMessages.add(newMessage);
             messagesAdded.add(newMessage);
           }
@@ -741,8 +653,7 @@
         }
 
         messages = finalMessages;
-        if (messagesAdded.size() > 0)
-        {
+        if (messagesAdded.size() > 0) {
           Message[] n = collectionToMessageArray(messagesAdded);
           notifyMessageAddedListeners(n);
           saveMessages();
@@ -752,58 +663,47 @@
   }
 
   // Saves messages to the disk getFile().
-  private void saveMessages() throws MessagingException
-  {
-    if (readOnly)
-    {
+  private void saveMessages() throws MessagingException {
+    if (readOnly) {
       return;
     }
-    synchronized (this)
-    {
-      if (messages!=null)
-      {
-        try
-        {
+    synchronized (this) {
+      if (messages != null) {
+        try {
           Message[] m = this.collectionToMessageArray(messages);
 
           // make sure content has been retrieved for all messages
-          for (int i=0; i<m.length; i++)
-          {
-            if (m[i] instanceof MboxMessage)
-            {
-              ((MboxMessage) m[i]).retrieveContent();
+          for (int i = 0; i < m.length; i++) {
+            if (m[i] instanceof MboxMessage) {
+              ((MboxMessage)m[i]).retrieveContent();
             }
           }
 
           OutputStream os = new BufferedOutputStream(getOutputStream());
           MboxOutputStream mos = new MboxOutputStream(os);
-          for (int i=0; i<m.length; i++)
-          {
+
+          for (int i = 0; i < m.length; i++) {
             Address[] f = m[i].getFrom();
             String from = "-";
-            if (f.length>0)
-            {
-              if (f[0] instanceof InternetAddress)
+            if (f.length > 0) {
+              if (f[0] instanceof InternetAddress) {
                 from = ((InternetAddress)f[0]).getAddress();
-              else
+              } else {
                 from = f[0].toString();
+              }
             }
             Date date = m[i].getSentDate();
-            if (date==null)
-              date = m[i].getReceivedDate();
-            if (date==null)
-              date = new Date();
+            if (date == null) date = m[i].getReceivedDate();
+            if (date == null) date = new Date();
 
-            String top = "From "+from+ " "+df.format(date)+"\n";
+            String top = "From " + from + " " + df.format(date) + "\n";
             os.write(top.getBytes());
             m[i].writeTo(mos);
             mos.flush();
           }
           os.close();
           fileLastModified = getFile().lastModified();
-        }
-        catch (IOException e)
-        {
+        } catch (IOException e) {
           throw new MessagingException("I/O error writing mailbox", e);
         }
       }
@@ -814,65 +714,49 @@
    * Creates an output stream that possibly will compress
    * whatever is sent to it, based on the current filename.
    */
-  private OutputStream getOutputStream()
-    throws IOException
-  {
+  private OutputStream getOutputStream() throws IOException {
     return reader.getOutputStream();
   }
 
   /**
-   * Creates an input stream that possibly will decompress the
-   * file contents.
-   */
-  private InputStream getInputStream()
-    throws IOException
-  {
-    return reader.getInputStream();
-  }
-
-  /**
    * A helper method that converts the collection to a message array.
    *
    * @param source the source collection (array list usually), which is assumed
    *               to contain Message objects.
    * @return the list of messages contained in the collection.
    */
-  private Message[] collectionToMessageArray(Collection source)
-  {
-    return (Message[]) source.toArray(new Message[] {});
+  private Message[] collectionToMessageArray(Collection<Message> source) {
+    return source.toArray(new Message[source.size()]);
   }
 
   /**
    * A filter to return a list of files based on patters on * and %.
    */
-  class MboxFilenameFilter implements FilenameFilter
-  {
+  class MboxFilenameFilter implements FilenameFilter {
 
      String pattern;
      int asteriskIndex, percentIndex;
 
-     MboxFilenameFilter(String pattern)
-     {
+     MboxFilenameFilter(String pattern) {
        this.pattern = pattern;
        asteriskIndex = pattern.indexOf('*');
        percentIndex = pattern.indexOf('%');
      }
 
-     public boolean accept(File directory, String name)
-     {
-       if (asteriskIndex>-1)
-       {
+     public boolean accept(File directory, String name) {
+
+       if (asteriskIndex > -1) {
          String start = pattern.substring(0, asteriskIndex),
-            end = pattern.substring(asteriskIndex+1, pattern.length());
+                end = pattern.substring(asteriskIndex+1, pattern.length());
          return (name.startsWith(start) && name.endsWith(end));
-       }
-       else if (percentIndex>-1)
-       {
+
+       } else if (percentIndex > -1) {
+
          String start = pattern.substring(0, percentIndex),
-            end = pattern.substring(percentIndex+1, pattern.length());
-         return (directory.equals(getFile()) && name.startsWith(start) &&
-            name.endsWith(end));
+                end = pattern.substring(percentIndex+1, pattern.length());
+         return (directory.equals(getFile()) && name.startsWith(start) && name.endsWith(end));
        }
+
        return name.equals(pattern);
      }
   }

Modified: trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/MboxMessage.java
===================================================================
--- trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/MboxMessage.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/MboxMessage.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -142,7 +142,7 @@
       if (in instanceof ByteArrayInputStream) {
         fetchsize = in.available();
         bytes = new byte[fetchsize];
-        int len = in.read(bytes, 0, fetchsize);
+        in.read(bytes, 0, fetchsize);
       } else {
         ByteArrayOutputStream out = new ByteArrayOutputStream();
         bytes = new byte[fetchsize];
@@ -219,12 +219,14 @@
    * This is called by the MboxFolder when appending.
    * It creates a copy of the specified message for the new folder.
    */
+  @SuppressWarnings("unchecked")
   protected MboxMessage(MboxFolderImpl folder, MimeMessage message, int msgnum) throws
       MessagingException {
     super(folder, msgnum);
     headers = new InternetHeaders();
-    for (Enumeration enumeration = message.getAllHeaderLines(); enumeration.hasMoreElements(); )
+    for (Enumeration<String> enumeration = (Enumeration<String>)message.getAllHeaderLines(); enumeration.hasMoreElements();) {
       headers.addHeaderLine((String) enumeration.nextElement());
+    }
     try {
       InputStream in = message.getInputStream();
       ByteArrayOutputStream out = new ByteArrayOutputStream();
@@ -295,8 +297,6 @@
     if (contentOffset < 0 || content != null) {
       return;
     }
-    int fetchsize = MboxStoreImpl.fetchsize;
-    byte bytes[];
     RandomAccessFile file =
         new RandomAccessFile(((MboxFolderImpl) folder).getFile(), "r");
     file.seek(contentOffset);
@@ -397,7 +397,7 @@
   protected Address[] parseAddress(String in, String defhost) throws
       AddressException {
     //Vector v = new Vector();
-    ArrayList v = new ArrayList();
+    ArrayList<Address> v = new ArrayList<Address>();
     for (StringTokenizer st = new StringTokenizer(in, ","); st.hasMoreTokens(); ) {
       String s = st.nextToken().trim();
       try {

Modified: trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/MboxReader.java
===================================================================
--- trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/MboxReader.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/MboxReader.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -28,14 +28,9 @@
 package org.mulgara.content.mbox.parser;
 
 import java.io.*;
-import java.net.*;
-import java.text.*;
 import java.util.*;
 import java.util.zip.*;
 import javax.mail.*;
-import javax.mail.event.*;
-import javax.mail.internet.*;
-import javax.mail.search.*;
 
 // logging
 import org.apache.log4j.*;
@@ -102,8 +97,6 @@
  */
 public class MboxReader {
 
-  private static final DateFormat df = new
-      SimpleDateFormat("EEE MMM d H:m:s yyyy");
   private static final String INDEX_EXTENSION = ".idx";
 
   /** Log category */
@@ -111,9 +104,7 @@
 
   private File file;
   private File indexFile;
-  private WeakHashMap messages;
   private boolean indexExists = false;
-  private long fileLastModified = 0;
   private boolean readOnly = false;
   private MboxFolderImpl myFolder;
   private int messageCount = -1;
@@ -205,11 +196,18 @@
    * Sets the readOnly flag of this mail box to true.  No writes will be
    * allowed.
    */
-  public void isReadOnly() {
+  public void setReadOnly() {
     readOnly = true;
   }
 
   /**
+   * Tests if the flag of this mail box is set to read-only.
+   */
+  public boolean isReadOnly() {
+    return readOnly;
+  }
+
+  /**
    * Does a simple check to see whether the file is of mbox format.
    *
    * @return if the file is of mbox format.
@@ -248,7 +246,7 @@
       if (!isIndexed()) {
         int noMails = 0;
         long offset = 0;
-        ArrayList offsets = new ArrayList();
+        ArrayList<Long> offsets = new ArrayList<Long>();
 
         // Read in the offsets to a array list.
         try {
@@ -380,10 +378,8 @@
             index.writeInt(noMails);
 
             // Write offsets
-            Iterator iter = offsets.iterator();
-            while (iter.hasNext()) {
-              offset = ((Long) iter.next()).longValue();
-              index.writeLong(offset);
+            for (Long offsetl: offsets) {
+              index.writeLong(offsetl);
             }
             index.close();
             index = null;
@@ -473,7 +469,7 @@
    * @return the specified messages in a given range.
    * @exception MessagingException if a messaging error occurred.
    */
-  public ArrayList getMessagesAsArrayList(int msgStart, int msgEnd) throws
+  public ArrayList<Message> getMessagesAsArrayList(int msgStart, int msgEnd) throws
       MessagingException {
     //Test to see if it above the max number of messages
     long numberOfMessages = getMessageCount();
@@ -484,7 +480,7 @@
           "of messages.");
     }
 
-    ArrayList messages = new ArrayList();
+    ArrayList<Message> messages = new ArrayList<Message>();
 //    messages.add(getMessage(0, 1));
 
     // Read the location of the message using the index
@@ -603,7 +599,7 @@
    *               to contain Message objects.
    * @return the list of messages contained in the collection.
    */
-  private Message[] collectionToMessageArray(Collection source) {
-    return (Message[]) source.toArray(new Message[] {});
+  private Message[] collectionToMessageArray(Collection<Message> source) {
+    return source.toArray(new Message[source.size()]);
   }
 }

Modified: trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/MboxStore.java
===================================================================
--- trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/MboxStore.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/MboxStore.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -27,11 +27,7 @@
 
 package org.mulgara.content.mbox.parser;
 
-import java.io.*;
-import java.net.*;
 import javax.mail.*;
-import javax.mail.event.*;
-import java.util.Hashtable;
 
 /*
  * MboxStore.java

Modified: trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/MboxStoreImpl.java
===================================================================
--- trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/MboxStoreImpl.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/MboxStoreImpl.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -28,9 +28,7 @@
 package org.mulgara.content.mbox.parser;
 
 import java.io.*;
-import java.net.*;
 import javax.mail.*;
-import javax.mail.event.*;
 import java.util.Hashtable;
 
 import org.apache.log4j.*;
@@ -86,21 +84,19 @@
  *
  * @licence <A href="{@docRoot}/../../LICENCE_LGPL.txt">Licence description</A>
  */
-public class MboxStoreImpl extends Store implements MboxStore
-{
+public class MboxStoreImpl extends Store implements MboxStore {
 
   /** Logger */
   private static Logger log = Logger.getLogger(MboxStoreImpl.class);
 
   static boolean attemptFallback = false;
-  Hashtable folders = new Hashtable();
+  Hashtable<String,Folder> folders = new Hashtable<String,Folder>();
   public static int fetchsize = 1024;
 
   /**
    * Constructor.
    */
-  public MboxStoreImpl(Session session, URLName urlname)
-  {
+  public MboxStoreImpl(Session session, URLName urlname) {
     super(session, urlname);
 /**    String ccs = session.getProperty("mail.mbox.fetchsize");
     if (ccs!=null)
@@ -123,19 +119,14 @@
    * There isn't a protocol to implement, so this method just returns.
    */
   protected boolean protocolConnect(String host, int port, String username, String password)
-    throws MessagingException
-  {
+        throws MessagingException {
     return true;
   }
 
-  public Folder getDefaultFolder()
-    throws MessagingException
-  {
-    if (url!=null)
-    {
+  public Folder getDefaultFolder() throws MessagingException {
+    if (url != null) {
       String file = url.getFile();
-      if (file!=null && file.length()>0)
-      {
+      if (file != null && file.length() > 0) {
         String name = File.separator+file.replace('/', File.separatorChar);
 
         if (log.isDebugEnabled()) {
@@ -148,11 +139,10 @@
         return folder;
       }
     }
-    try
-    {
+
+    try {
       String defaultDir = session.getProperty("mail.mbox.userhome");
-      if (defaultDir == null)
-      {
+      if (defaultDir == null) {
         defaultDir = System.getProperty("user.home");
       }
 
@@ -162,44 +152,37 @@
       }
 
       return new MboxDefaultFolder(this, defaultDir);
-    }
-    catch (SecurityException e)
-    {
+    } catch (SecurityException e) {
       throw new MessagingException("Access denied", e);
     }
   }
 
-  public Folder getFolder(String filename)
-    throws MessagingException
-  {
-    Folder folder = (Folder)folders.get(filename);
-    if (folder==null)
-    {
-      if ("inbox".equals(filename.toLowerCase()))
-      {
+  public Folder getFolder(String filename) throws MessagingException {
+
+    Folder folder = folders.get(filename);
+    if (folder==null) {
+
+      if ("inbox".equals(filename.toLowerCase())) {
+
         // First try the session property mail.mbox.inbox.
         String m = session.getProperty("mail.mbox.inbox");
-        if (m!=null && new File(m).exists())
-        {
+        
+        if (m!=null && new File(m).exists()) {
           filename = m;
-        }
-        else if (attemptFallback)
-        { // If that fails try some common (UNIX) locations.
-          try
-          {
+
+        } else if (attemptFallback) { // If that fails try some common (UNIX) locations.
+
+          try {
             m = File.separator+"var"+File.separator+"spool"+File.separator+"mail"+File.separator+System.getProperty("user.name");
-            if (new File(m).exists())
+            if (new File(m).exists()) {
               filename = m;
-            else
-            {
+            } else {
               m = System.getProperty("user.home")+File.separator+"mbox";
               if (new File(m).exists())
                 filename = m;
             }
+          } catch (SecurityException e) { // not allowed to read system properties
           }
-          catch (SecurityException e)
-          { // not allowed to read system properties
-          }
         }
       }
       folders.put(filename, folder = new MboxFolderImpl(this, filename));
@@ -207,21 +190,16 @@
     return folder;
   }
 
-  public Folder getFolder(URLName urlname)
-    throws MessagingException
-  {
-    String fileName = File.separator+urlname.getFile().replace('/',
-        File.separatorChar);
+  public Folder getFolder(URLName urlname) throws MessagingException {
+    String fileName = File.separator+urlname.getFile().replace('/', File.separatorChar);
     return getFolder(fileName);
   }
 
-  public Session getSession()
-  {
+  public Session getSession() {
     return session;
   }
 
-  public static int getFetchSize()
-  {
+  public static int getFetchSize() {
     return fetchsize;
   }
 }

Modified: trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/MboxUrlConnection.java
===================================================================
--- trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/MboxUrlConnection.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/MboxUrlConnection.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -27,17 +27,9 @@
 
 package org.mulgara.content.mbox.parser;
 
-import java.text.*;
 import java.io.*;
 import java.net.*;
-import java.util.*;
 
-import javax.mail.*;
-import javax.mail.internet.*;
-import javax.mail.search.*;
-
-import junit.framework.*;
-
 /**
  * Handler for the mbox URL.  Basically, uses a file to implement the handler.
  *

Modified: trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/MimeMessageToPart.java
===================================================================
--- trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/MimeMessageToPart.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/MimeMessageToPart.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -35,17 +35,13 @@
 import java.net.MalformedURLException;
 
 // Java enterprise packages
-import javax.activation.*;
 import javax.mail.*;
 import javax.mail.internet.*;
 
 // Third party packages
 import org.apache.log4j.*;
-import org.exolab.castor.xml.MarshalException;
-import org.exolab.castor.xml.ValidationException;
 
 // Other quoll tool packages
-import org.mulgara.content.mbox.parser.config.*;
 import org.mulgara.content.mbox.parser.exception.*;
 import org.mulgara.util.TempDir;
 
@@ -78,9 +74,6 @@
   /** The category to log to. */
   private static Logger logger = Logger.getLogger(MimeMessageToPart.class);
 
-  /** Output directory */
-  private File outDirectory;
-
   /** The mbox splitter's session */
   private Session session;
 
@@ -592,39 +585,6 @@
   }
 
   /**
-   * Strip the path info from a filename.
-   *
-   * @param fileName The filename which may contain path info.
-   * @return The filename without path info.
-   */
-  private static String stripPath(String fileName) {
-
-    // Windows path
-    if (fileName.indexOf("\\") != -1) {
-      if (fileName.endsWith("\\")) {
-        fileName = fileName.substring(0, fileName.length() - 1);
-      }
-      int lastForwardslash = fileName.lastIndexOf('\\');
-      if (lastForwardslash != -1) {
-        fileName = fileName.substring(lastForwardslash + 1, fileName.length());
-      }
-    }
-
-    // Unix path
-    if (fileName.indexOf("/") != -1) {
-      if (fileName.endsWith("/")) {
-        fileName = fileName.substring(0, fileName.length() - 1);
-      }
-      int lastBackslash = fileName.lastIndexOf('/');
-      if (lastBackslash != -1) {
-        fileName = fileName.substring(lastBackslash + 1, fileName.length());
-      }
-    }
-
-    return fileName;
-  }
-
-  /**
    * Caches the content of the input stream locally and returns the URI pointer
    * to the cached file.
    *

Modified: trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/QuollEmailAddress.java
===================================================================
--- trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/QuollEmailAddress.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/QuollEmailAddress.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -55,6 +55,7 @@
 public class QuollEmailAddress implements Serializable {
 
   /** The logger to log to */
+  @SuppressWarnings("unused")
   private static final Logger log =
       Logger.getLogger(QuollEmailAddress.class.getName());
 

Modified: trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/config/ConfigManager.java
===================================================================
--- trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/config/ConfigManager.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/config/ConfigManager.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -52,7 +52,11 @@
  */
 public class ConfigManager extends Exception {
 
+  /** Generated serialization ID. */
+  private static final long serialVersionUID = 7047786961447856712L;
+
   /** The category to log to. */
+  @SuppressWarnings("unused")
   private static Logger logger = Logger.getLogger(ConfigManager.class);
 
   /** Singleton instance */

Modified: trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/exception/IOProcessingException.java
===================================================================
--- trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/exception/IOProcessingException.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/exception/IOProcessingException.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -27,8 +27,6 @@
 
 package org.mulgara.content.mbox.parser.exception;
 
-import java.io.*;
-
 /**
  * When header parsing or mime message splitting has failed.
  *
@@ -51,6 +49,9 @@
  */
 public class IOProcessingException extends Exception {
 
+  /** Generated serialization ID. */
+  private static final long serialVersionUID = -5553656691811868619L;
+
   /**
    * Constructor.
    *

Modified: trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/exception/MBoxProcessException.java
===================================================================
--- trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/exception/MBoxProcessException.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/exception/MBoxProcessException.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -27,8 +27,6 @@
 
 package org.mulgara.content.mbox.parser.exception;
 
-import java.io.*;
-
 /**
  * An exception that should be used when an MBox encouters a problem while it is
  * processing.
@@ -52,6 +50,9 @@
  */
 public class MBoxProcessException extends Exception {
 
+  /** Generated serialization ID. */
+  private static final long serialVersionUID = 7650567189127489929L;
+
   /**
    * Constructor.
    *

Modified: trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/exception/MimeMessageProcessException.java
===================================================================
--- trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/exception/MimeMessageProcessException.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/exception/MimeMessageProcessException.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -27,8 +27,6 @@
 
 package org.mulgara.content.mbox.parser.exception;
 
-import java.io.*;
-
 /**
  * An exception that should be used when an Mime Message encouters a problem
  * while it is processing.
@@ -52,6 +50,9 @@
  */
 public class MimeMessageProcessException extends Exception {
 
+  /** Generated serialization ID. */
+  private static final long serialVersionUID = 1455449127505095249L;
+
   /**
    * Constructor.
    *

Modified: trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/exception/MimeProcessingException.java
===================================================================
--- trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/exception/MimeProcessingException.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/exception/MimeProcessingException.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -27,8 +27,6 @@
 
 package org.mulgara.content.mbox.parser.exception;
 
-import java.io.*;
-
 /**
  * When header parsing or mime message splitting has failed.
  *
@@ -51,6 +49,9 @@
  */
 public class MimeProcessingException extends Exception {
 
+  /** Generated serialization ID. */
+  private static final long serialVersionUID = 9086445488321381612L;
+
   /**
    * Constructor.
    *

Modified: trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/exception/UnsupportedEncodingProcessingException.java
===================================================================
--- trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/exception/UnsupportedEncodingProcessingException.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/exception/UnsupportedEncodingProcessingException.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -27,8 +27,6 @@
 
 package org.mulgara.content.mbox.parser.exception;
 
-import java.io.*;
-
 /**
  * When the encoding was not supported.
  *
@@ -51,6 +49,9 @@
  */
 public class UnsupportedEncodingProcessingException extends Exception {
 
+  /** Generated serialization ID. */
+  private static final long serialVersionUID = 9173311111532213158L;
+
   /**
    * Constructor.
    *

Modified: trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/model/MBox.java
===================================================================
--- trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/model/MBox.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/model/MBox.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -34,7 +34,6 @@
 import org.jrdf.graph.Graph;
 import org.jrdf.graph.Triple;
 
-import org.mulgara.content.Content;
 import org.mulgara.content.NotModifiedException;
 import org.mulgara.content.mbox.parser.model.exception.InvalidMBoxException;
 import org.mulgara.content.mbox.parser.model.exception.ModelException;

Modified: trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/model/MBoxManager.java
===================================================================
--- trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/model/MBoxManager.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/model/MBoxManager.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -27,11 +27,6 @@
 
 package org.mulgara.content.mbox.parser.model;
 
-import java.io.InputStream;
-import java.net.URI;
-
-import org.jrdf.graph.Graph;
-
 import org.mulgara.content.Content;
 import org.mulgara.content.mbox.parser.model.exception.ModelException;
 

Modified: trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/model/ModelFactory.java
===================================================================
--- trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/model/ModelFactory.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/model/ModelFactory.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -27,7 +27,6 @@
 
 package org.mulgara.content.mbox.parser.model;
 
-import java.util.Set;
 import java.util.Properties;
 import java.io.*;
 import java.net.URL;
@@ -145,20 +144,20 @@
    * @throws FactoryException
    */
   private Object createObject(String classNameProperty, String classType,
-                              Class[] parameterTypes, Object[] parameters) throws
+                              Class<?>[] parameterTypes, Object[] parameters) throws
       FactoryException {
 
     //The instance of the "classNameProperty" to be returned
     Object object = null;
 
     //class that classNameProperty represents from the properties file
-    Class objectClass = null;
+    Class<?> objectClass = null;
 
     //class type that object should be instantiated as
-    Class type = null;
+    Class<?> type = null;
 
     // Constructor for our object
-    Constructor constructor = null;
+    Constructor<?> constructor = null;
 
     try {
 
@@ -249,8 +248,7 @@
    *
    * @return The created mbox object
    */
-  public MBox createMBox(Class[] parameterTypes, Object[] parameters) throws
-      FactoryException {
+  public MBox createMBox(Class<?>[] parameterTypes, Object[] parameters) throws FactoryException {
 
     // Container for parser object
     MBox mbox = null;
@@ -275,7 +273,7 @@
     MBoxManager mboxManager = null;
 
     // Create an array of the types for the mbox constructor
-    Class[] parameterTypes = new Class[0];
+    Class<?>[] parameterTypes = new Class[0];
 
     // Create an array of parameters for the mbox constructor
     Object[] parameters = new Object[0];

Modified: trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/model/exception/FactoryException.java
===================================================================
--- trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/model/exception/FactoryException.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/model/exception/FactoryException.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -27,8 +27,6 @@
 
 package org.mulgara.content.mbox.parser.model.exception;
 
-import java.io.*;
-
 /**
  * An exception that should be used when the factory is unable to produce objects.
  *
@@ -51,6 +49,9 @@
  */
 public class FactoryException extends Exception {
 
+  /** Generated serialization ID. */
+  private static final long serialVersionUID = 7549780829727662107L;
+
   /**
    * Constructor.
    *

Modified: trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/model/exception/InvalidMBoxException.java
===================================================================
--- trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/model/exception/InvalidMBoxException.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/model/exception/InvalidMBoxException.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -27,8 +27,6 @@
 
 package org.mulgara.content.mbox.parser.model.exception;
 
-import java.io.*;
-
 /**
  * An exception that should be used when an MBox model object tries to parse an
  * invalid mbox.
@@ -52,6 +50,9 @@
  */
 public class InvalidMBoxException extends Exception {
 
+  /** Generated serialization ID. */
+  private static final long serialVersionUID = 5609261818493877883L;
+
   /**
    * Constructor.
    *

Modified: trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/model/exception/ModelException.java
===================================================================
--- trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/model/exception/ModelException.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/model/exception/ModelException.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -27,8 +27,6 @@
 
 package org.mulgara.content.mbox.parser.model.exception;
 
-import java.io.*;
-
 /**
  * An exception that should be used when an MBox model object encounters errors.
  *
@@ -51,6 +49,9 @@
  */
 public class ModelException extends Exception {
 
+  /** Generated serialization ID. */
+  private static final long serialVersionUID = 6221972947920256706L;
+
   /**
    * Constructor.
    *

Modified: trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/model/exception/VocabularyException.java
===================================================================
--- trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/model/exception/VocabularyException.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/content-mbox/java/org/mulgara/content/mbox/parser/model/exception/VocabularyException.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -27,8 +27,6 @@
 
 package org.mulgara.content.mbox.parser.model.exception;
 
-import java.io.*;
-
 /**
  * An exception that should be used when the vocabulary for the parser is
  * incorrect.
@@ -52,6 +50,9 @@
  */
 public class VocabularyException extends Exception {
 
+  /** Generated serialization ID. */
+  private static final long serialVersionUID = -8023095730007470849L;
+
   /**
    * Constructor.
    *

Modified: trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/MP3StatementsUnitTest.java
===================================================================
--- trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/MP3StatementsUnitTest.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/MP3StatementsUnitTest.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -139,8 +139,8 @@
                          "Chrono_Trigger_600_AD_in_Piano.mp3");
 
     // Containers for construction of content object
-    Class contentClass = null;
-    Constructor constructor = null;
+    Class<?> contentClass = null;
+    Constructor<?> constructor = null;
     Content content = null;
 
     try {
@@ -252,8 +252,8 @@
                          "Chrono_Trigger_600_AD_in_Piano.mp3");
 
     // Containers for construction of content object
-    Class contentClass = null;
-    Constructor constructor = null;
+    Class<?> contentClass = null;
+    Constructor<?> constructor = null;
     Content content = null;
 
     try {
@@ -392,8 +392,8 @@
                          "Chrono_Trigger_600_AD_in_Piano.mp3");
 
     // Containers for construction of content object
-    Class contentClass = null;
-    Constructor constructor = null;
+    Class<?> contentClass = null;
+    Constructor<?> constructor = null;
     Content content = null;
 
     try {
@@ -518,8 +518,8 @@
                          "Chrono_Trigger_600_AD_in_Piano.mp3");
 
     // Containers for construction of content object
-    Class contentClass = null;
-    Constructor constructor = null;
+    Class<?> contentClass = null;
+    Constructor<?> constructor = null;
     Content content = null;
 
     try {
@@ -658,11 +658,11 @@
 
         log.debug("Globalized values of first entry: [" +
                   resolverSession.globalize(statements.getColumnValue(
-            statements.SUBJECT)) + ", " +
+                      MP3Statements.SUBJECT)) + ", " +
                   resolverSession.globalize(statements.getColumnValue(
-            statements.PREDICATE)) + ", " +
+                      MP3Statements.PREDICATE)) + ", " +
                   resolverSession.globalize(statements.getColumnValue(
-            statements.OBJECT)) + "]");
+                      MP3Statements.OBJECT)) + "]");
       } catch (TuplesException tuplesException) {
 
         // Ignore the exception as we are debugging
@@ -680,7 +680,7 @@
     try {
 
       // Get the subject node id
-      subject = statements.getColumnValue(statements.SUBJECT);
+      subject = statements.getColumnValue(MP3Statements.SUBJECT);
     } catch (TuplesException tuplesException) {
 
       // Log the exception
@@ -696,7 +696,7 @@
     try {
 
       // Get the predicate node id
-      predicate = statements.getColumnValue(statements.PREDICATE);
+      predicate = statements.getColumnValue(MP3Statements.PREDICATE);
     } catch (TuplesException tuplesException) {
 
       // Log the exception
@@ -712,7 +712,7 @@
     try {
 
       // Get the object node id
-      object = statements.getColumnValue(statements.OBJECT);
+      object = statements.getColumnValue(MP3Statements.OBJECT);
     } catch (TuplesException tuplesException) {
 
       // Log the exception
@@ -808,8 +808,8 @@
                                   "data"), "camera.owl");
 
     // Containers for construction of content object
-    Class contentClass = null;
-    Constructor constructor = null;
+    Class<?> contentClass = null;
+    Constructor<?> constructor = null;
     Content content = null;
 
     try {
@@ -878,9 +878,6 @@
     // Obtain a resolver session
     ResolverSession resolverSession = new TestResolverSession();
 
-    // Container for our statements object
-    MP3Statements statements = null;
-
     // Boolean to show we failed to initialise (assumed false)
     boolean failed = false;
 
@@ -888,7 +885,7 @@
 
       // Construct a new statements object which will represent the content of
       // the non mp3 file
-      statements = new MP3Statements(content, resolverSession);
+      new MP3Statements(content, resolverSession);
     } catch (NotModifiedException notModifiedException) {
 
       // Set that we have failed during construction

Modified: trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/ID3ParsersUnitTest.java
===================================================================
--- trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/ID3ParsersUnitTest.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/ID3ParsersUnitTest.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -29,16 +29,13 @@
 
 // Standard Java
 import java.io.*;
-import java.net.*;
 
 // Apache logging
 import org.apache.log4j.*;
-import org.apache.log4j.xml.*;
 
 // Mp3 Library
 import org.blinkenlights.id3.*;
 import org.blinkenlights.id3.v1.*;
-import org.blinkenlights.id3.v2.*;
 
 // JRDF
 import org.jrdf.graph.mem.*;
@@ -319,7 +316,7 @@
       try {
 
         // Get all statements in the graph
-        ClosableIterator iterator = model.find(null, null, null);
+        ClosableIterator<Triple> iterator = model.find(null, null, null);
 
         while (iterator.hasNext()) {
 
@@ -364,11 +361,10 @@
 
       // Create a resource object to match the resource name we gave the mp3 data
       // plus the id3 v1 tag information
-      SubjectNode v1Resource = model.getElementFactory().createResource();
+      model.getElementFactory().createResource();
 
       // Create a property to signify the type
-      PredicateNode property = model.getElementFactory().createResource(RDF.
-          TYPE);
+      PredicateNode property = model.getElementFactory().createResource(RDF.TYPE);
 
       // create a resource to represent the ID3v1 type
       ObjectNode typeResource = (ObjectNode) processor.resolveIdentifier(
@@ -379,7 +375,7 @@
           model.contains(null, property, typeResource));
 
       // Create a property to signify the album
-      property = processor.resolveIdentifier(processor.TALB);
+      property = processor.resolveIdentifier(IdentifierProcessor.TALB);
 
       // Check that we have the correct album
       assertTrue("Album was not 'Residence' as expected for id3v1 resource.",
@@ -388,7 +384,7 @@
           "Residence")));
 
       // Create a property to signify the artist
-      property = processor.resolveIdentifier(processor.TCOM);
+      property = processor.resolveIdentifier(IdentifierProcessor.TCOM);
 
       // Check that we have the correct artist
       assertTrue(
@@ -398,7 +394,7 @@
           "Karaoke Tundra")));
 
       // Create a property to signify the comment
-      property = processor.resolveIdentifier(processor.COMM);
+      property = processor.resolveIdentifier(IdentifierProcessor.COMM);
 
       // Check that we have the correct comment
       assertTrue(
@@ -408,7 +404,7 @@
           "http://www.kikapu.com")));
 
       // Create a property to signify the genre
-      property = processor.resolveIdentifier(processor.MCDI);
+      property = processor.resolveIdentifier(IdentifierProcessor.MCDI);
 
       // Check that we have the correct genre
       assertTrue("Genre was not " + ID3V1Tags.Genre.Electronic + " as " +
@@ -417,7 +413,7 @@
           model.getElementFactory().createLiteral(ID3V1Tags.Genre.Electronic.toString())));
 
       // Create a property to signify the title
-      property = processor.resolveIdentifier(processor.TOAL);
+      property = processor.resolveIdentifier(IdentifierProcessor.TOAL);
 
       // Check that we have the correct title
       assertTrue(
@@ -427,7 +423,7 @@
           "Green & Parrot")));
 
       // Create a property to signify the release year
-      property = processor.resolveIdentifier(processor.TYER);
+      property = processor.resolveIdentifier(IdentifierProcessor.TYER);
 
       // Check that we have the correct release year
       assertTrue("Title was not '2004' as expected for id3v1 resource.",
@@ -561,7 +557,7 @@
       try {
 
         // Get all statements in the graph
-        ClosableIterator iterator = model.find(null, null, null);
+        ClosableIterator<Triple> iterator = model.find(null, null, null);
 
         while (iterator.hasNext()) {
 
@@ -613,7 +609,7 @@
                  model.contains(null, property, typeResource));
 
       // Create a property to signify the artist
-      property = processor.resolveIdentifier(processor.TCOM);
+      property = processor.resolveIdentifier(IdentifierProcessor.TCOM);
 
       // Check that we have the correct artist
       assertTrue(
@@ -623,7 +619,7 @@
           "Yasunori Mitsuda")));
 
       // Create a property to signify the title description
-      property = processor.resolveIdentifier(processor.TIT2);
+      property = processor.resolveIdentifier(IdentifierProcessor.TIT2);
 
       // Check that we have the correct title description
       assertTrue("Title description was not 'Chrono Trigger 600 A.D. in Piano OC Remix' as expected for id3v2 resource.",
@@ -642,7 +638,7 @@
 //          "2003-09-16T22:20:22")));
 
       // Create a property to signify the copyright message
-      property = processor.resolveIdentifier(processor.TCOP);
+      property = processor.resolveIdentifier(IdentifierProcessor.TCOP);
 
       // Check that we have the correct copyright message
       assertTrue(
@@ -668,7 +664,7 @@
 //          "OCR01040")));
 
       // Create a property to signify the release type
-      property = processor.resolveIdentifier(processor.TCON);
+      property = processor.resolveIdentifier(IdentifierProcessor.TCON);
 
       // Check that we have the correct release type
       assertTrue("Release type was not 'Game' as expected for id3v2 resource.",
@@ -676,7 +672,7 @@
                                 model.getElementFactory().createLiteral("Game")));
 
       // Create a property to signify the BPM
-      property = processor.resolveIdentifier(processor.TBPM);
+      property = processor.resolveIdentifier(IdentifierProcessor.TBPM);
 
       // Check that we have the correct BPM
       assertTrue("BPM was not '00000' as expected for id3v2 resource.",
@@ -684,7 +680,7 @@
                                 model.getElementFactory().createLiteral("0")));
 
       // Create a property to signify the lead performer
-      property = processor.resolveIdentifier(processor.TPE1);
+      property = processor.resolveIdentifier(IdentifierProcessor.TPE1);
 
       if (log.isDebugEnabled()) {
 
@@ -700,7 +696,7 @@
                          model.getElementFactory().createLiteral("kLuTz")));
 
       // Create a property to signify the original performer
-      property = processor.resolveIdentifier(processor.TOPE);
+      property = processor.resolveIdentifier(IdentifierProcessor.TOPE);
 
       // Check that we have the correct original performer
       assertTrue(
@@ -709,7 +705,7 @@
                          model.getElementFactory().createLiteral("SNES")));
 
       // Create a property to signify the album
-      property = processor.resolveIdentifier(processor.TALB);
+      property = processor.resolveIdentifier(IdentifierProcessor.TALB);
 
       // Check that we have the correct album
       assertTrue(
@@ -728,7 +724,7 @@
 //                         model.getElementFactory().createLiteral("2003-09-16")));
 
       // Create a property to signify the original title
-      property = processor.resolveIdentifier(processor.TOAL);
+      property = processor.resolveIdentifier(IdentifierProcessor.TOAL);
 
       // Check that we have the correct original title
       assertTrue(

Modified: trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/ID3v1ParserImpl.java
===================================================================
--- trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/ID3v1ParserImpl.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/ID3v1ParserImpl.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -31,9 +31,7 @@
 import org.apache.log4j.*;
 
 // MP3 Library
-import org.blinkenlights.id3.*;
 import org.blinkenlights.id3.v1.*;
-import org.blinkenlights.id3.v2.*;
 
 // JRDF Library
 import org.jrdf.graph.*;
@@ -96,8 +94,7 @@
 
       // Populate the processor
       processor.createMappings(graph);
-    }
-    catch (IdentifierException identifierException) {
+    } catch (IdentifierException identifierException) {
 
       throw new ParserException(
           "Unable to initialise the identifier processor.",
@@ -107,15 +104,13 @@
     try {
 
       // Add the album property
-      graph.add(mp3Resource, processor.resolveIdentifier(processor.TALB),
+      graph.add(mp3Resource, processor.resolveIdentifier(IdentifierProcessor.TALB),
           factory.createLiteral(id3v1.getAlbum()));
-    }
-    catch (GraphException graphException) {
+    } catch (GraphException graphException) {
 
       throw new ParserException("Unable to add album to id3v1 resource.",
           graphException);
-    }
-    catch (GraphElementFactoryException graphElementFactoryException) {
+    } catch (GraphElementFactoryException graphElementFactoryException) {
 
       throw new ParserException("Unable to create a literal for album name.",
           graphElementFactoryException);
@@ -124,15 +119,13 @@
     try {
 
       // Add the artist property
-      graph.add(mp3Resource, processor.resolveIdentifier(processor.TCOM),
+      graph.add(mp3Resource, processor.resolveIdentifier(IdentifierProcessor.TCOM),
           factory.createLiteral(id3v1.getArtist()));
-    }
-    catch (GraphException graphException) {
+    } catch (GraphException graphException) {
 
       throw new ParserException("Unable to add artist to id3v1 resource.",
           graphException);
-    }
-    catch (GraphElementFactoryException graphElementFactoryException) {
+    } catch (GraphElementFactoryException graphElementFactoryException) {
 
       throw new ParserException("Unable to create a literal for artist name.",
           graphElementFactoryException);
@@ -141,15 +134,13 @@
     try {
 
       // Add the comment property
-      graph.add(mp3Resource, processor.resolveIdentifier(processor.COMM),
+      graph.add(mp3Resource, processor.resolveIdentifier(IdentifierProcessor.COMM),
           factory.createLiteral(id3v1.getComment()));
-    }
-    catch (GraphException graphException) {
+    } catch (GraphException graphException) {
 
       throw new ParserException("Unable to add comment to id3v1 resource.",
           graphException);
-    }
-    catch (GraphElementFactoryException graphElementFactoryException) {
+    } catch (GraphElementFactoryException graphElementFactoryException) {
 
       throw new ParserException("Unable to create a literal for comment.",
           graphElementFactoryException);
@@ -158,7 +149,7 @@
     try {
 
       // Add the genre property
-      graph.add(mp3Resource, processor.resolveIdentifier(processor.MCDI),
+      graph.add(mp3Resource, processor.resolveIdentifier(IdentifierProcessor.MCDI),
           factory.createLiteral("" + id3v1.getGenre()));
     }
     catch (GraphException graphException) {
@@ -175,15 +166,13 @@
     try {
 
       // Add the title property
-      graph.add(mp3Resource, processor.resolveIdentifier(processor.TOAL),
+      graph.add(mp3Resource, processor.resolveIdentifier(IdentifierProcessor.TOAL),
           factory.createLiteral(id3v1.getTitle()));
-    }
-    catch (GraphException graphException) {
+    } catch (GraphException graphException) {
 
       throw new ParserException("Unable to add title to id3v1 resource.",
           graphException);
-    }
-    catch (GraphElementFactoryException graphElementFactoryException) {
+    } catch (GraphElementFactoryException graphElementFactoryException) {
 
       throw new ParserException("Unable to create a literal for title.",
           graphElementFactoryException);
@@ -198,15 +187,13 @@
     try {
 
       // Add the year property
-      graph.add(mp3Resource, processor.resolveIdentifier(processor.TYER),
+      graph.add(mp3Resource, processor.resolveIdentifier(IdentifierProcessor.TYER),
           factory.createLiteral(id3v1.getYear()));
-    }
-    catch (GraphException graphException) {
+    } catch (GraphException graphException) {
 
       throw new ParserException("Unable to add year to id3v1 resource.",
           graphException);
-    }
-    catch (GraphElementFactoryException graphElementFactoryException) {
+    } catch (GraphElementFactoryException graphElementFactoryException) {
 
       throw new ParserException("Unable to create a literal for year.",
           graphElementFactoryException);
@@ -221,16 +208,14 @@
 
       try {
         // Add the track property
-        graph.add(mp3Resource, processor.resolveIdentifier(processor.TRCK),
+        graph.add(mp3Resource, processor.resolveIdentifier(IdentifierProcessor.TRCK),
             factory.createLiteral("" + ((ID3V1_1Tags) id3v1).getAlbumTrack()));
-      }
-      catch (GraphException graphException) {
+      } catch (GraphException graphException) {
 
         throw new ParserException(
             "Unable to add track number to id3v1 resource.",
             graphException);
-      }
-      catch (GraphElementFactoryException graphElementFactoryException) {
+      } catch (GraphElementFactoryException graphElementFactoryException) {
 
         throw new ParserException(
             "Unable to create a literal for track number.",

Modified: trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/ID3v2ParserImpl.java
===================================================================
--- trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/ID3v2ParserImpl.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/ID3v2ParserImpl.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -27,16 +27,10 @@
 
 package org.mulgara.content.mp3.parser;
 
-// Java
-import java.util.Iterator;
-import java.net.URISyntaxException;
-
 // Log4j
 import org.apache.log4j.*;
 
 // Mp3 Library
-import org.blinkenlights.id3.*;
-import org.blinkenlights.id3.v1.*;
 import org.blinkenlights.id3.v2.*;
 
 // JRDF

Modified: trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/IdentifierProcessor.java
===================================================================
--- trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/IdentifierProcessor.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/IdentifierProcessor.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -36,8 +36,6 @@
 import org.apache.log4j.*;
 
 // MP3 Library
-import org.blinkenlights.id3.*;
-import org.blinkenlights.id3.v1.*;
 import org.blinkenlights.id3.v2.*;
 
 // JRDF
@@ -69,6 +67,7 @@
 public final class IdentifierProcessor {
 
   /** The category to log to. */
+  @SuppressWarnings("unused")
   private static Logger log = Logger.getLogger(IdentifierProcessor.class);
 
   /** The identifiers we expect to come across in ID3 tags */
@@ -151,18 +150,15 @@
   public static final String ID3_NAMESPACE = "http://mulgara.org/mulgara/id3#";
 
   /** Mapping of identifiers to their RDF equivalent */
-  private HashMap idMap;
+  private HashMap<String,URIReference> idMap;
 
-  /** Singleton instance */
-  private static IdentifierProcessor instance;
-
   /**
    * Constructor.
    */
   public IdentifierProcessor() {
 
     // Set up the hash map
-    idMap = new HashMap();
+    idMap = new HashMap<String,URIReference>();
   }
 
   /**

Modified: trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/ParserFactory.java
===================================================================
--- trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/ParserFactory.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/ParserFactory.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -163,10 +163,10 @@
     Object object = null;
 
     //class that classNameProperty represents from the properties file
-    Class objectClass = null;
+    Class<?> objectClass = null;
 
     //class type that object should be instantiated as
-    Class type = null;
+    Class<?> type = null;
 
     try {
 
@@ -178,25 +178,25 @@
 
       // Instantiate an instance of the class
       object = objectClass.newInstance();
-    }
-    catch (ClassNotFoundException classNotFoundException) {
 
+    } catch (ClassNotFoundException classNotFoundException) {
+
       // An exception has occurred so report it and throw it as a factory exception
       log.error(classNameProperty + " was not found.",
                 classNotFoundException);
       throw new FactoryException(classNameProperty + " was not found.",
                                  classNotFoundException);
-    }
-    catch (InstantiationException instantiationException) {
 
+    } catch (InstantiationException instantiationException) {
+
       // An exception has occurred so report it and throw it as a factory exception
       log.error("Could not instantiate " + classNameProperty + ".",
                 instantiationException);
       throw new FactoryException("Could not instantiate " + classNameProperty
                                  + ".", instantiationException);
-    }
-    catch (IllegalAccessException illegalAccessException) {
 
+    } catch (IllegalAccessException illegalAccessException) {
+
       // An exception has occurred so report it and throw it as a factory exception
       log.error("Illegal access when creating " + classNameProperty + ".",
                 illegalAccessException);

Modified: trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/api/MP3Conversion.java
===================================================================
--- trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/api/MP3Conversion.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/api/MP3Conversion.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -69,6 +69,7 @@
 public class MP3Conversion {
 
   /** The category to log to. */
+  @SuppressWarnings("unused")
   private static Logger log = Logger.getLogger(MP3Conversion.class);
 
   /** The RDF conversion path */

Modified: trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/exception/ConversionException.java
===================================================================
--- trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/exception/ConversionException.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/exception/ConversionException.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -27,8 +27,6 @@
 
 package org.mulgara.content.mp3.parser.exception;
 
-import java.io.*;
-
 /**
  * Exception thrown when a problem occurs within an MP3 Conversion.
  *
@@ -51,6 +49,9 @@
  */
 public class ConversionException extends Exception {
 
+  /** Generated serialization ID */
+  private static final long serialVersionUID = -5845974988713848747L;
+
   /**
    * Constructor.
    *

Modified: trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/exception/FactoryException.java
===================================================================
--- trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/exception/FactoryException.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/exception/FactoryException.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -27,8 +27,6 @@
 
 package org.mulgara.content.mp3.parser.exception;
 
-import java.io.*;
-
 /**
  * Exception thrown when a problem occurs within the factory.
  *
@@ -51,6 +49,9 @@
  */
 public class FactoryException extends Exception {
 
+  /** Generated serialization ID */
+  private static final long serialVersionUID = -3533635683221379829L;
+
   /**
    * Constructor.
    *

Modified: trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/exception/IdentifierException.java
===================================================================
--- trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/exception/IdentifierException.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/exception/IdentifierException.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -27,8 +27,6 @@
 
 package org.mulgara.content.mp3.parser.exception;
 
-import java.io.*;
-
 /**
  * Exception thrown when a problem occurs within the Identifier processor.
  *
@@ -51,6 +49,9 @@
  */
 public class IdentifierException extends Exception {
 
+  /** Generated serialization ID */
+  private static final long serialVersionUID = -8593528312915875457L;
+
   /**
    * Constructor.
    *

Modified: trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/exception/ParserException.java
===================================================================
--- trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/exception/ParserException.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/content-mp3/java/org/mulgara/content/mp3/parser/exception/ParserException.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -27,8 +27,6 @@
 
 package org.mulgara.content.mp3.parser.exception;
 
-import java.io.*;
-
 /**
  * Exception thrown when a problem occurs while the parser is parsing a
  * document.
@@ -52,6 +50,9 @@
  */
 public class ParserException extends Exception {
 
+  /** Generated serialization ID */
+  private static final long serialVersionUID = 1446485953659117050L;
+
   /**
    * Constructor.
    *

Modified: trunk/src/jar/query/java/org/mulgara/query/operation/Rollback.java
===================================================================
--- trunk/src/jar/query/java/org/mulgara/query/operation/Rollback.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/query/java/org/mulgara/query/operation/Rollback.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -13,8 +13,6 @@
 package org.mulgara.query.operation;
 
 
-import java.util.Iterator;
-
 import org.mulgara.connection.Connection;
 import org.mulgara.query.QueryException;
 import org.mulgara.server.Session;

Modified: trunk/src/jar/query/java/org/mulgara/server/JRDFSession.java
===================================================================
--- trunk/src/jar/query/java/org/mulgara/server/JRDFSession.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/query/java/org/mulgara/server/JRDFSession.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -35,7 +35,6 @@
 
 // Local packages
 import org.mulgara.query.*;
-import org.mulgara.server.*;
 
 /**
  * A JRDF session.

Modified: trunk/src/jar/query/java/org/mulgara/server/JenaSession.java
===================================================================
--- trunk/src/jar/query/java/org/mulgara/server/JenaSession.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/query/java/org/mulgara/server/JenaSession.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -31,7 +31,6 @@
 import java.net.URI;
 
 // Jena packages
-import com.hp.hpl.jena.graph.Graph;
 import com.hp.hpl.jena.graph.Node_Variable;
 
 // Local packages

Modified: trunk/src/jar/query/java/org/mulgara/server/NonRemoteSessionException.java
===================================================================
--- trunk/src/jar/query/java/org/mulgara/server/NonRemoteSessionException.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/query/java/org/mulgara/server/NonRemoteSessionException.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -48,6 +48,9 @@
  */
 public class NonRemoteSessionException extends Exception {
 
+  /** Generated serialization ID */
+  private static final long serialVersionUID = 259493692361932153L;
+
   /**
    * Main Constructor.
    *

Modified: trunk/src/jar/query/java/org/mulgara/server/ResourceManagerInstanceAdaptor.java
===================================================================
--- trunk/src/jar/query/java/org/mulgara/server/ResourceManagerInstanceAdaptor.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/query/java/org/mulgara/server/ResourceManagerInstanceAdaptor.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -19,10 +19,7 @@
 
 
 // Java 2 Standard Packages
-import java.net.*;
-import java.util.*;
 import java.io.*;
-import javax.transaction.xa.XAResource;
 
 /**
  * Interface to identify a Resource Manager through an XAResource.

Modified: trunk/src/jar/query/java/org/mulgara/server/SessionFactoryConfiguration.java
===================================================================
--- trunk/src/jar/query/java/org/mulgara/server/SessionFactoryConfiguration.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/query/java/org/mulgara/server/SessionFactoryConfiguration.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -31,16 +31,10 @@
 import java.net.*;
 import java.io.*;
 import java.util.*;
-import javax.naming.*;
 
-// Third party packages
-import org.apache.log4j.Logger; // Apache Log4J
-
 // Locally written packages
 import org.mulgara.server.SessionFactory;
 
-import java.lang.reflect.Constructor;
-
 /**
  * Stores configuration properties used to instantiate a
  * {@link SessionFactory}.
@@ -129,11 +123,11 @@
    * @throws SessionFactoryException
    * @return Class[]
    */
-  public Class [] getConfigurationTypes() throws SessionFactoryException {
+  public Class<?>[] getConfigurationTypes() throws SessionFactoryException {
 
     try {
 
-      List classes = new ArrayList();
+      List<Class<?>> classes = new ArrayList<Class<?>>();
 
       //serverURI
       if ( (this.serverURI != null)
@@ -173,7 +167,7 @@
 
     try {
 
-      List objects = new ArrayList();
+      List<Object> objects = new ArrayList<Object>();
 
       //serverURI
       if ( (this.serverURI != null)
@@ -195,9 +189,9 @@
 
       //return as an array
       return (Object[]) objects.toArray(new Object[objects.size()]);
-    }
-    catch (URISyntaxException uriException) {
 
+    } catch (URISyntaxException uriException) {
+
       throw new SessionFactoryException("Could not get configuration types.",
                                         uriException);
     }

Modified: trunk/src/jar/query/java/org/mulgara/server/SessionFactoryException.java
===================================================================
--- trunk/src/jar/query/java/org/mulgara/server/SessionFactoryException.java	2009-06-03 01:41:52 UTC (rev 1713)
+++ trunk/src/jar/query/java/org/mulgara/server/SessionFactoryException.java	2009-06-03 01:46:00 UTC (rev 1714)
@@ -27,9 +27,6 @@
 
 package org.mulgara.server;
 
-// Java 2 Standard Packages
-import java.net.URI;
-
 /**
 * Exception thrown if {@link SessionFactoryFactory} methods fail.
 *
@@ -41,8 +38,11 @@
 *   <a href="http://www.pisoftware.com/">Plugged In Software Pty Ltd</a>
 * @licence <a href="{@docRoot}/../../LICENCE">Mozilla Public License v1.1</a>
 */
-public class SessionFactoryException extends Exception
-{
+public class SessionFactoryException extends Exception {
+
+  /** Generated serialization ID */
+  private static final long serialVersionUID = 5814669573216206645L;
+
   /**
   * @param message  diagnostic text
   */




More information about the Mulgara-svn mailing list