jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r776684 - /jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2davex/QValueFactoryImpl.java
Date Wed, 20 May 2009 13:05:44 GMT
Author: stefan
Date: Wed May 20 13:05:44 2009
New Revision: 776684

URL: http://svn.apache.org/viewvc?rev=776684&view=rev
Log:
JCR-1609:  new Property Types (WIP...)
JCR-2061: References and Dereferencing of Property Values (WIP...)


Modified:
    jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2davex/QValueFactoryImpl.java

Modified: jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2davex/QValueFactoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2davex/QValueFactoryImpl.java?rev=776684&r1=776683&r2=776684&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2davex/QValueFactoryImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2davex/QValueFactoryImpl.java
Wed May 20 13:05:44 2009
@@ -58,6 +58,9 @@
 import java.util.Arrays;
 import java.util.Calendar;
 import java.util.TimeZone;
+import java.math.BigDecimal;
+import java.net.URI;
+import java.net.URISyntaxException;
 
 /**
  * <code>ValueFactoryImpl</code>...
@@ -745,6 +748,28 @@
         }
 
         /**
+         * @see QValue#getDecimal()
+         */
+        public BigDecimal getDecimal() throws RepositoryException {
+            try {
+                return new BigDecimal(getString());
+            } catch (NumberFormatException ex) {
+                throw new ValueFormatException(ex);
+            }
+        }
+
+        /**
+         * @see QValue#getURI()
+         */
+        public URI getURI() throws RepositoryException {
+            try {
+                return new URI(getString());
+            } catch (URISyntaxException ex) {
+                throw new ValueFormatException(ex);
+            }
+        }
+
+        /**
          * Frees temporarily allocated resources such as temporary file, buffer, etc.
          * If this <code>BinaryQValue</code> is backed by a persistent resource
          * calling this method will have no effect.



Mime
View raw message