jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r1337158 - /jackrabbit/oak/trunk/oak-it/jcr/src/test/java/org/apache/jackrabbit/oak/jcr/TestContentLoader.java
Date Fri, 11 May 2012 13:40:12 GMT
Author: reschke
Date: Fri May 11 13:40:11 2012
New Revision: 1337158

URL: http://svn.apache.org/viewvc?rev=1337158&view=rev
Log:
OAK-6: remove unused import

Modified:
    jackrabbit/oak/trunk/oak-it/jcr/src/test/java/org/apache/jackrabbit/oak/jcr/TestContentLoader.java

Modified: jackrabbit/oak/trunk/oak-it/jcr/src/test/java/org/apache/jackrabbit/oak/jcr/TestContentLoader.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-it/jcr/src/test/java/org/apache/jackrabbit/oak/jcr/TestContentLoader.java?rev=1337158&r1=1337157&r2=1337158&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-it/jcr/src/test/java/org/apache/jackrabbit/oak/jcr/TestContentLoader.java
(original)
+++ jackrabbit/oak/trunk/oak-it/jcr/src/test/java/org/apache/jackrabbit/oak/jcr/TestContentLoader.java
Fri May 11 13:40:11 2012
@@ -20,7 +20,6 @@ import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.util.Calendar;
 
-import javax.jcr.Binary;
 import javax.jcr.Node;
 import javax.jcr.PathNotFoundException;
 import javax.jcr.PropertyType;
@@ -61,7 +60,7 @@ public class TestContentLoader {
      * Creates a boolean, double, long, calendar and a path property at the
      * given node.
      */
-    private  void addPropertyTestData(Node node) throws RepositoryException {
+    private void addPropertyTestData(Node node) throws RepositoryException {
         node.setProperty("boolean", true);
         node.setProperty("double", Math.PI);
         node.setProperty("long", 90834953485278298l);
@@ -74,25 +73,24 @@ public class TestContentLoader {
     }
 
     /**
-     * Creates four nodes under the given node. Each node has a String
-     * property named "prop1" with some content set.
+     * Creates four nodes under the given node. Each node has a String property
+     * named "prop1" with some content set.
      */
-    private  void addQueryTestData(Node node) throws RepositoryException {
+    private void addQueryTestData(Node node) throws RepositoryException {
         while (node.hasNode("node1")) {
             node.getNode("node1").remove();
         }
-        getOrAddNode(node, "node1").setProperty(
-                "prop1", "You can have it good, cheap, or fast. Any two.");
+        getOrAddNode(node, "node1").setProperty("prop1", "You can have it good, cheap, or
fast. Any two.");
         getOrAddNode(node, "node1").setProperty("prop1", "foo bar");
         getOrAddNode(node, "node1").setProperty("prop1", "Hello world!");
         getOrAddNode(node, "node2").setProperty("prop1", "Apache Jackrabbit");
     }
 
     /**
-     * Creates three nodes under the given node: one of type nt:resource
-     * and the other nodes referencing it.
+     * Creates three nodes under the given node: one of type nt:resource and the
+     * other nodes referencing it.
      */
-    private  void addNodeTestData(Node node) throws RepositoryException, IOException {
+    private void addNodeTestData(Node node) throws RepositoryException, IOException {
         if (node.hasNode("multiReference")) {
             node.getNode("multiReference").remove();
         }
@@ -111,51 +109,39 @@ public class TestContentLoader {
         resource.setProperty("jcr:data", new BinaryValue("Hello w\u00F6rld.".getBytes(ENCODING)));
         resource.setProperty("jcr:lastModified", Calendar.getInstance());
 
-
         // TODO: re-add once we have referenceable nodes
-//        Node resReference = getOrAddNode(node, "reference");
-//        resReference.setProperty("ref", resource);
-//        // make this node itself referenceable
-//        resReference.addMixin("mix:referenceable");
-//
-//        Node multiReference = node.addNode("multiReference");
-//        ValueFactory factory = node.getSession().getValueFactory();
-//        multiReference.setProperty("ref", new Value[] {
-//                factory.createValue(resource),
-//                factory.createValue(resReference)
-//            });
+        // Node resReference = getOrAddNode(node, "reference");
+        // resReference.setProperty("ref", resource);
+        // // make this node itself referenceable
+        // resReference.addMixin("mix:referenceable");
+        //
+        // Node multiReference = node.addNode("multiReference");
+        // ValueFactory factory = node.getSession().getValueFactory();
+        // multiReference.setProperty("ref", new Value[] {
+        // factory.createValue(resource),
+        // factory.createValue(resReference)
+        // });
 
         // NodeDefTest requires a test node with a mandatory child node
-        JcrUtils.putFile(
-                node, "testFile", "text/plain",
-                new ByteArrayInputStream("Hello, World!".getBytes("UTF-8")));
+        JcrUtils.putFile(node, "testFile", "text/plain", new ByteArrayInputStream("Hello,
World!".getBytes("UTF-8")));
     }
 
-    private  void addExportTestData(Node node) throws RepositoryException, IOException {
+    private void addExportTestData(Node node) throws RepositoryException, IOException {
         getOrAddNode(node, "invalidXmlName").setProperty("propName", "some text");
 
         // three nodes which should be serialized as xml text in docView export
         // separated with spaces
-        getOrAddNode(node, "jcr:xmltext").setProperty(
-                "jcr:xmlcharacters", "A text without any special character.");
+        getOrAddNode(node, "jcr:xmltext").setProperty("jcr:xmlcharacters", "A text without
any special character.");
         getOrAddNode(node, "some-element");
-        getOrAddNode(node, "jcr:xmltext").setProperty(
-                "jcr:xmlcharacters",
-                " The entity reference characters: <, ', ,&, >,  \" should"
-                + " be escaped in xml export. ");
+        getOrAddNode(node, "jcr:xmltext").setProperty("jcr:xmlcharacters",
+                " The entity reference characters: <, ', ,&, >,  \" should" + "
be escaped in xml export. ");
         getOrAddNode(node, "some-element");
-        getOrAddNode(node, "jcr:xmltext").setProperty(
-                "jcr:xmlcharacters", "A text without any special character.");
+        getOrAddNode(node, "jcr:xmltext").setProperty("jcr:xmlcharacters", "A text without
any special character.");
 
         Node big = getOrAddNode(node, "bigNode");
-        big.setProperty(
-                "propName0",
-                "SGVsbG8gd8O2cmxkLg==;SGVsbG8gd8O2cmxkLg==".split(";"),
-                PropertyType.BINARY);
+        big.setProperty("propName0", "SGVsbG8gd8O2cmxkLg==;SGVsbG8gd8O2cmxkLg==".split(";"),
PropertyType.BINARY);
         big.setProperty("propName1", "text 1");
-        big.setProperty(
-                "propName2",
-                "multival text 1;multival text 2;multival text 3".split(";"));
+        big.setProperty("propName2", "multival text 1;multival text 2;multival text 3".split(";"));
         big.setProperty("propName3", "text 1");
 
         addExportValues(node, "propName");
@@ -163,33 +149,27 @@ public class TestContentLoader {
     }
 
     /**
-     * create nodes with following properties
-     * binary & single
-     * binary & multival
-     * notbinary & single
-     * notbinary & multival
+     * create nodes with following properties binary & single binary & multival
+     * notbinary & single notbinary & multival
      */
-    private  void addExportValues(Node node, String name)
-            throws RepositoryException, IOException {
+    private void addExportValues(Node node, String name) throws RepositoryException, IOException
{
         String prefix = "valid";
         if (name.indexOf('<') != -1) {
             prefix = "invalid";
         }
         node = getOrAddNode(node, prefix + "Names");
 
-        String[] texts = new String[] {
-                "multival text 1", "multival text 2", "multival text 3" };
+        String[] texts = new String[] { "multival text 1", "multival text 2", "multival text
3" };
         getOrAddNode(node, prefix + "MultiNoBin").setProperty(name, texts);
 
         Node resource = getOrAddNode(node, prefix + "MultiBin");
         resource.setProperty("jcr:encoding", ENCODING);
         resource.setProperty("jcr:mimeType", "text/plain");
-        String[] values =
-            new String[] { "SGVsbG8gd8O2cmxkLg==", "SGVsbG8gd8O2cmxkLg==" };
+        String[] values = new String[] { "SGVsbG8gd8O2cmxkLg==", "SGVsbG8gd8O2cmxkLg==" };
         resource.setProperty(name, values, PropertyType.BINARY);
         resource.setProperty("jcr:lastModified", Calendar.getInstance());
 
-        getOrAddNode(node, prefix + "NoBin").setProperty(name,  "text 1");
+        getOrAddNode(node, prefix + "NoBin").setProperty(name, "text 1");
 
         resource = getOrAddNode(node, "invalidBin");
         resource.setProperty("jcr:encoding", ENCODING);



Mime
View raw message