jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r779090 - /jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/constraint/ValueConstraint.java
Date Wed, 27 May 2009 10:28:27 GMT
Author: angela
Date: Wed May 27 10:28:27 2009
New Revision: 779090

URL: http://svn.apache.org/viewvc?rev=779090&view=rev
Log:
JCR-2105: JSR 283 NodeType Management (work in progress)

- add missing property types

Modified:
    jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/constraint/ValueConstraint.java

Modified: jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/constraint/ValueConstraint.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/constraint/ValueConstraint.java?rev=779090&r1=779089&r2=779090&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/constraint/ValueConstraint.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/constraint/ValueConstraint.java
Wed May 27 10:28:27 2009
@@ -90,7 +90,7 @@
      */
     abstract void check(QValue value) throws ConstraintViolationException, RepositoryException;
 
-    //-----------------------------------------< java.lang.Object overrides >---
+    //---------------------------------------------------< java.lang.Object >---
     public boolean equals(Object other) {
         if (other == this) {
             return true;
@@ -130,6 +130,7 @@
         switch (type) {
             // constraints which are not qName senstive
             case PropertyType.STRING:
+            case PropertyType.URI:
                 return new StringConstraint(qualifiedDefinition);
 
             case PropertyType.BOOLEAN:
@@ -143,6 +144,7 @@
 
             case PropertyType.LONG:
             case PropertyType.DOUBLE:
+            case PropertyType.DECIMAL:
                 return new NumericConstraint(qualifiedDefinition);
 
             // qName sensitive constraints: create from qualified string
@@ -152,8 +154,8 @@
             case PropertyType.PATH:
                 return PathConstraint.create(qualifiedDefinition);
 
-            case PropertyType.WEAKREFERENCE:
             case PropertyType.REFERENCE:
+            case PropertyType.WEAKREFERENCE:
                 return ReferenceConstraint.create(qualifiedDefinition);
 
             default:
@@ -178,6 +180,7 @@
         }
         switch (type) {
             case PropertyType.STRING:
+            case PropertyType.URI:
                 return new StringConstraint(definition);
 
             case PropertyType.BOOLEAN:
@@ -191,6 +194,7 @@
 
             case PropertyType.LONG:
             case PropertyType.DOUBLE:
+            case PropertyType.DECIMAL:
                 return new NumericConstraint(definition);
 
             case PropertyType.NAME:
@@ -199,8 +203,8 @@
             case PropertyType.PATH:
                 return PathConstraint.create(definition, resolver);
 
-            case PropertyType.WEAKREFERENCE:
             case PropertyType.REFERENCE:
+            case PropertyType.WEAKREFERENCE:
                 return ReferenceConstraint.create(definition, resolver);
 
             default:



Mime
View raw message