Package org.exoplatform.services.jcr.impl.core.value

Examples of org.exoplatform.services.jcr.impl.core.value.StringValue


      }
   }

   public void testNewStringValue() throws Exception
   {
      StringValue sv = new StringValue("string");
      assertEquals(6, sv.getLength());
      assertEquals("string", sv.getString());
      // string already consumed
      try
      {
         sv.getStream();
         fail("IllegalStateException should have been thrown");
      }
      catch (IllegalStateException e)
      {
      }

      // default encoded string (utf-8)
      StringValue sv2 = new StringValue("����");
      // assertEquals(8, sv2.getLength());
      sv2.getStream();

   }
View Full Code Here


      Node node = root.getNode("childNode/childNode2");
      assertNotNull(node);

      assertEquals("nt:file", node.getPrimaryNodeType().getName());
      Property property = node.getNode("jcr:content").getProperty("jcr:data");
      property.setValue(new StringValue("this is the NEW content"));

      node = root.getNode("childNode");
      node.addNode("childNode3", "nt:file");

      session = (SessionImpl)repository.login(credentials, WORKSPACE);
View Full Code Here

            for (int j = 1; j <= ntFiles; j++)
            {
               Node file = subFolder.addNode("File" + j, "nt:file");
               Node contentNode = file.addNode("jcr:content", "nt:resource");
               contentNode.setProperty("jcr:data", LoadTest.class.getResourceAsStream("/test_tiff_file.tiff"));
               contentNode.setProperty("jcr:mimeType", new StringValue("image/tiff"));
               contentNode.setProperty("jcr:lastModified", session.getValueFactory()
                  .createValue(Calendar.getInstance()));
               /*
                * contentNode.addMixin("dc:elementSet"); Node elementNode =
                * file.getNode("dc:elementSet"); elementNode.setProperty("dc:title", "Title"+j);
View Full Code Here

      }
   }

   public void testNewStringValue() throws Exception
   {
      StringValue sv = new StringValue("string");
      assertEquals(6, sv.getLength());
      assertEquals("string", sv.getString());
      // string already consumed
      try
      {
         sv.getStream();
         fail("IllegalStateException should have been thrown");
      }
      catch (IllegalStateException e)
      {
      }

      // default encoded string (utf-8)
      StringValue sv2 = new StringValue("����");
      // assertEquals(8, sv2.getLength());
      sv2.getStream();

   }
View Full Code Here

      Node node = root.getNode("childNode/childNode2");
      assertNotNull(node);

      assertEquals("nt:file", node.getPrimaryNodeType().getName());
      Property property = node.getNode("jcr:content").getProperty("jcr:data");
      property.setValue(new StringValue("this is the NEW content"));

      node = root.getNode("childNode");
      node.addNode("childNode3", "nt:file");

      session = (SessionImpl)repository.login(credentials, WORKSPACE);
View Full Code Here

TOP

Related Classes of org.exoplatform.services.jcr.impl.core.value.StringValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.