jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1336121 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel: CoreValueFactoryImpl.java CoreValueImpl.java
Date Wed, 09 May 2012 12:10:37 GMT
Author: angela
Date: Wed May  9 12:10:37 2012
New Revision: 1336121

URL: http://svn.apache.org/viewvc?rev=1336121&view=rev
Log:
javadoc

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/CoreValueFactoryImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/CoreValueImpl.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/CoreValueFactoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/CoreValueFactoryImpl.java?rev=1336121&r1=1336120&r2=1336121&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/CoreValueFactoryImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/CoreValueFactoryImpl.java
Wed May  9 12:10:37 2012
@@ -19,23 +19,17 @@ package org.apache.jackrabbit.oak.kernel
 import org.apache.jackrabbit.mk.api.MicroKernel;
 import org.apache.jackrabbit.oak.api.CoreValue;
 import org.apache.jackrabbit.oak.api.CoreValueFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import javax.jcr.PropertyType;
 import java.io.InputStream;
 import java.math.BigDecimal;
 
 /**
- * CoreValueFactoryImpl... TODO javadoc
+ * {@code CoreValueFactoryImpl} is the default implementation of the
+ * {@code CoreValueFactory} interface.
  */
 class CoreValueFactoryImpl implements CoreValueFactory {
 
-    /**
-     * logger instance
-     */
-    private static final Logger log = LoggerFactory.getLogger(CoreValueFactoryImpl.class);
-
     private final MicroKernel mk;
 
     // TODO: currently public for query tests -> see todo there...
@@ -43,7 +37,7 @@ class CoreValueFactoryImpl implements Co
         this.mk = mk;
     }
 
-    //-----------------------------------------< org.apache.jackrabbit.oak.api.CoreValueFactory
>---
+    //---------------------------------------------------< CoreValueFactory >---
     @Override
     public CoreValue createValue(String value) {
         return new CoreValueImpl(value, PropertyType.STRING);

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/CoreValueImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/CoreValueImpl.java?rev=1336121&r1=1336120&r2=1336121&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/CoreValueImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/CoreValueImpl.java
Wed May  9 12:10:37 2012
@@ -17,8 +17,6 @@
 package org.apache.jackrabbit.oak.kernel;
 
 import org.apache.jackrabbit.oak.api.CoreValue;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import javax.jcr.PropertyType;
 import java.io.ByteArrayInputStream;
@@ -27,15 +25,28 @@ import java.io.UnsupportedEncodingExcept
 import java.math.BigDecimal;
 
 /**
- * CoreValueImpl... TODO: javadoc
+ * {@code CoreValueImpl} is the default implementation of the {@code CoreValue}
+ * interface. It keeps an object representing the value and the original
+ * property type used during creation. The value will be any of the following
+ * objects:
+ *
+ * <ul>
+ *     <li>{@link PropertyType#STRING STRING} : a {@code String}</li>
+ *     <li>{@link PropertyType#BINARY BINARY} : a {@code BinaryValue}</li>
+ *     <li>{@link PropertyType#BOOLEAN BOOLEAN} : a {@code Boolean}</li>
+ *     <li>{@link PropertyType#DECIMAL DECIMAL} : a {@code BigDecimal}</li>
+ *     <li>{@link PropertyType#DATE DATE} : a {@code String}</li>
+ *     <li>{@link PropertyType#DOUBLE DOUBLE} : a {@code Double}</li>
+ *     <li>{@link PropertyType#LONG LONG} : a {@code Long}</li>
+ *     <li>{@link PropertyType#NAME NAME} : a {@code String}</li>
+ *     <li>{@link PropertyType#PATH PATH} : a {@code String}</li>
+ *     <li>{@link PropertyType#REFERENCE REFERENCE} : a {@code String}</li>
+ *     <li>{@link PropertyType#WEAKREFERENCE WEAKREFERENCE} : a {@code String}</li>
+ *     <li>{@link PropertyType#URI URI} : a {@code String}</li>
+ * </ul>
  */
 class CoreValueImpl implements CoreValue {
 
-    /**
-     * logger instance
-     */
-    private static final Logger log = LoggerFactory.getLogger(CoreValueImpl.class);
-
     private final Object value;
     private final int type;
 
@@ -57,10 +68,11 @@ class CoreValueImpl implements CoreValue
     /**
      * Create a new instance.
      *
-     * @param value
-     * @param type
+     * @param value A string value. Depending on the specified type the value
+     * is being converted to the required target type.
+     * @param type The expected property type of this value.
      * @throws IllegalArgumentException if the specified type cannot be created
-     * from a string value.
+     * from a string value or if the type is invalid.
      */
     CoreValueImpl(String value, int type) {
         if (value == null) {
@@ -99,7 +111,8 @@ class CoreValueImpl implements CoreValue
     /**
      * Create a new instance.
      *
-     * @param value
+     * @param value A {@code Long} to create a {@code CoreValue} of
+     * type {@link PropertyType#LONG}.
      * @throws IllegalArgumentException if the passed {@code value}
      * is {@code null}.
      */
@@ -110,7 +123,8 @@ class CoreValueImpl implements CoreValue
     /**
      * Create a new instance.
      *
-     * @param value
+     * @param value A {@code Double} to create a {@code CoreValue} of
+     * type {@link PropertyType#DOUBLE}.
      * @throws IllegalArgumentException if the passed {@code value}
      * is {@code null}.
      */
@@ -121,7 +135,8 @@ class CoreValueImpl implements CoreValue
     /**
      * Create a new instance.
      *
-     * @param value
+     * @param value A {@code Boolean} to create a {@code CoreValue} of
+     * type {@link PropertyType#BOOLEAN}.
      * @throws IllegalArgumentException if the passed {@code value}
      * is {@code null}.
      */
@@ -132,7 +147,8 @@ class CoreValueImpl implements CoreValue
     /**
      * Create a new instance.
      *
-     * @param value
+     * @param value A {@code BigDecimal} to create a {@code CoreValue} of
+     * type {@link PropertyType#DECIMAL}.
      * @throws IllegalArgumentException if the passed {@code value}
      * is {@code null}.
      */
@@ -143,7 +159,8 @@ class CoreValueImpl implements CoreValue
     /**
      * Create a new instance.
      *
-     * @param value
+     * @param value A {@code BinaryValue} to create a {@code CoreValue} of
+     * type {@link PropertyType#BINARY}.
      * @throws IllegalArgumentException if the passed {@code value}
      * is {@code null}.
      */



Mime
View raw message