jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r165135 [1/3] - in /incubator/jackrabbit/trunk/src: java/org/apache/jackrabbit/core/ java/org/apache/jackrabbit/core/lock/ java/org/apache/jackrabbit/core/nodetype/ java/org/apache/jackrabbit/core/nodetype/virtual/ java/org/apache/jackrabbit/core/nodetype/xml/ java/org/apache/jackrabbit/core/query/ java/org/apache/jackrabbit/core/query/lucene/ java/org/apache/jackrabbit/core/query/sql/ java/org/apache/jackrabbit/core/query/xpath/ java/org/apache/jackrabbit/core/state/ java/org/apache/jackrabbit/core/state/mem/ java/org/apache/jackrabbit/core/state/obj/ java/org/apache/jackrabbit/core/state/xml/ java/org/apache/jackrabbit/core/util/ java/org/apache/jackrabbit/core/util/uuid/ java/org/apache/jackrabbit/core/value/ java/org/apache/jackrabbit/core/version/ java/org/apache/jackrabbit/core/version/persistence/ java/org/apache/jackrabbit/core/virtual/ java/org/apache/jackrabbit/core/xml/ test/org/apache/jackrabbit/core/nodetype/xml/
Date Thu, 28 Apr 2005 13:07:00 GMT
Author: stefan
Date: Thu Apr 28 06:06:58 2005
New Revision: 165135

URL: http://svn.apache.org/viewcvs?rev=165135&view=rev
Log:
preparing for the next spec changes:
- created org.apache.jackrabbit.core.value package
- added concrete *Value classes
- moved ValueHelper, InternalValue & BLOBFileValue to 'value' package
- added ISO8601
- removed all references in jackrabbit to javax.jcr.*Value &
  javax.jcr.util.ISO8601

Added:
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/util/ISO8601.java   (with props)
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/BLOBFileValue.java   (with props)
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/BaseValue.java   (with props)
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/BinaryValue.java   (with props)
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/BooleanValue.java   (with props)
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/DateValue.java   (with props)
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/DoubleValue.java   (with props)
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/InternalValue.java   (with props)
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/LongValue.java   (with props)
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/NameValue.java   (with props)
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/PathValue.java   (with props)
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/ReferenceValue.java   (with props)
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/StringValue.java   (with props)
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/ValueHelper.java   (with props)
Removed:
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/BLOBFileValue.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/InternalValue.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/util/ValueHelper.java
Modified:
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/BatchedItemOperations.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/ItemImpl.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/ItemValidator.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/NodeImpl.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/PropertyImpl.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/lock/LockManagerImpl.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/EffectiveNodeType.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/NodeTypeImpl.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/NodeTypeRegistry.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/PropDef.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/PropDefImpl.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/PropertyDefinitionImpl.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/ValueConstraint.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/virtual/VirtualNodeTypeStateProvider.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeReader.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeWriter.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/TextPlainTextFilter.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/lucene/LuceneQueryBuilder.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/lucene/NodeIndexer.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/lucene/RowIteratorImpl.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/sql/JCRSQLQueryBuilder.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/sql/QueryFormat.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/xpath/QueryFormat.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/xpath/XPathQueryBuilder.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/PropertyState.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/SharedItemStateManager.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/mem/InMemPersistenceManager.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/obj/ObjectPersistenceManager.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/xml/XMLPersistenceManager.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/util/uuid/UUID.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionHistoryNodeState.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionItemStateProvider.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionLabelsNodeState.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionNodeState.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/InternalFrozenNodeImpl.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/InternalVersionHistoryImpl.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/InternalVersionImpl.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/PersistentNode.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/VirtualNodeState.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/VirtualPropertyState.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/VirtualValueProvider.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/DocViewSAXEventGenerator.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/SessionImporter.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/SysViewSAXEventGenerator.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/WorkspaceImporter.java
    incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/core/nodetype/xml/TestAll.java

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/BatchedItemOperations.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/BatchedItemOperations.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/BatchedItemOperations.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/BatchedItemOperations.java Thu Apr 28 06:06:58 2005
@@ -34,6 +34,7 @@
 import org.apache.jackrabbit.core.state.UpdatableItemStateManager;
 import org.apache.jackrabbit.core.util.ReferenceChangeTracker;
 import org.apache.jackrabbit.core.util.uuid.UUID;
+import org.apache.jackrabbit.core.value.InternalValue;
 import org.apache.log4j.Logger;
 
 import javax.jcr.AccessDeniedException;

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/ItemImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/ItemImpl.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/ItemImpl.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/ItemImpl.java Thu Apr 28 06:06:58 2005
@@ -33,6 +33,7 @@
 import org.apache.jackrabbit.core.state.PropertyState;
 import org.apache.jackrabbit.core.state.SessionItemStateManager;
 import org.apache.jackrabbit.core.util.uuid.UUID;
+import org.apache.jackrabbit.core.value.InternalValue;
 import org.apache.log4j.Logger;
 
 import javax.jcr.AccessDeniedException;
@@ -1225,9 +1226,9 @@
                         while (depIt.hasNext()) {
                             NodeId id = new NodeId((String) depIt.next());
                             if (!affectedIds.contains(id)) {
-                                // need to save the parent also
+                                // need to save the parent as well
                                 String msg = itemMgr.safeGetJCRPath(id)
-                                        + " needs to be saved also.";
+                                        + " needs to be saved as well.";
                                 log.debug(msg);
                                 throw new ConstraintViolationException(msg);
                             }

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/ItemValidator.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/ItemValidator.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/ItemValidator.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/ItemValidator.java Thu Apr 28 06:06:58 2005
@@ -23,6 +23,7 @@
 import org.apache.jackrabbit.core.nodetype.PropDef;
 import org.apache.jackrabbit.core.state.NodeState;
 import org.apache.jackrabbit.core.state.PropertyState;
+import org.apache.jackrabbit.core.value.InternalValue;
 import org.apache.log4j.Logger;
 
 import javax.jcr.PropertyType;

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/NodeImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/NodeImpl.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/NodeImpl.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/NodeImpl.java Thu Apr 28 06:06:58 2005
@@ -35,7 +35,7 @@
 import org.apache.jackrabbit.core.state.PropertyState;
 import org.apache.jackrabbit.core.util.ChildrenCollectorFilter;
 import org.apache.jackrabbit.core.util.IteratorHelper;
-import org.apache.jackrabbit.core.util.ValueHelper;
+import org.apache.jackrabbit.core.value.ValueHelper;
 import org.apache.jackrabbit.core.util.uuid.UUID;
 import org.apache.jackrabbit.core.version.GenericVersionSelector;
 import org.apache.jackrabbit.core.version.InternalFreeze;
@@ -45,6 +45,8 @@
 import org.apache.jackrabbit.core.version.VersionHistoryImpl;
 import org.apache.jackrabbit.core.version.VersionImpl;
 import org.apache.jackrabbit.core.version.VersionSelector;
+import org.apache.jackrabbit.core.value.InternalValue;
+import org.apache.jackrabbit.core.value.ValueHelper;
 import org.apache.log4j.Logger;
 
 import javax.jcr.AccessDeniedException;

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/PropertyImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/PropertyImpl.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/PropertyImpl.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/PropertyImpl.java Thu Apr 28 06:06:58 2005
@@ -20,15 +20,17 @@
 import org.apache.jackrabbit.core.state.ItemStateException;
 import org.apache.jackrabbit.core.state.PropertyState;
 import org.apache.jackrabbit.core.util.uuid.UUID;
+import org.apache.jackrabbit.core.value.BooleanValue;
+import org.apache.jackrabbit.core.value.DateValue;
+import org.apache.jackrabbit.core.value.DoubleValue;
+import org.apache.jackrabbit.core.value.LongValue;
+import org.apache.jackrabbit.core.value.InternalValue;
+import org.apache.jackrabbit.core.value.BLOBFileValue;
 import org.apache.log4j.Logger;
 
 import javax.jcr.AccessDeniedException;
-import javax.jcr.BooleanValue;
-import javax.jcr.DateValue;
-import javax.jcr.DoubleValue;
 import javax.jcr.ItemNotFoundException;
 import javax.jcr.ItemVisitor;
-import javax.jcr.LongValue;
 import javax.jcr.Node;
 import javax.jcr.Property;
 import javax.jcr.PropertyType;
@@ -185,13 +187,12 @@
      *
      * @param multipleValues flag indicating whether the property is about to
      *                       be set to an array of values
-     * @throws ValueFormatException if a single-valued property is set to an
-     *                              array of values (and vice versa)
-     * @throws VersionException if the parent node is not checked-out
-     * @throws LockException if the parent node is locked by somebody else
+     * @throws ValueFormatException         if a single-valued property is set to an
+     *                                      array of values (and vice versa)
+     * @throws VersionException             if the parent node is not checked-out
+     * @throws LockException                if the parent node is locked by somebody else
      * @throws ConstraintViolationException if the property is protected
-     * @throws RepositoryException if another error occurs
-     *
+     * @throws RepositoryException          if another error occurs
      * @see javax.jcr.Property#setValue
      */
     protected void checkSetValue(boolean multipleValues)
@@ -200,15 +201,13 @@
             RepositoryException {
         // verify that parent node is checked-out
         if (!((NodeImpl) getParent()).internalIsCheckedOut()) {
-            throw new VersionException(
-                    "cannot set the value of a property of a checked-in node "
+            throw new VersionException("cannot set the value of a property of a checked-in node "
                     + safeGetJCRPath());
         }
 
         // check protected flag
         if (definition.isProtected()) {
-            throw new ConstraintViolationException(
-                    "cannot set the value of a protected property "
+            throw new ConstraintViolationException("cannot set the value of a protected property "
                     + safeGetJCRPath());
         }
 
@@ -979,7 +978,7 @@
                     valueType = values[i].getType();
                 } else if (valueType != values[i].getType()) {
                     // inhomogeneous types
-                        String msg = "inhomogeneous type of values";
+                    String msg = "inhomogeneous type of values";
                     log.debug(msg);
                     throw new ValueFormatException(msg);
                 }

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/lock/LockManagerImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/lock/LockManagerImpl.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/lock/LockManagerImpl.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/lock/LockManagerImpl.java Thu Apr 28 06:06:58 2005
@@ -22,9 +22,10 @@
 import org.apache.jackrabbit.core.NodeImpl;
 import org.apache.jackrabbit.core.Path;
 import org.apache.jackrabbit.core.Constants;
-import org.apache.jackrabbit.core.InternalValue;
+import org.apache.jackrabbit.core.value.InternalValue;
 import org.apache.jackrabbit.core.NodeId;
 import org.apache.jackrabbit.core.MalformedPathException;
+import org.apache.jackrabbit.core.value.InternalValue;
 import org.apache.jackrabbit.core.observation.SynchronousEventListener;
 import org.apache.jackrabbit.core.observation.EventImpl;
 import org.apache.log4j.Logger;

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/EffectiveNodeType.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/EffectiveNodeType.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/EffectiveNodeType.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/EffectiveNodeType.java Thu Apr 28 06:06:58 2005
@@ -16,7 +16,7 @@
  */
 package org.apache.jackrabbit.core.nodetype;
 
-import org.apache.jackrabbit.core.InternalValue;
+import org.apache.jackrabbit.core.value.InternalValue;
 import org.apache.jackrabbit.core.QName;
 import org.apache.log4j.Logger;
 

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/NodeTypeImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/NodeTypeImpl.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/NodeTypeImpl.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/NodeTypeImpl.java Thu Apr 28 06:06:58 2005
@@ -18,11 +18,12 @@
 
 import org.apache.jackrabbit.core.BaseException;
 import org.apache.jackrabbit.core.IllegalNameException;
-import org.apache.jackrabbit.core.InternalValue;
+import org.apache.jackrabbit.core.value.InternalValue;
 import org.apache.jackrabbit.core.NamespaceResolver;
 import org.apache.jackrabbit.core.NoPrefixDeclaredException;
 import org.apache.jackrabbit.core.QName;
 import org.apache.jackrabbit.core.UnknownPrefixException;
+import org.apache.jackrabbit.core.value.InternalValue;
 import org.apache.log4j.Logger;
 
 import javax.jcr.PropertyType;

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/NodeTypeRegistry.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/NodeTypeRegistry.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/NodeTypeRegistry.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/NodeTypeRegistry.java Thu Apr 28 06:06:58 2005
@@ -18,8 +18,9 @@
 
 import org.apache.commons.collections.ReferenceMap;
 import org.apache.jackrabbit.core.Constants;
-import org.apache.jackrabbit.core.InternalValue;
+import org.apache.jackrabbit.core.value.InternalValue;
 import org.apache.jackrabbit.core.QName;
+import org.apache.jackrabbit.core.value.InternalValue;
 import org.apache.jackrabbit.core.fs.FileSystem;
 import org.apache.jackrabbit.core.fs.FileSystemException;
 import org.apache.jackrabbit.core.fs.FileSystemResource;

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/PropDef.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/PropDef.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/PropDef.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/PropDef.java Thu Apr 28 06:06:58 2005
@@ -16,7 +16,8 @@
  */
 package org.apache.jackrabbit.core.nodetype;
 
-import org.apache.jackrabbit.core.InternalValue;
+import org.apache.jackrabbit.core.value.InternalValue;
+import org.apache.jackrabbit.core.value.InternalValue;
 
 /**
  * <code>PropDef</code> is the internal representation of

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/PropDefImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/PropDefImpl.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/PropDefImpl.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/PropDefImpl.java Thu Apr 28 06:06:58 2005
@@ -16,8 +16,9 @@
  */
 package org.apache.jackrabbit.core.nodetype;
 
-import org.apache.jackrabbit.core.InternalValue;
+import org.apache.jackrabbit.core.value.InternalValue;
 import org.apache.jackrabbit.core.QName;
+import org.apache.jackrabbit.core.value.InternalValue;
 
 import javax.jcr.PropertyType;
 import java.util.Arrays;

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/PropertyDefinitionImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/PropertyDefinitionImpl.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/PropertyDefinitionImpl.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/PropertyDefinitionImpl.java Thu Apr 28 06:06:58 2005
@@ -16,8 +16,9 @@
  */
 package org.apache.jackrabbit.core.nodetype;
 
-import org.apache.jackrabbit.core.InternalValue;
+import org.apache.jackrabbit.core.value.InternalValue;
 import org.apache.jackrabbit.core.NamespaceResolver;
+import org.apache.jackrabbit.core.value.InternalValue;
 import org.apache.log4j.Logger;
 
 import javax.jcr.RepositoryException;

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/ValueConstraint.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/ValueConstraint.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/ValueConstraint.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/ValueConstraint.java Thu Apr 28 06:06:58 2005
@@ -16,18 +16,20 @@
  */
 package org.apache.jackrabbit.core.nodetype;
 
-import org.apache.jackrabbit.core.BLOBFileValue;
+import org.apache.jackrabbit.core.value.BLOBFileValue;
 import org.apache.jackrabbit.core.IllegalNameException;
-import org.apache.jackrabbit.core.InternalValue;
+import org.apache.jackrabbit.core.value.InternalValue;
 import org.apache.jackrabbit.core.MalformedPathException;
 import org.apache.jackrabbit.core.NamespaceResolver;
 import org.apache.jackrabbit.core.NoPrefixDeclaredException;
 import org.apache.jackrabbit.core.Path;
 import org.apache.jackrabbit.core.QName;
 import org.apache.jackrabbit.core.UnknownPrefixException;
+import org.apache.jackrabbit.core.value.DateValue;
+import org.apache.jackrabbit.core.value.InternalValue;
+import org.apache.jackrabbit.core.value.BLOBFileValue;
 import org.apache.log4j.Logger;
 
-import javax.jcr.DateValue;
 import javax.jcr.PropertyType;
 import javax.jcr.RepositoryException;
 import javax.jcr.ValueFormatException;
@@ -274,7 +276,7 @@
                 upperInclusive = s.equals("]");
                 if (lowerLimit == null && upperLimit == null) {
                     String msg = "'" + definition + "' is not a valid value constraint"
-                         + " format for numeric types: neither lower- nor upper-limit specified";
+                            + " format for numeric types: neither lower- nor upper-limit specified";
                     log.debug(msg);
                     throw new InvalidConstraintException(msg);
                 }

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/virtual/VirtualNodeTypeStateProvider.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/virtual/VirtualNodeTypeStateProvider.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/virtual/VirtualNodeTypeStateProvider.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/virtual/VirtualNodeTypeStateProvider.java Thu Apr 28 06:06:58 2005
@@ -16,7 +16,7 @@
  */
 package org.apache.jackrabbit.core.nodetype.virtual;
 
-import org.apache.jackrabbit.core.InternalValue;
+import org.apache.jackrabbit.core.value.InternalValue;
 import org.apache.jackrabbit.core.NodeId;
 import org.apache.jackrabbit.core.QName;
 import org.apache.jackrabbit.core.nodetype.ItemDef;

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeReader.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeReader.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeReader.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeReader.java Thu Apr 28 06:06:58 2005
@@ -25,10 +25,11 @@
 import javax.jcr.version.OnParentVersionAction;
 
 import org.apache.jackrabbit.core.IllegalNameException;
-import org.apache.jackrabbit.core.InternalValue;
+import org.apache.jackrabbit.core.value.InternalValue;
 import org.apache.jackrabbit.core.NamespaceResolver;
 import org.apache.jackrabbit.core.QName;
 import org.apache.jackrabbit.core.UnknownPrefixException;
+import org.apache.jackrabbit.core.value.InternalValue;
 import org.apache.jackrabbit.core.nodetype.NodeDef;
 import org.apache.jackrabbit.core.nodetype.InvalidConstraintException;
 import org.apache.jackrabbit.core.nodetype.InvalidNodeTypeDefException;

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeWriter.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeWriter.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeWriter.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeWriter.java Thu Apr 28 06:06:58 2005
@@ -25,7 +25,7 @@
 import javax.jcr.version.OnParentVersionAction;
 import javax.xml.parsers.ParserConfigurationException;
 
-import org.apache.jackrabbit.core.InternalValue;
+import org.apache.jackrabbit.core.value.InternalValue;
 import org.apache.jackrabbit.core.NamespaceResolver;
 import org.apache.jackrabbit.core.NoPrefixDeclaredException;
 import org.apache.jackrabbit.core.QName;

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/TextPlainTextFilter.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/TextPlainTextFilter.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/TextPlainTextFilter.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/TextPlainTextFilter.java Thu Apr 28 06:06:58 2005
@@ -17,8 +17,10 @@
 package org.apache.jackrabbit.core.query;
 
 import org.apache.jackrabbit.core.state.PropertyState;
-import org.apache.jackrabbit.core.InternalValue;
-import org.apache.jackrabbit.core.BLOBFileValue;
+import org.apache.jackrabbit.core.value.InternalValue;
+import org.apache.jackrabbit.core.value.BLOBFileValue;
+import org.apache.jackrabbit.core.value.InternalValue;
+import org.apache.jackrabbit.core.value.BLOBFileValue;
 import org.apache.jackrabbit.core.query.lucene.FieldNames;
 
 import javax.jcr.RepositoryException;

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/lucene/LuceneQueryBuilder.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/lucene/LuceneQueryBuilder.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/lucene/LuceneQueryBuilder.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/lucene/LuceneQueryBuilder.java Thu Apr 28 06:06:58 2005
@@ -23,8 +23,8 @@
 import org.apache.jackrabbit.core.QName;
 import org.apache.jackrabbit.core.SessionImpl;
 import org.apache.jackrabbit.core.UnknownPrefixException;
-import org.apache.jackrabbit.core.state.ItemStateManager;
 import org.apache.jackrabbit.core.query.AndQueryNode;
+import org.apache.jackrabbit.core.query.DerefQueryNode;
 import org.apache.jackrabbit.core.query.ExactQueryNode;
 import org.apache.jackrabbit.core.query.LocationStepQueryNode;
 import org.apache.jackrabbit.core.query.NodeTypeQueryNode;
@@ -34,12 +34,13 @@
 import org.apache.jackrabbit.core.query.PathQueryNode;
 import org.apache.jackrabbit.core.query.PropertyTypeRegistry;
 import org.apache.jackrabbit.core.query.QueryConstants;
+import org.apache.jackrabbit.core.query.QueryNode;
 import org.apache.jackrabbit.core.query.QueryNodeVisitor;
 import org.apache.jackrabbit.core.query.QueryRootNode;
 import org.apache.jackrabbit.core.query.RelationQueryNode;
 import org.apache.jackrabbit.core.query.TextsearchQueryNode;
-import org.apache.jackrabbit.core.query.QueryNode;
-import org.apache.jackrabbit.core.query.DerefQueryNode;
+import org.apache.jackrabbit.core.state.ItemStateManager;
+import org.apache.jackrabbit.core.util.ISO8601;
 import org.apache.log4j.Logger;
 import org.apache.lucene.analysis.Analyzer;
 import org.apache.lucene.index.Term;
@@ -56,7 +57,6 @@
 import javax.jcr.nodetype.NodeTypeIterator;
 import javax.jcr.nodetype.NodeTypeManager;
 import javax.jcr.query.InvalidQueryException;
-import javax.jcr.util.ISO8601;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Calendar;
@@ -124,12 +124,12 @@
     /**
      * Creates a new <code>LuceneQueryBuilder</code> instance.
      *
-     * @param root       the root node of the abstract query tree.
-     * @param session    of the user executing this query.
+     * @param root          the root node of the abstract query tree.
+     * @param session       of the user executing this query.
      * @param sharedItemMgr the shared item state manager of the workspace.
-     * @param nsMappings namespace resolver for internal prefixes.
-     * @param analyzer   for parsing the query statement of the contains function.
-     * @param propReg    the property type registry.
+     * @param nsMappings    namespace resolver for internal prefixes.
+     * @param analyzer      for parsing the query statement of the contains function.
+     * @param propReg       the property type registry.
      */
     private LuceneQueryBuilder(QueryRootNode root,
                                SessionImpl session,
@@ -149,12 +149,12 @@
      * Creates a lucene {@link org.apache.lucene.search.Query} tree from an
      * abstract query tree.
      *
-     * @param root       the root node of the abstract query tree.
-     * @param session    of the user executing the query.
+     * @param root          the root node of the abstract query tree.
+     * @param session       of the user executing the query.
      * @param sharedItemMgr the shared item state manager of the workspace.
-     * @param nsMappings namespace resolver for internal prefixes.
-     * @param analyzer   for parsing the query statement of the contains function.
-     * @param propReg    the property type registry to lookup type information.
+     * @param nsMappings    namespace resolver for internal prefixes.
+     * @param analyzer      for parsing the query statement of the contains function.
+     * @param propReg       the property type registry to lookup type information.
      * @return the lucene query tree.
      * @throws RepositoryException if an error occurs during the translation.
      */
@@ -675,7 +675,8 @@
      * Wraps a constraint query around <code>q</code> that limits the nodes to
      * those where <code>propName</code> is the name of a single value property
      * on the node instance.
-     * @param q the query to wrap.
+     *
+     * @param q        the query to wrap.
      * @param propName the name of a property that only has one value.
      * @return the wrapped query <code>q</code>.
      */

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/lucene/NodeIndexer.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/lucene/NodeIndexer.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/lucene/NodeIndexer.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/lucene/NodeIndexer.java Thu Apr 28 06:06:58 2005
@@ -26,10 +26,11 @@
 import org.apache.jackrabbit.core.NodeId;
 import org.apache.jackrabbit.core.NoPrefixDeclaredException;
 import org.apache.jackrabbit.core.PropertyId;
-import org.apache.jackrabbit.core.InternalValue;
+import org.apache.jackrabbit.core.value.InternalValue;
 import org.apache.jackrabbit.core.QName;
 import org.apache.jackrabbit.core.Path;
 import org.apache.jackrabbit.core.Constants;
+import org.apache.jackrabbit.core.value.InternalValue;
 import org.apache.jackrabbit.core.query.TextFilterService;
 import org.apache.log4j.Logger;
 

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/lucene/RowIteratorImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/lucene/RowIteratorImpl.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/lucene/RowIteratorImpl.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/lucene/RowIteratorImpl.java Thu Apr 28 06:06:58 2005
@@ -16,28 +16,28 @@
  */
 package org.apache.jackrabbit.core.query.lucene;
 
-import org.apache.jackrabbit.core.QName;
+import org.apache.jackrabbit.core.IllegalNameException;
 import org.apache.jackrabbit.core.NamespaceResolver;
 import org.apache.jackrabbit.core.NodeImpl;
 import org.apache.jackrabbit.core.PropertyImpl;
-import org.apache.jackrabbit.core.IllegalNameException;
+import org.apache.jackrabbit.core.QName;
 import org.apache.jackrabbit.core.UnknownPrefixException;
 import org.apache.jackrabbit.core.query.QueryConstants;
+import org.apache.jackrabbit.core.value.LongValue;
+import org.apache.jackrabbit.core.value.PathValue;
+import org.apache.jackrabbit.core.value.StringValue;
 
-import javax.jcr.query.RowIterator;
-import javax.jcr.query.Row;
-import javax.jcr.Value;
-import javax.jcr.RepositoryException;
 import javax.jcr.ItemNotFoundException;
-import javax.jcr.PathValue;
-import javax.jcr.LongValue;
-import javax.jcr.PropertyType;
-import javax.jcr.StringValue;
 import javax.jcr.Property;
+import javax.jcr.PropertyType;
+import javax.jcr.RepositoryException;
+import javax.jcr.Value;
+import javax.jcr.query.Row;
+import javax.jcr.query.RowIterator;
 import java.util.Arrays;
+import java.util.HashSet;
 import java.util.NoSuchElementException;
 import java.util.Set;
-import java.util.HashSet;
 
 /**
  * Implements the {@link javax.jcr.query.RowIterator} interface returned by
@@ -45,23 +45,30 @@
  */
 class RowIteratorImpl implements RowIterator {
 
-    /** Iterator over nodes, that constitute the result set. */
+    /**
+     * Iterator over nodes, that constitute the result set.
+     */
     private final NodeIteratorImpl nodes;
 
-    /** Array of select property names */
+    /**
+     * Array of select property names
+     */
     private final QName[] properties;
 
-    /** The <code>NamespaceResolver</code> of the user <code>Session</code>. */
+    /**
+     * The <code>NamespaceResolver</code> of the user <code>Session</code>.
+     */
     private final NamespaceResolver resolver;
 
     /**
      * Creates a new <code>RowIteratorImpl</code> that iterates over the result
      * nodes.
-     * @param nodes a <code>NodeIteratorImpl</code> that contains the nodes of
-     * the query result.
+     *
+     * @param nodes      a <code>NodeIteratorImpl</code> that contains the nodes of
+     *                   the query result.
      * @param properties <code>QName</code> of the select properties.
-     * @param resolver <code>NamespaceResolver</code> of the user
-     *   <code>Session</code>.
+     * @param resolver   <code>NamespaceResolver</code> of the user
+     *                   <code>Session</code>.
      */
     RowIteratorImpl(NodeIteratorImpl nodes, QName[] properties, NamespaceResolver resolver) {
         this.nodes = nodes;
@@ -75,7 +82,7 @@
      * @return the next <code>Row</code> in the iteration.
      * @throws NoSuchElementException if iteration has no more
      *                                <code>Row</code>s.
-    */
+     */
     public Row nextRow() throws NoSuchElementException {
         return new RowImpl(nodes.getScore(), nodes.nextNodeImpl());
     }
@@ -93,6 +100,7 @@
 
     /**
      * Returns the number of <code>Row</code>s in this iterator.
+     *
      * @return the number of <code>Row</code>s in this iterator.
      */
     public long getSize() {
@@ -136,7 +144,7 @@
      *
      * @return the next <code>Row</code> in the iteration.
      * @throws NoSuchElementException if iteration has no more <code>Row</code>s.
-    */
+     */
     public Object next() throws NoSuchElementException {
         return nextRow();
     }
@@ -149,22 +157,31 @@
      */
     class RowImpl implements Row {
 
-        /** The score for this result row */
+        /**
+         * The score for this result row
+         */
         private final float score;
 
-        /** The underlying <code>Node</code> of this result row. */
+        /**
+         * The underlying <code>Node</code> of this result row.
+         */
         private final NodeImpl node;
 
-        /** Cached value array for returned by {@link #getValues()}. */
+        /**
+         * Cached value array for returned by {@link #getValues()}.
+         */
         private Value[] values;
 
-        /** Set of select property <code>QName</code>s. */
+        /**
+         * Set of select property <code>QName</code>s.
+         */
         private Set propertySet;
 
         /**
          * Creates a new <code>RowImpl</code> instance based on <code>node</code>.
+         *
          * @param score the score value for this result row
-         * @param node the underlying <code>Node</code> for this <code>Row</code>.
+         * @param node  the underlying <code>Node</code> for this <code>Row</code>.
          */
         RowImpl(float score, NodeImpl node) {
             this.score = score;
@@ -178,7 +195,7 @@
          *
          * @return a <code>Value</code> array.
          * @throws RepositoryException if an error occurs while retrieving the
-         *  values from the <code>Node</code>.
+         *                             values from the <code>Node</code>.
          */
         public Value[] getValues() throws RepositoryException {
             if (values == null) {
@@ -223,9 +240,9 @@
          *
          * @return a <code>Value</code>
          * @throws ItemNotFoundException if <code>propertyName</code> is not
-         * among the column names of the query result table.
-         * @throws RepositoryException if <code>propertyName</code> is not a
-         *  valid property name.
+         *                               among the column names of the query result table.
+         * @throws RepositoryException   if <code>propertyName</code> is not a
+         *                               valid property name.
          */
         public Value getValue(String propertyName) throws ItemNotFoundException, RepositoryException {
             if (propertySet == null) {

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/sql/JCRSQLQueryBuilder.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/sql/JCRSQLQueryBuilder.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/sql/JCRSQLQueryBuilder.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/sql/JCRSQLQueryBuilder.java Thu Apr 28 06:06:58 2005
@@ -16,43 +16,45 @@
  */
 package org.apache.jackrabbit.core.query.sql;
 
-import org.apache.jackrabbit.core.query.QueryRootNode;
+import org.apache.jackrabbit.core.Constants;
+import org.apache.jackrabbit.core.IllegalNameException;
+import org.apache.jackrabbit.core.NamespaceResolver;
+import org.apache.jackrabbit.core.QName;
+import org.apache.jackrabbit.core.UnknownPrefixException;
 import org.apache.jackrabbit.core.query.AndQueryNode;
-import org.apache.jackrabbit.core.query.NodeTypeQueryNode;
+import org.apache.jackrabbit.core.query.LocationStepQueryNode;
 import org.apache.jackrabbit.core.query.NAryQueryNode;
-import org.apache.jackrabbit.core.query.OrQueryNode;
+import org.apache.jackrabbit.core.query.NodeTypeQueryNode;
 import org.apache.jackrabbit.core.query.NotQueryNode;
+import org.apache.jackrabbit.core.query.OrQueryNode;
 import org.apache.jackrabbit.core.query.OrderQueryNode;
-import org.apache.jackrabbit.core.query.RelationQueryNode;
+import org.apache.jackrabbit.core.query.PathQueryNode;
 import org.apache.jackrabbit.core.query.QueryConstants;
 import org.apache.jackrabbit.core.query.QueryNode;
+import org.apache.jackrabbit.core.query.QueryRootNode;
+import org.apache.jackrabbit.core.query.RelationQueryNode;
 import org.apache.jackrabbit.core.query.TextsearchQueryNode;
-import org.apache.jackrabbit.core.query.PathQueryNode;
-import org.apache.jackrabbit.core.query.LocationStepQueryNode;
-import org.apache.jackrabbit.core.NamespaceResolver;
-import org.apache.jackrabbit.core.QName;
-import org.apache.jackrabbit.core.IllegalNameException;
-import org.apache.jackrabbit.core.UnknownPrefixException;
-import org.apache.jackrabbit.core.Constants;
+import org.apache.jackrabbit.core.util.ISO8601;
 import org.apache.log4j.Logger;
 
 import javax.jcr.query.InvalidQueryException;
-import javax.jcr.util.ISO8601;
-import java.util.Date;
-import java.util.Calendar;
-import java.util.List;
+import java.text.SimpleDateFormat;
 import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Calendar;
+import java.util.Date;
 import java.util.Iterator;
+import java.util.List;
 import java.util.NoSuchElementException;
-import java.util.Arrays;
-import java.text.SimpleDateFormat;
 
 /**
  * Implements the query builder for the JCR SQL syntax.
  */
 public class JCRSQLQueryBuilder implements JCRSQLParserVisitor {
 
-    /** logger instance for this class */
+    /**
+     * logger instance for this class
+     */
     private static final Logger log = Logger.getLogger(JCRSQLQueryBuilder.class);
 
     /**
@@ -61,26 +63,37 @@
      */
     private static final String DATE_PATTERN = "yyyy-MM-dd";
 
-    /** The root node of the sql query syntax tree */
+    /**
+     * The root node of the sql query syntax tree
+     */
     private final ASTQuery stmt;
 
-    /** The root query node */
+    /**
+     * The root query node
+     */
     private QueryRootNode root;
 
-    /** To resolve QNames */
+    /**
+     * To resolve QNames
+     */
     private NamespaceResolver resolver;
 
-    /** Query node to gather the constraints defined in the WHERE clause */
+    /**
+     * Query node to gather the constraints defined in the WHERE clause
+     */
     private final AndQueryNode constraintNode = new AndQueryNode(null);
 
-    /** List of PathQueryNode constraints that need to be merged */
+    /**
+     * List of PathQueryNode constraints that need to be merged
+     */
     private final List pathConstraints = new ArrayList();
 
     /**
      * Creates a new <code>JCRSQLQueryBuilder</code>.
+     *
      * @param statement the root node of the SQL syntax tree.
-     * @param resolver a namespace resolver to use for names in the
-     *   <code>statement</code>.
+     * @param resolver  a namespace resolver to use for names in the
+     *                  <code>statement</code>.
      */
     private JCRSQLQueryBuilder(ASTQuery statement, NamespaceResolver resolver) {
         this.stmt = statement;
@@ -89,8 +102,9 @@
 
     /**
      * Creates a <code>QueryNode</code> tree from a SQL <code>statement</code>.
+     *
      * @param statement the SQL statement.
-     * @param resolver the namespace resolver to use.
+     * @param resolver  the namespace resolver to use.
      * @return the <code>QueryNode</code> tree.
      * @throws InvalidQueryException if <code>statement</code> is malformed.
      */
@@ -108,11 +122,12 @@
 
     /**
      * Creates a String representation of the query node tree in SQL syntax.
-     * @param root the root of the query node tree.
+     *
+     * @param root     the root of the query node tree.
      * @param resolver to resolve QNames.
      * @return a String representation of the query node tree.
      * @throws InvalidQueryException if the query node tree cannot be converted
-     *   into a String representation due to restrictions in SQL.
+     *                               into a String representation due to restrictions in SQL.
      */
     public static String toString(QueryRootNode root, NamespaceResolver resolver)
             throws InvalidQueryException {
@@ -122,6 +137,7 @@
     /**
      * Parses the statement and returns the root node of the <code>QueryNode</code>
      * tree.
+     *
      * @return the root node of the <code>QueryNode</code> tree.
      */
     private QueryRootNode getRootNode() {
@@ -428,13 +444,14 @@
 
     /**
      * Creates a new {@link org.apache.jackrabbit.core.query.RelationQueryNode}.
-     * @param parent the parent node for the created <code>RelationQueryNode</code>.
-     * @param propertyName the property name for the relation.
+     *
+     * @param parent        the parent node for the created <code>RelationQueryNode</code>.
+     * @param propertyName  the property name for the relation.
      * @param operationType the operation type.
-     * @param literal the literal value for the relation.
+     * @param literal       the literal value for the relation.
      * @return a <code>RelationQueryNode</code>.
      * @throws IllegalArgumentException if the literal value does not conform
-     * to its type. E.g. a malformed String representation of a date.
+     *                                  to its type. E.g. a malformed String representation of a date.
      */
     private RelationQueryNode createRelationQueryNode(QueryNode parent,
                                                       QName propertyName,
@@ -476,7 +493,8 @@
 
     /**
      * Creates <code>LocationStepQueryNode</code>s from a <code>path</code>.
-     * @param path the path pattern
+     *
+     * @param path      the path pattern
      * @param operation the type of the parent node
      */
     private void createPathQuery(String path, int operation) {
@@ -555,9 +573,10 @@
     /**
      * Translates a pattern using the escape character <code>from</code> into
      * a pattern using the escape character <code>to</code>.
+     *
      * @param pattern the pattern to translate
-     * @param from the currently used escape character.
-     * @param to the new escape character to use.
+     * @param from    the currently used escape character.
+     * @param to      the new escape character to use.
      * @return the new pattern using the escape character <code>to</code>.
      */
     private static String translateEscaping(String pattern, char from, char to) {
@@ -621,7 +640,9 @@
      */
     private static class MergingPathQueryNode extends PathQueryNode {
 
-        /** The operation type of the parent node */
+        /**
+         * The operation type of the parent node
+         */
         private int operation;
 
         /**
@@ -630,6 +651,7 @@
          * {@link org.apache.jackrabbit.core.query.QueryNode#TYPE_OR},
          * {@link org.apache.jackrabbit.core.query.QueryNode#TYPE_AND} or
          * {@link org.apache.jackrabbit.core.query.QueryNode#TYPE_NOT}.
+         *
          * @param operation the operation type of the parent node.
          */
         MergingPathQueryNode(int operation) {
@@ -643,6 +665,7 @@
         /**
          * Merges this node with a node from <code>nodes</code>. If a merge
          * is not possible an NoSuchElementException is thrown.
+         *
          * @param nodes the nodes to try to merge with.
          * @return the merged array containing a merged version of this node.
          */
@@ -782,8 +805,9 @@
         /**
          * Returns <code>true</code> if this node needs merging; <code>false</code>
          * otherwise.
+         *
          * @return <code>true</code> if this node needs merging; <code>false</code>
-         * otherwise.
+         *         otherwise.
          */
         boolean needsMerge() {
             for (Iterator it = operands.iterator(); it.hasNext();) {

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/sql/QueryFormat.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/sql/QueryFormat.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/sql/QueryFormat.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/sql/QueryFormat.java Thu Apr 28 06:06:58 2005
@@ -16,49 +16,57 @@
  */
 package org.apache.jackrabbit.core.query.sql;
 
-import org.apache.jackrabbit.core.query.QueryNodeVisitor;
-import org.apache.jackrabbit.core.query.QueryRootNode;
-import org.apache.jackrabbit.core.query.OrQueryNode;
+import org.apache.jackrabbit.core.Constants;
+import org.apache.jackrabbit.core.NamespaceResolver;
+import org.apache.jackrabbit.core.NoPrefixDeclaredException;
+import org.apache.jackrabbit.core.QName;
 import org.apache.jackrabbit.core.query.AndQueryNode;
-import org.apache.jackrabbit.core.query.NotQueryNode;
+import org.apache.jackrabbit.core.query.DerefQueryNode;
 import org.apache.jackrabbit.core.query.ExactQueryNode;
-import org.apache.jackrabbit.core.query.NodeTypeQueryNode;
-import org.apache.jackrabbit.core.query.TextsearchQueryNode;
-import org.apache.jackrabbit.core.query.PathQueryNode;
 import org.apache.jackrabbit.core.query.LocationStepQueryNode;
-import org.apache.jackrabbit.core.query.RelationQueryNode;
+import org.apache.jackrabbit.core.query.NodeTypeQueryNode;
+import org.apache.jackrabbit.core.query.NotQueryNode;
+import org.apache.jackrabbit.core.query.OrQueryNode;
 import org.apache.jackrabbit.core.query.OrderQueryNode;
-import org.apache.jackrabbit.core.query.QueryNode;
+import org.apache.jackrabbit.core.query.PathQueryNode;
 import org.apache.jackrabbit.core.query.QueryConstants;
-import org.apache.jackrabbit.core.query.DerefQueryNode;
-import org.apache.jackrabbit.core.NamespaceResolver;
-import org.apache.jackrabbit.core.NoPrefixDeclaredException;
-import org.apache.jackrabbit.core.QName;
-import org.apache.jackrabbit.core.Constants;
+import org.apache.jackrabbit.core.query.QueryNode;
+import org.apache.jackrabbit.core.query.QueryNodeVisitor;
+import org.apache.jackrabbit.core.query.QueryRootNode;
+import org.apache.jackrabbit.core.query.RelationQueryNode;
+import org.apache.jackrabbit.core.query.TextsearchQueryNode;
+import org.apache.jackrabbit.core.util.ISO8601;
 
 import javax.jcr.query.InvalidQueryException;
-import javax.jcr.util.ISO8601;
-import java.util.Calendar;
-import java.util.TimeZone;
 import java.util.ArrayList;
-import java.util.List;
+import java.util.Calendar;
 import java.util.Iterator;
+import java.util.List;
+import java.util.TimeZone;
 
 /**
  * Implements the query node tree serialization into a String.
  */
 class QueryFormat implements QueryNodeVisitor, QueryConstants {
 
-    /** Will be used to resolve QNames */
+    /**
+     * Will be used to resolve QNames
+     */
     private final NamespaceResolver resolver;
 
-    /** The String representation of the query node tree */
+    /**
+     * The String representation of the query node tree
+     */
     private String statement;
 
-    /** List of exception objects created while creating the SQL string */
+    /**
+     * List of exception objects created while creating the SQL string
+     */
     private List exceptions = new ArrayList();
 
-    /** List of node types */
+    /**
+     * List of node types
+     */
     private List nodeTypes = new ArrayList();
 
     private QueryFormat(QueryRootNode root, NamespaceResolver resolver)
@@ -74,11 +82,12 @@
     /**
      * Creates a SQL <code>String</code> representation of the QueryNode tree
      * argument <code>root</code>.
-     * @param root the query node tree.
+     *
+     * @param root     the query node tree.
      * @param resolver to resolve QNames.
      * @return the SQL string representation of the QueryNode tree.
      * @throws InvalidQueryException the query node tree cannot be represented
-     *   as a SQL <code>String</code>.
+     *                               as a SQL <code>String</code>.
      */
     public static String toString(QueryRootNode root, NamespaceResolver resolver)
             throws InvalidQueryException {
@@ -87,6 +96,7 @@
 
     /**
      * Returns the string representation.
+     *
      * @return the string representation.
      */
     public String toString() {
@@ -228,8 +238,8 @@
         StringBuffer sb = (StringBuffer) data;
         QueryNode[] operands = node.getOperands();
         if (operands.length > 0) {
-                sb.append("NOT ");
-                operands[0].accept(this, sb);
+            sb.append("NOT ");
+            operands[0].accept(this, sb);
         }
         return sb;
     }
@@ -450,11 +460,12 @@
      * <code>b</code> using the <code>NamespaceResolver</code>
      * <code>resolver</code>. The <code>name</code> is put in double quotes
      * if the local part of <code>name</code> contains a space character.
-     * @param name the <code>QName</code> to print.
+     *
+     * @param name     the <code>QName</code> to print.
      * @param resolver to resolve <code>name</code>.
-     * @param b where to output the <code>name</code>.
+     * @param b        where to output the <code>name</code>.
      * @throws NoPrefixDeclaredException if <code>name</code> contains a uri
-     *   that is not declared in <code>resolver</code>.
+     *                                   that is not declared in <code>resolver</code>.
      */
     private static void appendName(QName name,
                                    NamespaceResolver resolver,
@@ -491,9 +502,10 @@
      * Returns <code>true</code> if <code>path</code> contains exactly one
      * step with a descendant-or-self axis and an explicit name test; returns
      * <code>false</code> otherwise.
+     *
      * @param path the path node.
      * @return <code>true</code> if <code>path</code> contains exactly one
-     * step with a descendant-or-self axis.
+     *         step with a descendant-or-self axis.
      */
     private static boolean containsDescendantOrSelf(PathQueryNode path) {
         LocationStepQueryNode[] steps = path.getPathSteps();
@@ -511,6 +523,7 @@
      * location step which matches all node names. That is, matches any children
      * of a given node. That location step must be the last one in the sequence
      * of location steps.
+     *
      * @param path the path node.
      * @return <code>true</code> if the last step matches any node name.
      */

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/xpath/QueryFormat.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/xpath/QueryFormat.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/xpath/QueryFormat.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/xpath/QueryFormat.java Thu Apr 28 06:06:58 2005
@@ -21,6 +21,7 @@
 import org.apache.jackrabbit.core.NoPrefixDeclaredException;
 import org.apache.jackrabbit.core.QName;
 import org.apache.jackrabbit.core.query.AndQueryNode;
+import org.apache.jackrabbit.core.query.DerefQueryNode;
 import org.apache.jackrabbit.core.query.ExactQueryNode;
 import org.apache.jackrabbit.core.query.LocationStepQueryNode;
 import org.apache.jackrabbit.core.query.NodeTypeQueryNode;
@@ -34,11 +35,10 @@
 import org.apache.jackrabbit.core.query.QueryRootNode;
 import org.apache.jackrabbit.core.query.RelationQueryNode;
 import org.apache.jackrabbit.core.query.TextsearchQueryNode;
-import org.apache.jackrabbit.core.query.DerefQueryNode;
+import org.apache.jackrabbit.core.util.ISO8601;
 import org.apache.jackrabbit.core.util.ISO9075;
 
 import javax.jcr.query.InvalidQueryException;
-import javax.jcr.util.ISO8601;
 import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.List;

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/xpath/XPathQueryBuilder.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/xpath/XPathQueryBuilder.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/xpath/XPathQueryBuilder.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/xpath/XPathQueryBuilder.java Thu Apr 28 06:06:58 2005
@@ -24,6 +24,7 @@
 import org.apache.jackrabbit.core.SearchManager;
 import org.apache.jackrabbit.core.UnknownPrefixException;
 import org.apache.jackrabbit.core.query.AndQueryNode;
+import org.apache.jackrabbit.core.query.DerefQueryNode;
 import org.apache.jackrabbit.core.query.LocationStepQueryNode;
 import org.apache.jackrabbit.core.query.NAryQueryNode;
 import org.apache.jackrabbit.core.query.NodeTypeQueryNode;
@@ -31,16 +32,15 @@
 import org.apache.jackrabbit.core.query.OrQueryNode;
 import org.apache.jackrabbit.core.query.OrderQueryNode;
 import org.apache.jackrabbit.core.query.PathQueryNode;
+import org.apache.jackrabbit.core.query.QueryConstants;
 import org.apache.jackrabbit.core.query.QueryNode;
 import org.apache.jackrabbit.core.query.QueryRootNode;
 import org.apache.jackrabbit.core.query.RelationQueryNode;
 import org.apache.jackrabbit.core.query.TextsearchQueryNode;
-import org.apache.jackrabbit.core.query.QueryConstants;
-import org.apache.jackrabbit.core.query.DerefQueryNode;
+import org.apache.jackrabbit.core.util.ISO8601;
 import org.apache.jackrabbit.core.util.ISO9075;
 
 import javax.jcr.query.InvalidQueryException;
-import javax.jcr.util.ISO8601;
 import java.io.StringReader;
 import java.util.ArrayList;
 import java.util.Calendar;

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/PropertyState.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/PropertyState.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/PropertyState.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/PropertyState.java Thu Apr 28 06:06:58 2005
@@ -16,10 +16,12 @@
  */
 package org.apache.jackrabbit.core.state;
 
-import org.apache.jackrabbit.core.BLOBFileValue;
-import org.apache.jackrabbit.core.InternalValue;
+import org.apache.jackrabbit.core.value.BLOBFileValue;
+import org.apache.jackrabbit.core.value.InternalValue;
 import org.apache.jackrabbit.core.PropertyId;
 import org.apache.jackrabbit.core.QName;
+import org.apache.jackrabbit.core.value.InternalValue;
+import org.apache.jackrabbit.core.value.BLOBFileValue;
 import org.apache.jackrabbit.core.nodetype.PropDefId;
 import org.apache.jackrabbit.core.util.Base64;
 

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/SharedItemStateManager.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/SharedItemStateManager.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/SharedItemStateManager.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/SharedItemStateManager.java Thu Apr 28 06:06:58 2005
@@ -17,7 +17,7 @@
 package org.apache.jackrabbit.core.state;
 
 import org.apache.jackrabbit.core.Constants;
-import org.apache.jackrabbit.core.InternalValue;
+import org.apache.jackrabbit.core.value.InternalValue;
 import org.apache.jackrabbit.core.ItemId;
 import org.apache.jackrabbit.core.NodeId;
 import org.apache.jackrabbit.core.PropertyId;

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/mem/InMemPersistenceManager.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/mem/InMemPersistenceManager.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/mem/InMemPersistenceManager.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/mem/InMemPersistenceManager.java Thu Apr 28 06:06:58 2005
@@ -16,8 +16,9 @@
  */
 package org.apache.jackrabbit.core.state.mem;
 
-import org.apache.jackrabbit.core.BLOBFileValue;
-import org.apache.jackrabbit.core.InternalValue;
+import org.apache.jackrabbit.core.value.BLOBFileValue;
+import org.apache.jackrabbit.core.value.InternalValue;
+import org.apache.jackrabbit.core.value.BLOBFileValue;
 import org.apache.jackrabbit.core.ItemId;
 import org.apache.jackrabbit.core.NodeId;
 import org.apache.jackrabbit.core.PropertyId;

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/obj/ObjectPersistenceManager.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/obj/ObjectPersistenceManager.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/obj/ObjectPersistenceManager.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/obj/ObjectPersistenceManager.java Thu Apr 28 06:06:58 2005
@@ -16,8 +16,9 @@
  */
 package org.apache.jackrabbit.core.state.obj;
 
-import org.apache.jackrabbit.core.BLOBFileValue;
-import org.apache.jackrabbit.core.InternalValue;
+import org.apache.jackrabbit.core.value.BLOBFileValue;
+import org.apache.jackrabbit.core.value.InternalValue;
+import org.apache.jackrabbit.core.value.BLOBFileValue;
 import org.apache.jackrabbit.core.NodeId;
 import org.apache.jackrabbit.core.PropertyId;
 import org.apache.jackrabbit.core.QName;

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/xml/XMLPersistenceManager.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/xml/XMLPersistenceManager.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/xml/XMLPersistenceManager.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/xml/XMLPersistenceManager.java Thu Apr 28 06:06:58 2005
@@ -16,11 +16,13 @@
  */
 package org.apache.jackrabbit.core.state.xml;
 
-import org.apache.jackrabbit.core.BLOBFileValue;
-import org.apache.jackrabbit.core.InternalValue;
+import org.apache.jackrabbit.core.value.BLOBFileValue;
+import org.apache.jackrabbit.core.value.InternalValue;
 import org.apache.jackrabbit.core.NodeId;
 import org.apache.jackrabbit.core.PropertyId;
 import org.apache.jackrabbit.core.QName;
+import org.apache.jackrabbit.core.value.InternalValue;
+import org.apache.jackrabbit.core.value.BLOBFileValue;
 import org.apache.jackrabbit.core.fs.BasedFileSystem;
 import org.apache.jackrabbit.core.fs.FileSystem;
 import org.apache.jackrabbit.core.fs.FileSystemException;

Added: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/util/ISO8601.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/util/ISO8601.java?rev=165135&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/util/ISO8601.java (added)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/util/ISO8601.java Thu Apr 28 06:06:58 2005
@@ -0,0 +1,275 @@
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ *                     as applicable.
+ *
+ * Licensed 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.core.util;
+
+import java.text.DecimalFormat;
+import java.util.Calendar;
+import java.util.GregorianCalendar;
+import java.util.TimeZone;
+
+/**
+ * The <code>ISO8601</code> utility class provides helper methods
+ * to deal with date/time formatting using a specific ISO8601-compliant
+ * format (see <a href="http://www.w3.org/TR/NOTE-datetime">ISO 8601</a>).
+ * <p/>
+ * The currently supported format is:
+ * <pre>
+ *   &plusmn;YYYY-MM-DDThh:mm:ss.SSSTZD
+ * </pre>
+ * where:
+ * <pre>
+ *   &plusmn;YYYY = four-digit year with optional sign where values <= 0 are
+ *           denoting years BCE and values > 0 are denoting years CE,
+ *           e.g. -0001 denotes the year 2 BCE, 0000 denotes the year 1 BCE,
+ *           0001 denotes the year 1 CE, and so on...
+ *   MM    = two-digit month (01=January, etc.)
+ *   DD    = two-digit day of month (01 through 31)
+ *   hh    = two digits of hour (00 through 23) (am/pm NOT allowed)
+ *   mm    = two digits of minute (00 through 59)
+ *   ss    = two digits of second (00 through 59)
+ *   SSS   = three digits of milliseconds (000 through 999)
+ *   TZD   = time zone designator, Z for Zulu (i.e. UTC) or an offset from UTC
+ *           in the form of +hh:mm or -hh:mm
+ * </pre>
+ */
+public final class ISO8601 {
+    /**
+     * misc. numeric formats used in formatting
+     */
+    private static final DecimalFormat XX_FORMAT = new DecimalFormat("00");
+    private static final DecimalFormat XXX_FORMAT = new DecimalFormat("000");
+    private static final DecimalFormat XXXX_FORMAT = new DecimalFormat("0000");
+
+    /**
+     * Parses an ISO8601-compliant date/time string.
+     *
+     * @param text the date/time string to be parsed
+     * @return a <code>Calendar</code>, or <code>null</code> if the input could
+     *         not be parsed
+     * @throws IllegalArgumentException if a <code>null</code> argument is passed
+     */
+    public static Calendar parse(String text) {
+        if (text == null) {
+            throw new IllegalArgumentException("argument can not be null");
+        }
+
+        // check optional leading sign
+        char sign;
+        int start;
+        if (text.startsWith("-")) {
+            sign = '-';
+            start = 1;
+        } else if (text.startsWith("+")) {
+            sign = '+';
+            start = 1;
+        } else {
+            sign = '+'; // no sign specified, implied '+'
+            start = 0;
+        }
+
+        /**
+         * the expected format of the remainder of the string is:
+         * YYYY-MM-DDThh:mm:ss.SSSTZD
+         *
+         * note that we cannot use java.text.SimpleDateFormat for
+         * parsing because it can't handle years <= 0 and TZD's
+         */
+
+        int year, month, day, hour, min, sec, ms;
+        String tzID;
+        try {
+            // year (YYYY)
+            year = Integer.parseInt(text.substring(start, start + 4));
+            start += 4;
+            // delimiter '-'
+            if (text.charAt(start) != '-') {
+                return null;
+            }
+            start++;
+            // month (MM)
+            month = Integer.parseInt(text.substring(start, start + 2));
+            start += 2;
+            // delimiter '-'
+            if (text.charAt(start) != '-') {
+                return null;
+            }
+            start++;
+            // day (DD)
+            day = Integer.parseInt(text.substring(start, start + 2));
+            start += 2;
+            // delimiter 'T'
+            if (text.charAt(start) != 'T') {
+                return null;
+            }
+            start++;
+            // hour (hh)
+            hour = Integer.parseInt(text.substring(start, start + 2));
+            start += 2;
+            // delimiter ':'
+            if (text.charAt(start) != ':') {
+                return null;
+            }
+            start++;
+            // minute (mm)
+            min = Integer.parseInt(text.substring(start, start + 2));
+            start += 2;
+            // delimiter ':'
+            if (text.charAt(start) != ':') {
+                return null;
+            }
+            start++;
+            // second (ss)
+            sec = Integer.parseInt(text.substring(start, start + 2));
+            start += 2;
+            // delimiter '.'
+            if (text.charAt(start) != '.') {
+                return null;
+            }
+            start++;
+            // millisecond (SSS)
+            ms = Integer.parseInt(text.substring(start, start + 3));
+            start += 3;
+            // time zone designator (Z or +00:00 or -00:00)
+            if (text.charAt(start) == '+' || text.charAt(start) == '-') {
+                // offset to UTC specified in the format +00:00/-00:00
+                tzID = "GMT" + text.substring(start);
+            } else if (text.substring(start).equals("Z")) {
+                tzID = "GMT";
+            } else {
+                // invalid time zone designator
+                return null;
+            }
+        } catch (IndexOutOfBoundsException e) {
+            return null;
+        } catch (NumberFormatException e) {
+            return null;
+        }
+
+        TimeZone tz = TimeZone.getTimeZone(tzID);
+        // verify id of returned time zone (getTimeZone defaults to "GMT")
+        if (!tz.getID().equals(tzID)) {
+            // invalid time zone
+            return null;
+        }
+
+        // initialize Calendar object
+        Calendar cal = Calendar.getInstance(tz);
+        cal.setLenient(false);
+        // year and era
+        if (sign == '-' || year == 0) {
+            // not CE, need to set era (BCE) and adjust year
+            cal.set(Calendar.YEAR, year + 1);
+            cal.set(Calendar.ERA, GregorianCalendar.BC);
+        } else {
+            cal.set(Calendar.YEAR, year);
+            cal.set(Calendar.ERA, GregorianCalendar.AD);
+        }
+        // month (0-based!)
+        cal.set(Calendar.MONTH, month - 1);
+        // day of month
+        cal.set(Calendar.DAY_OF_MONTH, day);
+        // hour
+        cal.set(Calendar.HOUR_OF_DAY, hour);
+        // minute
+        cal.set(Calendar.MINUTE, min);
+        // second
+        cal.set(Calendar.SECOND, sec);
+        // millisecond
+        cal.set(Calendar.MILLISECOND, ms);
+
+        try {
+            /**
+             * the following call will trigger an IllegalArgumentException
+             * if any of the set values are illegal or out of range
+             */
+            cal.getTime();
+        } catch (IllegalArgumentException e) {
+            return null;
+        }
+
+        return cal;
+    }
+
+    /**
+     * Formats a <code>Calendar</code> value into an ISO8601-compliant
+     * date/time string.
+     *
+     * @param cal the time value to be formatted into a date/time string.
+     * @return the formatted date/time string.
+     * @throws IllegalArgumentException if a <code>null</code> argument is passed
+     */
+    public static String format(Calendar cal) {
+        if (cal == null) {
+            throw new IllegalArgumentException("argument can not be null");
+        }
+
+        // determine era and adjust year if necessary
+        int year = cal.get(Calendar.YEAR);
+        if (cal.isSet(Calendar.ERA)
+                && cal.get(Calendar.ERA) == GregorianCalendar.BC) {
+            /**
+             * calculate year using astronomical system:
+             * year n BCE => astronomical year -n + 1
+             */
+            year = 0 - year + 1;
+        }
+
+        /**
+         * the format of the date/time string is:
+         * YYYY-MM-DDThh:mm:ss.SSSTZD
+         *
+         * note that we cannot use java.text.SimpleDateFormat for
+         * formatting because it can't handle years <= 0 and TZD's
+         */
+        StringBuffer buf = new StringBuffer();
+        // year ([-]YYYY)
+        buf.append(XXXX_FORMAT.format(year));
+        buf.append('-');
+        // month (MM)
+        buf.append(XX_FORMAT.format(cal.get(Calendar.MONTH) + 1));
+        buf.append('-');
+        // day (DD)
+        buf.append(XX_FORMAT.format(cal.get(Calendar.DAY_OF_MONTH)));
+        buf.append('T');
+        // hour (hh)
+        buf.append(XX_FORMAT.format(cal.get(Calendar.HOUR_OF_DAY)));
+        buf.append(':');
+        // minute (mm)
+        buf.append(XX_FORMAT.format(cal.get(Calendar.MINUTE)));
+        buf.append(':');
+        // second (ss)
+        buf.append(XX_FORMAT.format(cal.get(Calendar.SECOND)));
+        buf.append('.');
+        // millisecond (SSS)
+        buf.append(XXX_FORMAT.format(cal.get(Calendar.MILLISECOND)));
+        // time zone designator (Z or +00:00 or -00:00)
+        TimeZone tz = cal.getTimeZone();
+        // determine offset of timezone from UTC (incl. daylight saving) 
+        int offset = tz.getOffset(cal.getTimeInMillis());
+        if (offset != 0) {
+            int hours = Math.abs((offset / (60 * 1000)) / 60);
+            int minutes = Math.abs((offset / (60 * 1000)) % 60);
+            buf.append(offset < 0 ? '-' : '+');
+            buf.append(XX_FORMAT.format(hours));
+            buf.append(':');
+            buf.append(XX_FORMAT.format(minutes));
+        } else {
+            buf.append('Z');
+        }
+        return buf.toString();
+    }
+}

Propchange: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/util/ISO8601.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/util/uuid/UUID.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/util/uuid/UUID.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/util/uuid/UUID.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/util/uuid/UUID.java Thu Apr 28 06:06:58 2005
@@ -173,11 +173,11 @@
      * @param uuidString the UUID formatted String to parse.
      *                   XXX begin modification by stefan@apache.org
      * @return Returns a UUID or null if the formatted string could not be parsed.
-     * @throws UUIDFormatException the String must be a properly formatted UUID String.
+     * @throws IllegalArgumentException the String must be a properly formatted UUID String.
      *                             XXX end modification by stefan@apache.org
      */
     //public static UUID fromString(String uuidString) throws UUIDFormatException {
-    public static UUID fromString(String uuidString) {
+    public static UUID fromString(String uuidString) throws IllegalArgumentException {
         String leanString = uuidString.toLowerCase();
         UUID tmpUUID = null;
 



Mime
View raw message