You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2012/10/01 15:53:06 UTC

svn commit: r1392331 - /jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/NodeValue.java

Author: andy
Date: Mon Oct  1 13:53:05 2012
New Revision: 1392331

URL: http://svn.apache.org/viewvc?rev=1392331&view=rev
Log:
Fix comments.

Modified:
    jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/NodeValue.java

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/NodeValue.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/NodeValue.java?rev=1392331&r1=1392330&r2=1392331&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/NodeValue.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/NodeValue.java Mon Oct  1 13:53:05 2012
@@ -57,9 +57,16 @@ import static javax.xml.datatype.Datatyp
 import static javax.xml.datatype.DatatypeConstants.SECONDS ;
 import static javax.xml.datatype.DatatypeConstants.YEARS ;
 
+import java.io.File ;
+import java.io.FileInputStream ;
+import java.io.IOException ;
+import java.io.InputStream ;
 import java.math.BigDecimal ;
 import java.math.BigInteger ;
 import java.util.Calendar ;
+import java.util.Iterator ;
+import java.util.Properties ;
+import java.util.ServiceLoader ;
 
 import javax.xml.datatype.DatatypeConfigurationException ;
 import javax.xml.datatype.DatatypeFactory ;
@@ -68,6 +75,8 @@ import javax.xml.datatype.XMLGregorianCa
 
 import org.openjena.atlas.lib.StrUtils ;
 import org.openjena.atlas.logging.Log ;
+import org.slf4j.Logger ;
+import org.slf4j.LoggerFactory ;
 
 import com.hp.hpl.jena.datatypes.DatatypeFormatException ;
 import com.hp.hpl.jena.datatypes.RDFDatatype ;
@@ -87,15 +96,6 @@ import com.hp.hpl.jena.sparql.graph.Node
 import com.hp.hpl.jena.sparql.graph.NodeTransform ;
 import com.hp.hpl.jena.sparql.serializer.SerializationContext ;
 import com.hp.hpl.jena.sparql.util.* ;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.ServiceLoader;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 public abstract class NodeValue extends ExprNode
 {
@@ -242,17 +242,6 @@ public abstract class NodeValue extends 
         return DatatypeFactory.newInstance(dtfClass, NodeValue.class.getClassLoader()) ;
     }
     
-    // Use NodeValue.toNode(NodeValue) 
-//    public static Node asNode(NodeValue nv)
-//    {
-//        if ( nv == null ) return null ;
-//        return nv.asNode() ; 
-//    }
-    
-    // Initialization
-//    static
-//    {}
-    
     private Node node = null ;     // Null used when a value has not be turned into a Node.
     
     // Don't create direct - the static builders manage the value/node relationship 
@@ -706,7 +695,7 @@ public abstract class NodeValue extends 
     }
     
     // E_GreaterThan/E_LessThan/E_GreaterThanOrEqual/E_LessThanOrEqual
-    // ==> compare(nv1, nv12) => compare (nv1, nv2, false)
+    // ==> compare(nv1, nv2) => compare (nv1, nv2, false)
     
     // BindingComparator => compareAlways(nv1, nv2) => compare (nv1, nv2, true)
     
@@ -943,11 +932,6 @@ public abstract class NodeValue extends 
     // ----------------------------------------------------------------
     // ---- Subclass operations 
     
-//    // One of the known types. 
-//    public abstract boolean hasKnownValue() ;
-////    { return isBoolean() || isNumber() || isString() || isDateTime() || isDate() || isTime() ||
-////        isDuration() || isGYear() || isGYearMonth() ||  isGMonth() || isGDay() ; }
-    
     public boolean isBoolean()      { return false ; } 
     public boolean isString()       { return false ; } 
 
@@ -986,8 +970,6 @@ public abstract class NodeValue extends 
     public boolean isGMonthDay()    { return false ; }
     public boolean isGDay()         { return false ; }
     
-    // getters
-    
     public boolean     getBoolean()     { raise(new ExprEvalTypeException("Not a boolean: "+this)) ; return false ; }
     public String      getString()      { raise(new ExprEvalTypeException("Not a string: "+this)) ; return null ; }
     public BigInteger  getInteger()     { raise(new ExprEvalTypeException("Not an integer: "+this)) ; return null ; }
@@ -996,15 +978,6 @@ public abstract class NodeValue extends 
     public double      getDouble()      { raise(new ExprEvalTypeException("Not a double: "+this)) ; return Double.NaN ; }
     // Value representation for all date and time values.
     public XMLGregorianCalendar getDateTime()    { raise(new ExprEvalTypeException("No DateTime value: "+this)) ; return null ; }
-//    /*
-//        gYearMonth   dddd-mm
-//        gYear        dddd
-//        gMonthDay    --MM-DD
-//        gDay         ---DD
-//        gMonth       --MM
-//    */
-
-    
     public Duration    getDuration() { raise(new ExprEvalTypeException("Not a duration: "+this)) ; return null ; }
 
     // ----------------------------------------------------------------