jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1330157 - in /jackrabbit/oak/trunk: oak-core/src/main/java/org/apache/jackrabbit/oak/core/ oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/ oak-core/src/main/java/org/apache/jackrabbit/oak/util/ oak-core/src/test/java/org/apache/ja...
Date Wed, 25 Apr 2012 08:45:57 GMT
Author: angela
Date: Wed Apr 25 08:45:56 2012
New Revision: 1330157

URL: http://svn.apache.org/viewvc?rev=1330157&view=rev
Log:
OAK-16 : Proper ValueFactory implementation and Value handling (WIP)
OAK-33 : Values in oak-core (WIP)

- add support for 'special' property types
- add support for binaries
- move conversion between jsop + corevalue to a utility
- remove @ignore for some special property types in RepositoryTest
- move jcr-value related stuff to value package

TODO: 
- type-hint with value arrays
- empty arrays
- (weak) reference properties
- enable TCK test and fix issues that may come up then

Added:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/util/CoreValueUtil.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/util/
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/util/CoreValueUtilTest.java
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/value/
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/value/BinaryImpl.java
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/value/DummyNamePathResolver.java
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/value/ValueFactoryImpl.java
      - copied, changed from r1329741, jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/ValueFactoryImpl.java
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/value/ValueImpl.java
      - copied, changed from r1329727, jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/ValueImpl.java
Removed:
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/ValueFactoryImpl.java
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/ValueImpl.java
Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/CoreValueFactoryImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/CoreValueImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeState.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelRoot.java
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionContext.java
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionImpl.java
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryResultImpl.java
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/RowImpl.java
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/util/ValueConverter.java
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/CoreValueFactoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/CoreValueFactoryImpl.java?rev=1330157&r1=1330156&r2=1330157&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/CoreValueFactoryImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/CoreValueFactoryImpl.java
Wed Apr 25 08:45:56 2012
@@ -77,7 +77,6 @@ public class CoreValueFactoryImpl implem
 
     @Override
     public CoreValue createValue(String value, int type) {
-        // TODO check again...
         if (type == PropertyType.BINARY) {
             BinaryValue bv = new BinaryValue(value, mk);
             return new CoreValueImpl(bv);

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/CoreValueImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/CoreValueImpl.java?rev=1330157&r1=1330156&r2=1330157&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/CoreValueImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/CoreValueImpl.java
Wed Apr 25 08:45:56 2012
@@ -75,13 +75,25 @@ class CoreValueImpl implements CoreValue
             case PropertyType.WEAKREFERENCE:
             case PropertyType.URI:
                 this.value = value;
-                this.type = type;
                 break;
-
+            case PropertyType.BOOLEAN:
+                this.value = Boolean.parseBoolean(value);
+                break;
+            case PropertyType.DOUBLE:
+                this.value = Double.parseDouble(value);
+                break;
+            case PropertyType.DECIMAL:
+                this.value = new BigDecimal(value);
+                break;
+            case PropertyType.LONG:
+                this.value = Long.parseLong(value);
+                break;
             default:
+                // undefined property type or binary.
+                // NOTE: binary must be constructed using BinaryValue -> see CoreValueFactory
                 throw new IllegalArgumentException("Illegal type " + PropertyType.nameFromValue(type));
         }
-
+        this.type = type;
     }
 
     /**

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeState.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeState.java?rev=1330157&r1=1330156&r2=1330157&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeState.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeState.java
Wed Apr 25 08:45:56 2012
@@ -24,6 +24,7 @@ import org.apache.jackrabbit.mk.json.Jso
 import org.apache.jackrabbit.oak.api.CoreValue;
 import org.apache.jackrabbit.oak.api.CoreValueFactory;
 import org.apache.jackrabbit.oak.api.PropertyState;
+import org.apache.jackrabbit.oak.util.CoreValueUtil;
 
 import java.util.ArrayList;
 import java.util.Iterator;
@@ -95,9 +96,9 @@ class KernelNodeState extends AbstractNo
                     }
                     childNodes.put(name, new KernelNodeState(kernel, valueFactory, childPath,
revision));
                 } else if (reader.matches('[')) {
-                    properties.put(name, new KernelPropertyState(name, readArray(reader)));
+                    properties.put(name, new KernelPropertyState(name, CoreValueUtil.listFromJsopReader(reader,
valueFactory)));
                 } else {
-                    CoreValue cv = readValue(reader);
+                    CoreValue cv = CoreValueUtil.fromJsopReader(reader, valueFactory);
                     properties.put(name, new KernelPropertyState(name, cv));
                 }
             } while (reader.matches(','));
@@ -219,34 +220,9 @@ class KernelNodeState extends AbstractNo
     private List<CoreValue> readArray(JsopReader reader) {
         List<CoreValue> values = new ArrayList<CoreValue>();
         while (!reader.matches(']')) {
-            values.add(readValue(reader));
+            values.add(CoreValueUtil.fromJsopReader(reader, valueFactory));
             reader.matches(',');
         }
         return values;
     }
-
-    private CoreValue readValue(JsopReader reader) {
-        CoreValue value;
-        // TODO properly handle property types not covered by JSON: Binary, double, decimal,
date, name, path, (weak)ref, uri
-        if (reader.matches(JsopTokenizer.NUMBER)) {
-            String number = reader.getToken();
-            // TODO: property deal with different number types (double, BigDecimal)
-            if (number.indexOf('.') > -1) {
-                value = valueFactory.createValue(Double.valueOf(number));
-            } else {
-                value = valueFactory.createValue(Long.valueOf(number));
-            }
-        } else if (reader.matches(JsopTokenizer.TRUE)) {
-            value = valueFactory.createValue(true);
-        } else if (reader.matches(JsopTokenizer.FALSE)) {
-            value = valueFactory.createValue(false);
-        } else if (reader.matches(JsopTokenizer.STRING)) {
-            // TODO: deal with other property types
-            value = valueFactory.createValue(reader.getToken());
-        }  else {
-            throw new IllegalArgumentException("Unexpected token: " + reader.getToken());
-        }
-        return value;
-    }
-
 }
\ No newline at end of file

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelRoot.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelRoot.java?rev=1330157&r1=1330156&r2=1330157&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelRoot.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelRoot.java
Wed Apr 25 08:45:56 2012
@@ -19,14 +19,13 @@
 package org.apache.jackrabbit.oak.kernel;
 
 import org.apache.jackrabbit.mk.api.MicroKernelException;
-import org.apache.jackrabbit.mk.json.JsonBuilder;
 import org.apache.jackrabbit.oak.api.CommitFailedException;
 import org.apache.jackrabbit.oak.api.CoreValue;
 import org.apache.jackrabbit.oak.api.Root;
 import org.apache.jackrabbit.oak.api.Tree;
 import org.apache.jackrabbit.oak.kernel.KernelTree.Listener;
+import org.apache.jackrabbit.oak.util.CoreValueUtil;
 
-import javax.jcr.PropertyType;
 import java.util.List;
 
 import static org.apache.jackrabbit.mk.util.PathUtils.elements;
@@ -160,33 +159,6 @@ public class KernelRoot implements Root 
         return path.isEmpty() ? name : path + '/' + name;
     }
 
-    private static String encode(CoreValue value) {
-        switch (value.getType()) {
-            // TODO: deal with all property types.
-            case PropertyType.BOOLEAN: return JsonBuilder.encode(value.getBoolean());
-            case PropertyType.LONG:    return JsonBuilder.encode(value.getLong());
-            case PropertyType.DOUBLE:  return JsonBuilder.encode(value.getDouble());
-            case PropertyType.BINARY:  return null; // TODO implement encoding of binaries
-            case PropertyType.STRING:  return JsonBuilder.encode(value.getString());
-            default: return JsonBuilder.encode(value.getString());
-            //case NULL:    return "null"; // TODO
-        }
-    }
-
-    private static String encode(Iterable<CoreValue> values) {
-        StringBuilder sb = new StringBuilder();
-        sb.append('[');
-        for (CoreValue cv : values) {
-            sb.append(encode(cv));
-            sb.append(',');
-        }
-        if (sb.length() > 1) {
-            sb.deleteCharAt(sb.length() - 1);
-        }
-        sb.append(']');
-        return sb.toString();
-    }
-
     /**
      * This {@code Listener} implementation records all changes to
      * a associated tree as JSOP.
@@ -206,12 +178,12 @@ public class KernelRoot implements Root 
 
         @Override
         public void setProperty(KernelTree tree, String name, CoreValue value) {
-            jsop.append("^\"").append(path(tree, name)).append("\":").append(encode(value));
+            jsop.append("^\"").append(path(tree, name)).append("\":").append(CoreValueUtil.toJsonValue(value));
         }
 
         @Override
         public void setProperty(KernelTree tree, String name, List<CoreValue> values)
{
-            jsop.append("^\"").append(path(tree, name)).append("\":").append(encode(values));
+            jsop.append("^\"").append(path(tree, name)).append("\":").append(CoreValueUtil.toJsonArray(values));
         }
 
         @Override

Added: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/util/CoreValueUtil.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/util/CoreValueUtil.java?rev=1330157&view=auto
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/util/CoreValueUtil.java
(added)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/util/CoreValueUtil.java
Wed Apr 25 08:45:56 2012
@@ -0,0 +1,163 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.oak.util;
+
+import org.apache.jackrabbit.mk.json.JsonBuilder;
+import org.apache.jackrabbit.mk.json.JsopReader;
+import org.apache.jackrabbit.mk.json.JsopTokenizer;
+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.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * CoreValueUtil...
+ *
+ * TODO: review if this should be added to CoreValue/*Factory interfaces
+ */
+public class CoreValueUtil {
+
+    /**
+     * logger instance
+     */
+    private static final Logger log = LoggerFactory.getLogger(CoreValueUtil.class);
+
+    private static final Map<Integer, String> TYPE2HINT = new HashMap<Integer, String>();
+    private static final Map<String, Integer> HINT2TYPE = new HashMap<String, Integer>();
+    static {
+        for (int type = PropertyType.UNDEFINED; type <= PropertyType.DECIMAL; type++)
{
+            String hint = PropertyType.nameFromValue(type).substring(0,3).toLowerCase();
+            TYPE2HINT.put(type, hint);
+            HINT2TYPE.put(hint, type);
+        }
+    }
+
+    public static String toJsonValue(CoreValue value) {
+        String jsonString;
+        switch (value.getType()) {
+            case PropertyType.BOOLEAN:
+                jsonString = JsonBuilder.encode(value.getBoolean());
+                break;
+            case PropertyType.LONG:
+                jsonString = JsonBuilder.encode(value.getLong());
+                break;
+            case PropertyType.STRING:
+                String str = value.getString();
+                if (startsWithHint(str)) {
+                    jsonString = buildJsonStringWithType(value);
+                } else {
+                    jsonString = JsonBuilder.encode(value.getString());
+                }
+                break;
+            default:
+                // any other type
+                jsonString = buildJsonStringWithType(value);
+        }
+        return jsonString;
+    }
+
+    public static String toJsonArray(Iterable<CoreValue> values) {
+        StringBuilder sb = new StringBuilder();
+        sb.append('[');
+        for (CoreValue cv : values) {
+            sb.append(toJsonValue(cv));
+            sb.append(',');
+        }
+        if (sb.length() > 1) {
+            sb.deleteCharAt(sb.length() - 1);
+        }
+        sb.append(']');
+        return sb.toString();
+    }
+
+    public static CoreValue fromJsopReader(JsopReader reader, CoreValueFactory valueFactory)
{
+        CoreValue value;
+        if (reader.matches(JsopTokenizer.NUMBER)) {
+            String number = reader.getToken();
+            value = fromJsonString(number, JsopTokenizer.NUMBER, valueFactory);
+        } else if (reader.matches(JsopTokenizer.TRUE)) {
+            value = valueFactory.createValue(true);
+        } else if (reader.matches(JsopTokenizer.FALSE)) {
+            value = valueFactory.createValue(false);
+        } else if (reader.matches(JsopTokenizer.STRING)) {
+            String strValue = reader.getToken();
+            value = fromJsonString(strValue, JsopTokenizer.STRING, valueFactory);
+        }  else {
+            throw new IllegalArgumentException("Unexpected token: " + reader.getToken());
+        }
+        return value;
+    }
+
+    public static List<CoreValue> listFromJsopReader(JsopReader reader, CoreValueFactory
valueFactory) {
+        if (!reader.matches('[')) {
+            List<CoreValue> values = new ArrayList<CoreValue>();
+            while (!reader.matches(']')) {
+                values.add(fromJsopReader(reader, valueFactory));
+                reader.matches(',');
+            }
+            return values;
+        } else {
+            throw new IllegalArgumentException("Unexpected token: " + reader.getToken());
+        }
+    }
+
+    // TODO remove again
+    public static CoreValue fromJsonString(String jsonString, int jsopType, CoreValueFactory
valueFactory) {
+        CoreValue value;
+        switch (jsopType) {
+            case JsopTokenizer.NUMBER:
+                value = valueFactory.createValue(Long.valueOf(jsonString));
+                break;
+            case JsopTokenizer.FALSE:
+                value = valueFactory.createValue(false);
+                break;
+            case JsopTokenizer.TRUE:
+                value = valueFactory.createValue(true);
+                break;
+            case JsopTokenizer.STRING:
+                if (startsWithHint(jsonString)) {
+                    int type = HINT2TYPE.get(jsonString.substring(0,3));
+                    value = valueFactory.createValue(jsonString.substring(4), type);
+                } else {
+                    value = valueFactory.createValue(jsonString);
+                }
+                break;
+            default:
+                throw new IllegalArgumentException("Invalid jsop type: " + jsopType);
+        }
+        return value;
+    }
+
+
+    private static String buildJsonStringWithType(CoreValue value) {
+        StringBuilder sb = new StringBuilder();
+        sb.append(TYPE2HINT.get(value.getType()));
+        sb.append(':');
+        sb.append(value.getString());
+        return JsonBuilder.encode(sb.toString());
+    }
+
+    private static boolean startsWithHint(String jsonString) {
+        return jsonString.length() >= 4 && jsonString.charAt(3) == ':';
+    }
+}
\ No newline at end of file

Added: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/util/CoreValueUtilTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/util/CoreValueUtilTest.java?rev=1330157&view=auto
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/util/CoreValueUtilTest.java
(added)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/util/CoreValueUtilTest.java
Wed Apr 25 08:45:56 2012
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.oak.util;
+
+import org.apache.jackrabbit.mk.api.MicroKernel;
+import org.apache.jackrabbit.mk.json.JsopTokenizer;
+import org.apache.jackrabbit.mk.simple.SimpleKernelImpl;
+import org.apache.jackrabbit.oak.api.CoreValue;
+import org.apache.jackrabbit.oak.api.CoreValueFactory;
+import org.apache.jackrabbit.oak.core.CoreValueFactoryImpl;
+import org.junit.Before;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.jcr.PropertyType;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * CoreValueUtilTest...
+ */
+public class CoreValueUtilTest {
+
+    /**
+     * logger instance
+     */
+    private static final Logger log = LoggerFactory.getLogger(CoreValueUtilTest.class);
+
+    // TODO: use regular oak-repo setup
+    private MicroKernel microKernel;
+    private CoreValueFactory valueFactory;
+
+    private Map<CoreValue, String> map;
+
+    @Before
+    public void setUp() throws IOException {
+        microKernel = new SimpleKernelImpl("mem:" + getClass().getName());
+        valueFactory = new CoreValueFactoryImpl(microKernel);
+
+        map = new HashMap<CoreValue, String>();
+        map.put(valueFactory.createValue("abc"), "\"abc\"");
+        map.put(valueFactory.createValue("a:bc"), "\"a:bc\"");
+        map.put(valueFactory.createValue("a:bc"), "\"a:bc\"");
+        map.put(valueFactory.createValue("boo:abc"), "\"str:boo:abc\"");
+        map.put(valueFactory.createValue("str:abc"), "\"str:str:abc\"");
+        map.put(valueFactory.createValue("str:"), "\"str:str:\"");
+
+        map.put(valueFactory.createValue(true), "true");
+        map.put(valueFactory.createValue(false), "false");
+
+        map.put(valueFactory.createValue(12345), "12345");
+        map.put(valueFactory.createValue(1.23), "\"dou:1.23\"");
+        BigDecimal bd = new BigDecimal("12345678901234567890");
+        map.put(valueFactory.createValue(bd), "\"dec:" + bd.toString() + '\"');
+
+        map.put(valueFactory.createValue("2012-05-01T12:00.000:00GMT", PropertyType.DATE),
"\"dat:2012-05-01T12:00.000:00GMT\"");
+
+        map.put(valueFactory.createValue("jcr:primaryType", PropertyType.NAME), "\"nam:jcr:primaryType\"");
+        map.put(valueFactory.createValue("/jcr:system", PropertyType.PATH), "\"pat:/jcr:system\"");
+
+        map.put(valueFactory.createValue("http://jackrabbit.apache.org", PropertyType.URI),
"\"uri:http://jackrabbit.apache.org\"");
+
+        String uuid = UUID.randomUUID().toString();
+        map.put(valueFactory.createValue(uuid, PropertyType.REFERENCE), "\"ref:" +uuid+ '\"');
+        map.put(valueFactory.createValue(uuid, PropertyType.WEAKREFERENCE), "\"wea:" +uuid+
'\"');
+
+        CoreValue binary = valueFactory.createValue(new ByteArrayInputStream("123".getBytes()));
+        map.put(binary, "\"bin:"+ binary.getString()+ '\"');
+    }
+
+    @Test
+    public void testToJsonValue() throws IOException {
+        for (CoreValue v : map.keySet()) {
+            String json = map.get(v);
+            assertEquals(json, CoreValueUtil.toJsonValue(v));
+        }
+    }
+
+    @Test
+    public void testFromJsonValue() throws IOException {
+        for (CoreValue v : map.keySet()) {
+            String json = map.get(v);
+            int jsopType;
+            if (v.getType() == PropertyType.BOOLEAN) {
+                jsopType = (v.getBoolean()) ? JsopTokenizer.TRUE : JsopTokenizer.FALSE;
+            } else if (v.getType() == PropertyType.LONG) {
+                jsopType = JsopTokenizer.NUMBER;
+            } else {
+                jsopType = JsopTokenizer.STRING;
+                // remove quotes
+                json = json.substring(1, json.length()-1);
+            }
+            assertEquals(v, CoreValueUtil.fromJsonString(json, jsopType, valueFactory));
+        }
+    }
+}
\ No newline at end of file

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionContext.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionContext.java?rev=1330157&r1=1330156&r2=1330157&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionContext.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionContext.java
Wed Apr 25 08:45:56 2012
@@ -22,6 +22,7 @@ package org.apache.jackrabbit.oak.jcr;
 import org.apache.jackrabbit.oak.api.ContentSession;
 import org.apache.jackrabbit.oak.api.Root;
 import org.apache.jackrabbit.oak.api.Tree;
+import org.apache.jackrabbit.oak.jcr.value.ValueFactoryImpl;
 
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionImpl.java?rev=1330157&r1=1330156&r2=1330157&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionImpl.java
Wed Apr 25 08:45:56 2012
@@ -24,6 +24,7 @@ import org.apache.jackrabbit.oak.api.Com
 import org.apache.jackrabbit.oak.api.ContentSession;
 import org.apache.jackrabbit.oak.api.Root;
 import org.apache.jackrabbit.oak.api.Tree;
+import org.apache.jackrabbit.oak.jcr.value.ValueFactoryImpl;
 import org.apache.jackrabbit.oak.namepath.Paths;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryResultImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryResultImpl.java?rev=1330157&r1=1330156&r2=1330157&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryResultImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryResultImpl.java
Wed Apr 25 08:45:56 2012
@@ -21,7 +21,7 @@ package org.apache.jackrabbit.oak.jcr.qu
 import org.apache.jackrabbit.commons.iterator.RowIteratorAdapter;
 import org.apache.jackrabbit.oak.api.Result;
 import org.apache.jackrabbit.oak.api.ResultRow;
-import org.apache.jackrabbit.oak.jcr.ValueFactoryImpl;
+import org.apache.jackrabbit.oak.jcr.value.ValueFactoryImpl;
 
 import javax.jcr.NodeIterator;
 import javax.jcr.RepositoryException;

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/RowImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/RowImpl.java?rev=1330157&r1=1330156&r2=1330157&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/RowImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/RowImpl.java
Wed Apr 25 08:45:56 2012
@@ -20,7 +20,7 @@ package org.apache.jackrabbit.oak.jcr.qu
 
 import org.apache.jackrabbit.oak.api.CoreValue;
 import org.apache.jackrabbit.oak.api.ResultRow;
-import org.apache.jackrabbit.oak.jcr.ValueFactoryImpl;
+import org.apache.jackrabbit.oak.jcr.value.ValueFactoryImpl;
 
 import javax.jcr.Node;
 import javax.jcr.RepositoryException;

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/util/ValueConverter.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/util/ValueConverter.java?rev=1330157&r1=1330156&r2=1330157&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/util/ValueConverter.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/util/ValueConverter.java
Wed Apr 25 08:45:56 2012
@@ -22,7 +22,7 @@ package org.apache.jackrabbit.oak.jcr.ut
 import org.apache.jackrabbit.oak.api.CoreValue;
 import org.apache.jackrabbit.oak.jcr.SessionContext;
 import org.apache.jackrabbit.oak.jcr.SessionImpl;
-import org.apache.jackrabbit.oak.jcr.ValueFactoryImpl;
+import org.apache.jackrabbit.oak.jcr.value.ValueFactoryImpl;
 
 import javax.jcr.Value;
 import javax.jcr.ValueFormatException;

Added: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/value/BinaryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/value/BinaryImpl.java?rev=1330157&view=auto
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/value/BinaryImpl.java
(added)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/value/BinaryImpl.java
Wed Apr 25 08:45:56 2012
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.oak.jcr.value;
+
+import javax.jcr.Binary;
+import javax.jcr.PropertyType;
+import javax.jcr.RepositoryException;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+
+/**
+ * BinaryImpl...
+ */
+class BinaryImpl implements Binary {
+
+    private final ValueImpl value;
+
+    BinaryImpl(ValueImpl value) {
+        this.value = value;
+    }
+
+    //-------------------------------------------------------------< Binary >---
+    @Override
+    public InputStream getStream() throws RepositoryException {
+        switch (value.getType()) {
+            case PropertyType.NAME:
+            case PropertyType.PATH:
+                // need to respect namespace remapping
+                try {
+                    final String strValue = value.getString();
+                    return new ByteArrayInputStream(strValue.getBytes("utf-8"));
+                } catch (UnsupportedEncodingException e) {
+                    throw new RepositoryException(e.getMessage());
+                }
+            default:
+                return value.unwrap().getNewStream();
+        }
+    }
+
+    @Override
+    public int read(byte[] b, long position) throws IOException, RepositoryException {
+        // TODO
+        throw new UnsupportedOperationException("implementation missing");
+    }
+
+    @Override
+    public long getSize() throws RepositoryException {
+        switch (value.getType()) {
+            case PropertyType.NAME:
+            case PropertyType.PATH:
+                // need to respect namespace remapping
+                return value.getString().length();
+            default:
+                return value.unwrap().length();
+        }
+    }
+
+    @Override
+    public void dispose() {
+        // nothing to do
+    }
+}
\ No newline at end of file

Added: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/value/DummyNamePathResolver.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/value/DummyNamePathResolver.java?rev=1330157&view=auto
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/value/DummyNamePathResolver.java
(added)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/value/DummyNamePathResolver.java
Wed Apr 25 08:45:56 2012
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.oak.jcr.value;
+
+/**
+ * DummyNamePathResolver...
+ * TODO: replace by reasonable implementation taking namespace mappings etc. into account.
+ */
+class DummyNamePathResolver {
+    String getJCRPath(String internalPath) {
+        return internalPath;
+    }
+
+    String getInternalPath(String jcrPath) {
+        return jcrPath;
+    }
+
+    String getJCRName(String internalName) {
+        return internalName;
+    }
+
+    String getInternalName(String jcrName) {
+        return jcrName;
+    }
+}
\ No newline at end of file

Copied: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/value/ValueFactoryImpl.java
(from r1329741, jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/ValueFactoryImpl.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/value/ValueFactoryImpl.java?p2=jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/value/ValueFactoryImpl.java&p1=jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/ValueFactoryImpl.java&r1=1329741&r2=1330157&rev=1330157&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/ValueFactoryImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/value/ValueFactoryImpl.java
Wed Apr 25 08:45:56 2012
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.oak.jcr;
+package org.apache.jackrabbit.oak.jcr.value;
 
 import org.apache.commons.io.IOUtils;
 import org.apache.jackrabbit.oak.api.CoreValue;
@@ -36,7 +36,7 @@ import java.math.BigDecimal;
 import java.util.Calendar;
 
 /**
- * CoreValueFactoryImpl...
+ * ValueFactoryImpl...
  */
 public class ValueFactoryImpl implements ValueFactory {
 
@@ -153,15 +153,8 @@ public class ValueFactoryImpl implements
 
     @Override
     public Binary createBinary(InputStream stream) throws RepositoryException {
-        try {
-            CoreValue value = factory.createValue(stream);
-            // TODO: BINARY implementation missing
-            throw new UnsupportedOperationException("BINARY handling");
-        } catch (IOException ex) {
-            throw new RuntimeException(ex);
-        } finally {
-            IOUtils.closeQuietly(stream);
-        }
+        ValueImpl value = (ValueImpl) createValue(stream);
+        return new BinaryImpl(value);
     }
 
     @Override
@@ -184,25 +177,4 @@ public class ValueFactoryImpl implements
         CoreValue cv = factory.createValue(value.getUUID(), weak ? PropertyType.WEAKREFERENCE
: PropertyType.REFERENCE);
         return new ValueImpl(cv, resolver);
     }
-
-
-    //--------------------------------------------------------------------------
-    // TODO: replace by reasonable implementation taking namespace mappings etc. into account.
-    public class DummyNamePathResolver {
-        String getJCRPath(String internalPath) {
-            return internalPath;
-        }
-
-        String getInternalPath(String jcrPath) {
-            return jcrPath;
-        }
-
-        String getJCRName(String internalName) {
-            return internalName;
-        }
-
-        String getInternalName(String jcrName) {
-            return jcrName;
-        }
-    }
 }
\ No newline at end of file

Copied: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/value/ValueImpl.java
(from r1329727, jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/ValueImpl.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/value/ValueImpl.java?p2=jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/value/ValueImpl.java&p1=jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/ValueImpl.java&r1=1329727&r2=1330157&rev=1330157&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/ValueImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/value/ValueImpl.java
Wed Apr 25 08:45:56 2012
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.oak.jcr;
+package org.apache.jackrabbit.oak.jcr.value;
 
 import org.apache.commons.io.IOUtils;
 import org.apache.jackrabbit.oak.api.CoreValue;
@@ -48,16 +48,15 @@ class ValueImpl implements Value {
     private final CoreValue value;
 
     // TODO need utility to convert the internal NAME/PATH format to JCR format
-    private final ValueFactoryImpl.DummyNamePathResolver resolver;
+    private final DummyNamePathResolver resolver;
 
     /**
-     * Constructs a <code>ValueImpl</code> object representing an SPI
-     * <codeQValue</code>.
+     * Constructs a {@code ValueImpl} object based on a {@code CoreValue}
      *
-     * @param value the value object this <code>ValueImpl</code> should represent
+     * @param value the value object this {@code ValueImpl} should represent
      * @param resolver
      */
-    public ValueImpl(CoreValue value, ValueFactoryImpl.DummyNamePathResolver resolver) {
+    public ValueImpl(CoreValue value, DummyNamePathResolver resolver) {
         this.value = value;
         this.resolver = resolver;
     }
@@ -70,6 +69,7 @@ class ValueImpl implements Value {
     /**
      * @see javax.jcr.Value#getType()
      */
+    @Override
     public int getType() {
         return value.getType();
     }
@@ -77,6 +77,7 @@ class ValueImpl implements Value {
     /**
      * @see javax.jcr.Value#getBoolean()
      */
+    @Override
     public boolean getBoolean() throws RepositoryException {
         if (getType() == PropertyType.STRING || getType() == PropertyType.BINARY || getType()
== PropertyType.BOOLEAN) {
             return value.getBoolean();
@@ -88,6 +89,7 @@ class ValueImpl implements Value {
     /**
      * @see javax.jcr.Value#getDate()
      */
+    @Override
     public Calendar getDate() throws RepositoryException {
         Calendar cal;
         switch (getType()) {
@@ -109,6 +111,7 @@ class ValueImpl implements Value {
     /**
      * @see javax.jcr.Value#getDecimal()
      */
+    @Override
     public BigDecimal getDecimal() throws RepositoryException {
         try {
             return value.getDecimal();
@@ -120,6 +123,7 @@ class ValueImpl implements Value {
     /**
      * @see javax.jcr.Value#getDouble()
      */
+    @Override
     public double getDouble() throws RepositoryException {
         try {
             return value.getDouble();
@@ -131,6 +135,7 @@ class ValueImpl implements Value {
     /**
      * @see javax.jcr.Value#getLong()
      */
+    @Override
     public long getLong() throws RepositoryException {
         try {
             return value.getLong();
@@ -142,6 +147,7 @@ class ValueImpl implements Value {
     /**
      * @see javax.jcr.Value#getString()
      */
+    @Override
     public String getString() throws RepositoryException {
         switch (getType()) {
             case PropertyType.NAME :
@@ -166,6 +172,7 @@ class ValueImpl implements Value {
     /**
      * @see javax.jcr.Value#getStream()
      */
+    @Override
     public InputStream getStream() throws IllegalStateException, RepositoryException {
         InputStream stream;
         switch (getType()) {
@@ -186,8 +193,9 @@ class ValueImpl implements Value {
     /**
      * @see javax.jcr.Value#getBinary()
      */
+    @Override
     public Binary getBinary() throws RepositoryException {
-        return new BinaryImpl();
+        return new BinaryImpl(this);
     }
 
     //-------------------------------------------------------------< Object >---
@@ -210,48 +218,4 @@ class ValueImpl implements Value {
     public int hashCode() {
         return value.hashCode();
     }
-
-    //------------------------------------------------------------< Binary >----
-    private class BinaryImpl implements Binary {
-
-        @Override
-        public InputStream getStream() throws RepositoryException {
-            switch (value.getType()) {
-                case PropertyType.NAME:
-                case PropertyType.PATH:
-                    // need to respect namespace remapping
-                    try {
-                        final String strValue = getString();
-                        return new ByteArrayInputStream(strValue.getBytes("utf-8"));
-                    } catch (UnsupportedEncodingException e) {
-                        throw new RepositoryException(e.getMessage());
-                    }
-                default:
-                    return value.getNewStream();
-            }
-        }
-
-        @Override
-        public int read(byte[] b, long position) throws IOException, RepositoryException
{
-            // TODO
-            throw new UnsupportedOperationException("implementation missing");
-        }
-
-        @Override
-        public long getSize() throws RepositoryException {
-            switch (value.getType()) {
-                case PropertyType.NAME:
-                case PropertyType.PATH:
-                    // need to respect namespace remapping
-                    return getString().length();
-                default:
-                    return value.length();
-            }
-        }
-
-        @Override
-        public void dispose() {
-            // nothing to do
-        }
-    }
 }
\ No newline at end of file

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java?rev=1330157&r1=1330156&r2=1330157&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java
Wed Apr 25 08:45:56 2012
@@ -489,14 +489,12 @@ public class RepositoryTest extends Abst
         }
     }
 
-    @Ignore // TODO implement value coding in ValueConverter
     @Test
     public void addDecimalProperty() throws RepositoryException, IOException {
         Node parentNode = getNode(TEST_PATH);
         addProperty(parentNode, "decimal", getSession().getValueFactory().createValue(BigDecimal.valueOf(21)));
     }
 
-    @Ignore // TODO implement value coding in ValueConverter
     @Test
     public void addMultiValuedDecimal() throws RepositoryException {
         Node parentNode = getNode(TEST_PATH);
@@ -522,14 +520,12 @@ public class RepositoryTest extends Abst
         }
     }
 
-    @Ignore // TODO implement value coding in ValueConverter
     @Test
     public void addDateProperty() throws RepositoryException, IOException {
         Node parentNode = getNode(TEST_PATH);
         addProperty(parentNode, "date", getSession().getValueFactory().createValue(Calendar.getInstance()));
     }
 
-    @Ignore // TODO implement value coding in ValueConverter
     @Test
     public void addMultiValuedDate() throws RepositoryException {
         Node parentNode = getNode(TEST_PATH);
@@ -557,14 +553,12 @@ public class RepositoryTest extends Abst
         }
     }
 
-    @Ignore // TODO implement value coding in ValueConverter
     @Test
     public void addURIProperty() throws RepositoryException, IOException {
         Node parentNode = getNode(TEST_PATH);
         addProperty(parentNode, "uri", getSession().getValueFactory().createValue("http://www.day.com/",
PropertyType.URI));
     }
 
-    @Ignore // TODO implement value coding in ValueConverter
     @Test
     public void addMultiValuedURI() throws RepositoryException {
         Node parentNode = getNode(TEST_PATH);
@@ -590,14 +584,12 @@ public class RepositoryTest extends Abst
         }
     }
 
-    @Ignore // TODO implement value coding in ValueConverter
     @Test
     public void addNameProperty() throws RepositoryException, IOException {
         Node parentNode = getNode(TEST_PATH);
         addProperty(parentNode, "name", getSession().getValueFactory().createValue("jcr:something\"",
PropertyType.NAME));
     }
 
-    @Ignore // TODO implement value coding in ValueConverter
     @Test
     public void addMultiValuedName() throws RepositoryException {
         Node parentNode = getNode(TEST_PATH);
@@ -623,14 +615,12 @@ public class RepositoryTest extends Abst
         }
     }
 
-    @Ignore // TODO implement value coding in ValueConverter
     @Test
     public void addPathProperty() throws RepositoryException, IOException {
         Node parentNode = getNode(TEST_PATH);
         addProperty(parentNode, "path", getSession().getValueFactory().createValue("/jcr:foo/bar\"",
PropertyType.PATH));
     }
 
-    @Ignore // TODO implement value coding in ValueConverter
     @Test
     public void addMultiValuedPath() throws RepositoryException {
         Node parentNode = getNode(TEST_PATH);
@@ -656,7 +646,6 @@ public class RepositoryTest extends Abst
         }
     }
 
-    @Ignore // TODO implement value coding in ValueConverter
     @Test
     public void addBinaryProperty() throws RepositoryException, IOException {
         Node parentNode = getNode(TEST_PATH);
@@ -665,7 +654,6 @@ public class RepositoryTest extends Abst
         addProperty(parentNode, "binary", getSession().getValueFactory().createValue(bin));
     }
 
-    @Ignore // TODO implement value coding in ValueConverter
     @Test
     public void addSmallBinaryProperty() throws RepositoryException, IOException {
         Node parentNode = getNode(TEST_PATH);
@@ -674,7 +662,6 @@ public class RepositoryTest extends Abst
         addProperty(parentNode, "bigBinary", getSession().getValueFactory().createValue(bin));
     }
 
-    @Ignore // TODO implement value coding in ValueConverter
     @Test
     public void addBigBinaryProperty() throws RepositoryException, IOException {
         Node parentNode = getNode(TEST_PATH);
@@ -683,7 +670,6 @@ public class RepositoryTest extends Abst
         addProperty(parentNode, "bigBinary", getSession().getValueFactory().createValue(bin));
     }
 
-    @Ignore // TODO implement value coding in ValueConverter
     @Test
     public void addMultiValuedBinary() throws RepositoryException {
         Node parentNode = getNode(TEST_PATH);
@@ -904,7 +890,6 @@ public class RepositoryTest extends Abst
         }
     }
 
-    @Ignore // TODO implement value coding in ValueConverter
     @Test
     public void setDoubleNaNProperty() throws RepositoryException, IOException {
         Node parentNode = getNode(TEST_PATH);



Mime
View raw message