jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r586055 - in /jackrabbit/trunk/jackrabbit-spi: ./ src/main/java/org/apache/jackrabbit/spi/
Date Thu, 18 Oct 2007 18:30:27 GMT
Author: angela
Date: Thu Oct 18 11:30:25 2007
New Revision: 586055

URL: http://svn.apache.org/viewvc?rev=586055&view=rev
Log:
JCR-996 Name and Path interfaces in SPI

Added:
    jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/Name.java   (with props)
    jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/NameFactory.java   (with props)
    jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/Path.java   (with props)
    jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/PathFactory.java   (with props)
Modified:
    jackrabbit/trunk/jackrabbit-spi/pom.xml
    jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/Batch.java
    jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/ChildInfo.java
    jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/Event.java
    jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/EventFilter.java
    jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/IdFactory.java
    jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/ItemId.java
    jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/ItemInfo.java
    jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/NodeInfo.java
    jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/PropertyId.java
    jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QItemDefinition.java
    jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QNodeDefinition.java
    jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QNodeTypeDefinition.java
    jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QValue.java
    jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QValueFactory.java
    jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QueryInfo.java
    jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QueryResultRow.java
    jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/RepositoryService.java

Modified: jackrabbit/trunk/jackrabbit-spi/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi/pom.xml?rev=586055&r1=586054&r2=586055&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi/pom.xml (original)
+++ jackrabbit/trunk/jackrabbit-spi/pom.xml Thu Oct 18 11:30:25 2007
@@ -58,10 +58,6 @@
 
   <dependencies>
     <dependency>
-      <groupId>org.apache.jackrabbit</groupId>
-      <artifactId>jackrabbit-jcr-commons</artifactId>
-    </dependency>
-    <dependency>
       <groupId>javax.jcr</groupId>
       <artifactId>jcr</artifactId>
     </dependency>

Modified: jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/Batch.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/Batch.java?rev=586055&r1=586054&r2=586055&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/Batch.java (original)
+++ jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/Batch.java Thu Oct 18 11:30:25 2007
@@ -16,8 +16,6 @@
  */
 package org.apache.jackrabbit.spi;
 
-import org.apache.jackrabbit.name.QName;
-
 import javax.jcr.ItemExistsException;
 import javax.jcr.PathNotFoundException;
 import javax.jcr.AccessDeniedException;
@@ -101,7 +99,7 @@
      * @see javax.jcr.Session#importXML(String, java.io.InputStream, int)
      * @see javax.jcr.query.Query#storeAsNode(String)
      */
-    public void addNode(NodeId parentId, QName nodeName, QName nodetypeName, String uuid) throws RepositoryException;
+    public void addNode(NodeId parentId, Name nodeName, Name nodetypeName, String uuid) throws RepositoryException;
 
     /**
      * Add a new property to the persistent layer.
@@ -130,7 +128,7 @@
      * @see javax.jcr.Session#importXML(String, java.io.InputStream, int)
      * @see javax.jcr.query.Query#storeAsNode(String)
      */
-    public void addProperty(NodeId parentId, QName propertyName, QValue value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, PathNotFoundException, ItemExistsException, AccessDeniedException, UnsupportedRepositoryOperationException, RepositoryException;
+    public void addProperty(NodeId parentId, Name propertyName, QValue value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, PathNotFoundException, ItemExistsException, AccessDeniedException, UnsupportedRepositoryOperationException, RepositoryException;
 
     /**
      * Add a new multi-valued property to the persistent layer.
@@ -153,7 +151,7 @@
      * @see javax.jcr.Node#setProperty(String, String[], int)
      * @see javax.jcr.Session#importXML(String, java.io.InputStream, int)
      */
-    public void addProperty(NodeId parentId, QName propertyName, QValue[] values) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, PathNotFoundException, ItemExistsException, AccessDeniedException, UnsupportedRepositoryOperationException, RepositoryException;
+    public void addProperty(NodeId parentId, Name propertyName, QValue[] values) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, PathNotFoundException, ItemExistsException, AccessDeniedException, UnsupportedRepositoryOperationException, RepositoryException;
 
     /**
      * Modify the value of an existing property.
@@ -232,7 +230,7 @@
      * given id.
      *
      * @param nodeId NodeId identifying the node to be modified.
-     * @param mixinNodeTypeIds The new set of mixin types. Compared to the
+     * @param mixinNodeTypeNames The new set of mixin types. Compared to the
      * previous values this may result in both adding and/or removing mixin types.
      * @throws javax.jcr.nodetype.NoSuchNodeTypeException
      * @throws javax.jcr.version.VersionException
@@ -244,7 +242,7 @@
      * @see javax.jcr.Node#addMixin(String)
      * @see javax.jcr.Node#removeMixin(String)
      */
-    public void setMixins(NodeId nodeId, QName[] mixinNodeTypeIds) throws RepositoryException;
+    public void setMixins(NodeId nodeId, Name[] mixinNodeTypeNames) throws RepositoryException;
 
     /**
      * Move the node identified by the given <code>srcNodeId</code> to the
@@ -264,5 +262,5 @@
      * @throws javax.jcr.RepositoryException
      * @see javax.jcr.Session#move(String, String)
      */
-    public void move(NodeId srcNodeId, NodeId destParentNodeId, QName destName) throws RepositoryException;
+    public void move(NodeId srcNodeId, NodeId destParentNodeId, Name destName) throws RepositoryException;
 }

Modified: jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/ChildInfo.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/ChildInfo.java?rev=586055&r1=586054&r2=586055&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/ChildInfo.java (original)
+++ jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/ChildInfo.java Thu Oct 18 11:30:25 2007
@@ -16,8 +16,6 @@
  */
 package org.apache.jackrabbit.spi;
 
-import org.apache.jackrabbit.name.QName;
-
 /**
  * <code>ChildInfo</code>...
  */
@@ -28,7 +26,7 @@
      *
      * @return The name of the child <code>Node</code>.
      */
-    public QName getName();
+    public Name getName();
 
     /**
      * Returns the uniqueID of the child <code>Node</code> or <code>null</code>

Modified: jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/Event.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/Event.java?rev=586055&r1=586054&r2=586055&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/Event.java (original)
+++ jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/Event.java Thu Oct 18 11:30:25 2007
@@ -16,9 +16,6 @@
  */
 package org.apache.jackrabbit.spi;
 
-import org.apache.jackrabbit.name.QName;
-import org.apache.jackrabbit.name.Path;
-
 /**
  * <code>Event</code> is similar to the regular JCR Event and adds additional
  * information about the affected item.
@@ -75,7 +72,7 @@
      * @return the path of the affected item. E.g. the added/removed node or the
      *         property that was added/removed/changed.
      */
-    public Path getQPath();
+    public Path getPath();
 
     /**
      * @return the id of the affected item.
@@ -92,14 +89,14 @@
      *         this event.
      * @see javax.jcr.observation.ObservationManager#addEventListener
      */
-    public QName getPrimaryNodeTypeName();
+    public Name getPrimaryNodeTypeName();
 
     /**
      * @return the names of the mixin types of the 'associated' node of this
      *         event.
      * @see javax.jcr.observation.ObservationManager#addEventListener
      */
-    public QName[] getMixinTypeNames();
+    public Name[] getMixinTypeNames();
 
     /**
      * Returns the user ID connected with this event. This is the string

Modified: jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/EventFilter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/EventFilter.java?rev=586055&r1=586054&r2=586055&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/EventFilter.java (original)
+++ jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/EventFilter.java Thu Oct 18 11:30:25 2007
@@ -22,7 +22,7 @@
  * An <code>EventFilter</code> is applied to the events as generated on the
  * repository server. Event filter instances can be created with {@link
  * RepositoryService#createEventFilter(SessionInfo, int, 
- * org.apache.jackrabbit.name.Path, boolean, String[], org.apache.jackrabbit.name.QName[], boolean)}.
+ * Path, boolean, String[], Name[], boolean)}.
  * Some repository implementations may
  * also support event filters that are directly instantiated by the client.
  */

Modified: jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/IdFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/IdFactory.java?rev=586055&r1=586054&r2=586055&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/IdFactory.java (original)
+++ jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/IdFactory.java Thu Oct 18 11:30:25 2007
@@ -16,9 +16,6 @@
  */
 package org.apache.jackrabbit.spi;
 
-import org.apache.jackrabbit.name.QName;
-import org.apache.jackrabbit.name.Path;
-
 /**
  * <code>IdFactory</code> defines methods to construct new <code>ItemId</code>s.
  * This factory is intended to build <code>ItemId</code>s from the parameters
@@ -39,7 +36,7 @@
      * @param propertyName
      * @return a new <code>PropertyId</code>.
      */
-    public PropertyId createPropertyId(NodeId parentId, QName propertyName);
+    public PropertyId createPropertyId(NodeId parentId, Name propertyName);
 
     /**
      * Creates a new <code>NodeId</code> from the given parent id and

Modified: jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/ItemId.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/ItemId.java?rev=586055&r1=586054&r2=586055&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/ItemId.java (original)
+++ jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/ItemId.java Thu Oct 18 11:30:25 2007
@@ -16,8 +16,6 @@
  */
 package org.apache.jackrabbit.spi;
 
-import org.apache.jackrabbit.name.Path;
-
 /**
  * An <code>ItemId</code> identifies an item using a combination of unique ID
  * and path. There are three basic forms of an ItemId. The following

Modified: jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/ItemInfo.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/ItemInfo.java?rev=586055&r1=586054&r2=586055&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/ItemInfo.java (original)
+++ jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/ItemInfo.java Thu Oct 18 11:30:25 2007
@@ -16,9 +16,6 @@
  */
 package org.apache.jackrabbit.spi;
 
-import org.apache.jackrabbit.name.QName;
-import org.apache.jackrabbit.name.Path;
-
 /**
  * The <code>ItemInfo</code> is the base interface of <code>{@link NodeInfo}</code>
  * and <code>{@link PropertyInfo}</code>.
@@ -34,11 +31,11 @@
 
     /**
      * Returns the qualified representation of the item name. For the root node
-     * expected return value is {@link QName#ROOT}.
+     * expected return value is <code>{""}""</code>.
      *
      * @return the qualified representation of the item name.
      */
-    public QName getQName();
+    public Name getName();
 
     /**
      * Returns true if this <code>ItemInfo</code> denotes a node, false otherwise.

Added: jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/Name.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/Name.java?rev=586055&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/Name.java (added)
+++ jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/Name.java Thu Oct 18 11:30:25 2007
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.spi;
+
+import java.io.Serializable;
+
+/**
+ * A <code>Name</code> is a combination of a namespace URI and a local part.
+ * Instances of this class are used to internally represent the names of JCR
+ * content items and other objects within a content repository.
+ * <p/>
+ * A <code>Name</code> is immutable once created.
+ * <p/>
+ * The String representation of a <code>Name</code> object must be in the
+ * format "<code>{namespaceURI}localPart</code>".
+ * <p/>
+ * An implementation of the <code>Name</code> interface must implement the
+ * {@link Object#equals(Object)} method such that two Name objects are equal if
+ * both the namespace URI and the local part are equal.
+ */
+public interface Name extends Comparable, Cloneable, Serializable {
+
+    // default namespace (empty uri)
+    public static final String NS_EMPTY_PREFIX = "";
+    public static final String NS_DEFAULT_URI = "";
+
+    // reserved namespace for repository internal node types
+    public static final String NS_REP_PREFIX = "rep";
+    public static final String NS_REP_URI = "internal";
+
+    // reserved namespace for items defined by built-in node types
+    public static final String NS_JCR_PREFIX = "jcr";
+    public static final String NS_JCR_URI = "http://www.jcp.org/jcr/1.0";
+
+    // reserved namespace for built-in primary node types
+    public static final String NS_NT_PREFIX = "nt";
+    public static final String NS_NT_URI = "http://www.jcp.org/jcr/nt/1.0";
+
+    // reserved namespace for built-in mixin node types
+    public static final String NS_MIX_PREFIX = "mix";
+    public static final String NS_MIX_URI = "http://www.jcp.org/jcr/mix/1.0";
+
+    // reserved namespace used in the system view XML serialization format
+    public static final String NS_SV_PREFIX = "sv";
+    public static final String NS_SV_URI = "http://www.jcp.org/jcr/sv/1.0";
+
+    // reserved namespaces that must not be redefined and should not be used
+    public static final String NS_XML_PREFIX = "xml";
+    public static final String NS_XML_URI = "http://www.w3.org/XML/1998/namespace";
+    public static final String NS_XMLNS_PREFIX = "xmlns";
+    public static final String NS_XMLNS_URI = "http://www.w3.org/2000/xmlns/";
+
+    /**
+     * Empty array of <code>Name</code>
+     */
+    public static final Name[] EMPTY_ARRAY = new Name[0];
+
+    /**
+     * Returns the local part of this <code>Name</code> object.
+     *
+     * @return local name
+     */
+    public String getLocalName();
+
+    /**
+     * Returns the namespace URI of this <code>Name</code> object.
+     *
+     * @return namespace URI
+     */
+    public String getNamespaceURI();
+}

Propchange: jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/Name.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/Name.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Added: jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/NameFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/NameFactory.java?rev=586055&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/NameFactory.java (added)
+++ jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/NameFactory.java Thu Oct 18 11:30:25 2007
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.spi;
+
+/**
+ * <code>NameFactory</code>...
+ */
+public interface NameFactory {
+
+    /**
+     * Returns a <code>Name</code> with the given namespace URI and
+     * local part and validates the given parameters.
+     *
+     * @param namespaceURI namespace uri
+     * @param localName local part
+     * @throws IllegalArgumentException if <code>namespaceURI</code> or
+     * <code>localName</code> is invalid.
+     */
+    public Name create(String namespaceURI, String localName) throws IllegalArgumentException;
+
+    /**
+     * Returns a <code>Name</code> holding the value of the specified
+     * string. The string must be in the format returned by the
+     * <code>Name.toString()</code> method, i.e.
+     * <p/>
+     * <code><b>{</b>namespaceURI<b>}</b>localName</code>
+     *
+     * @param nameString a <code>String</code> containing the <code>Name</code>
+     * representation to be parsed.
+     * @return the <code>Name</code> represented by the argument
+     * @throws IllegalArgumentException if the specified string can not be parsed
+     * as a <code>Name</code>.
+     */
+    public Name create(String nameString) throws IllegalArgumentException;
+}
\ No newline at end of file

Propchange: jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/NameFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/NameFactory.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Modified: jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/NodeInfo.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/NodeInfo.java?rev=586055&r1=586054&r2=586055&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/NodeInfo.java (original)
+++ jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/NodeInfo.java Thu Oct 18 11:30:25 2007
@@ -16,8 +16,6 @@
  */
 package org.apache.jackrabbit.spi;
 
-import org.apache.jackrabbit.name.QName;
-
 import java.util.Iterator;
 
 /**
@@ -49,17 +47,17 @@
     public int getIndex();
 
     /**
-     * @return QName representing the name of the primary nodetype.
+     * @return <code>Name</code> representing the name of the primary nodetype.
      */
-    public QName getNodetype();
+    public Name getNodetype();
 
     /**
-     * @return Array of QName representing the names of mixin nodetypes. This
-     * includes only explicitly assigned mixin nodetypes. It does not include
+     * @return Array of <code>Name</code>s representing the names of mixin nodetypes. 
+     * This includes only explicitly assigned mixin nodetypes. It does not include
      * mixin types inherited through the additon of supertypes to the primary
      * type hierarchy.
      */
-    public QName[] getMixins();
+    public Name[] getMixins();
 
     /**
      * @return {@link PropertyId Id}s of the properties that are referencing the

Added: jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/Path.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/Path.java?rev=586055&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/Path.java (added)
+++ jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/Path.java Thu Oct 18 11:30:25 2007
@@ -0,0 +1,371 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.spi;
+
+import javax.jcr.PathNotFoundException;
+import javax.jcr.RepositoryException;
+import java.io.Serializable;
+
+/**
+ * The <code>Path</code> interface defines the qualified representation of
+ * a JCR path. It consists of {@link Path.Element} objects and is immutable.
+ * It has the following properties:
+ * <p/>
+ * <code>isAbsolute()</code>:<br>
+ * A path is absolute if the first path element denotes the root element '/'.
+ * <p/>
+ * <code>isNormalized()</code>:<br>
+ * A path is normalized if all '.' and '..' path elements are resolved as much
+ * as possible. If the path is absolute it is normalized if it contains
+ * no such elements. For example the path '../../a' is normalized where as
+ * '../../b/../a/.' is not. Normalized paths never have '.' elements.
+ * Absolute normalized paths have no and relative normalized paths have no or
+ * only leading '..' elements.
+ * <p/>
+ * <code>isCanonical()</code>:<br>
+ * A path is canonical if its absolute and normalized.
+ * <p/>
+ * Note, that the implementation must implement the equals method such that
+ * two <code>Path</code> objects having the equal <code>Element</code>s
+ * must be equal.
+ */
+public interface Path extends Serializable {
+
+    /**
+     * Constant representing an undefined index value
+     */
+    public static final int INDEX_UNDEFINED = 0;
+
+    /**
+     * Constant representing the default (initial) index value.
+     */
+    public static final int INDEX_DEFAULT = 1;
+
+    /**
+     * Constant defining the depth of the root path
+     */
+    public static final int ROOT_DEPTH = 0;
+
+    /**
+     * Delimiter used in order to concatenate the Path.Element objects
+     * upon {@link Path#getString()}.
+     */
+    public static final char DELIMITER = '\t';
+
+    /**
+     * Tests whether this path represents the root path, i.e. "/".
+     *
+     * @return true if this path represents the root path; false otherwise.
+     */
+    public boolean denotesRoot();
+
+    /**
+     * Tests whether this path is absolute, i.e. whether it starts with "/".
+     *
+     * @return true if this path is absolute; false otherwise.
+     */
+    public boolean isAbsolute();
+
+    /**
+     * Tests whether this path is canonical, i.e. whether it is absolute and
+     * does not contain redundant elements such as "." and "..".
+     *
+     * @return true if this path is canonical; false otherwise.
+     * @see #isAbsolute()
+     */
+    public boolean isCanonical();
+
+    /**
+     * Tests whether this path is normalized, i.e. whether it does not
+     * contain redundant elements such as "." and "..".
+     * <p/>
+     * Note that a normalized path can still contain ".." elements if they are
+     * not redundant, e.g. "../../a/b/c" would be a normalized relative path,
+     * whereas "../a/../../a/b/c" wouldn't (although they're semantically
+     * equivalent).
+     *
+     * @return true if this path is normalized; false otherwise.
+     * @see #getNormalizedPath()
+     */
+    public boolean isNormalized();
+
+    /**
+     * Returns the normalized path representation of this path. This typically
+     * involves removing/resolving redundant elements such as "." and ".." from
+     * the path, e.g. "/a/./b/.." will be normalized to "/a", "../../a/b/c/.."
+     * will be normalized to "../../a/b", and so on.
+     * <p/>
+     * If the normalized path results in an empty path (eg: 'a/..') or if an
+     * absolute path is normalized that would result in a 'negative' path
+     * (eg: /a/../../) a MalformedPathException is thrown.
+     *
+     * @return a normalized path representation of this path.
+     * @throws RepositoryException if the path cannot be normalized.
+     * @see #isNormalized()
+     */
+    public Path getNormalizedPath() throws RepositoryException;
+
+    /**
+     * Returns the canonical path representation of this path. This typically
+     * involves removing/resolving redundant elements such as "." and ".." from
+     * the path.
+     *
+     * @return a canonical path representation of this path.
+     * @throws RepositoryException if this path can not be canonicalized
+     * (e.g. if it is relative).
+     */
+    public Path getCanonicalPath() throws RepositoryException;
+
+    /**
+     * Computes the relative path from <code>this</code> absolute path to
+     * <code>other</code>.
+     *
+     * @param other an absolute path.
+     * @return the relative path from <code>this</code> path to <code>other</code>
+     * path.
+     * @throws RepositoryException if either <code>this</code> or
+     * <code>other</code> path is not absolute.
+     */
+    public Path computeRelativePath(Path other) throws RepositoryException;
+
+    /**
+     * Returns the ancestor path of the specified relative degree.
+     * <p/>
+     * An ancestor of relative degree <i>x</i> is the path that is <i>x</i>
+     * levels up along the path.
+     * <ul>
+     * <li><i>degree</i> = 0 returns this path.
+     * <li><i>degree</i> = 1 returns the parent of this path.
+     * <li><i>degree</i> = 2 returns the grandparent of this path.
+     * <li>And so on to <i>degree</i> = <i>n</i>, where <i>n</i> is the depth
+     * of this path, which returns the root path.
+     * </ul>
+     * <p/>
+     * Note that there migth be an unexpected result if <i>this</i> path is not
+     * normalized, e.g. the ancestor of degree = 1 of the path "../.." would
+     * be ".." although this is not the parent of "../..".
+     *
+     * @param degree the relative degree of the requested ancestor.
+     * @return the ancestor path of the specified degree.
+     * @throws PathNotFoundException if there is no ancestor of the specified degree.
+     * @throws IllegalArgumentException if <code>degree</code> is negative.
+     */
+    public Path getAncestor(int degree) throws IllegalArgumentException, PathNotFoundException;
+
+    /**
+     * Returns the number of ancestors of this path. This is the equivalent
+     * of <code>{@link #getDepth()} - 1</code>.
+     * <p/>
+     * Note that the returned value might be negative if this path is not
+     * canonical, e.g. the depth of "../../a" is -1, its ancestor count is
+     * therefore -2.
+     *
+     * @return the number of ancestors of this path
+     * @see #getDepth()
+     * @see #getLength()
+     * @see #isCanonical()
+     */
+    public int getAncestorCount();
+
+    /**
+     * Returns the length of this path, i.e. the number of its elements.
+     * Note that the root element "/" counts as a separate element, e.g.
+     * the length of "/a/b/c" is 4 whereas the length of "a/b/c" is 3.
+     * <p/>
+     * Also note that the special elements "." and ".." are not treated
+     * specially, e.g. both "/a/./.." and "/a/b/c" have a length of 4
+     * but this value does not necessarily reflect the true hierarchy level as
+     * returned by <code>{@link #getDepth()}</code>.
+     *
+     * @return the length of this path
+     * @see #getDepth()
+     * @see #getAncestorCount()
+     */
+    public int getLength();
+
+    /**
+     * Returns the depth of this path. The depth reflects the absolute or
+     * relative hierarchy level this path is representing, depending on whether
+     * this path is an absolute or a relative path. The depth also takes '.'
+     * and '..' elements into account.
+     * <p/>
+     * Note that the returned value might be negative if this path is not
+     * canonical, e.g. the depth of "../../a" is -1.
+     *
+     * @return the depth this path
+     * @see #getLength()
+     * @see #getAncestorCount()
+     */
+    public int getDepth();
+
+    /**
+     * Determines if <i>this</i> path is an ancestor of the specified path,
+     * based on their (absolute or relative) hierarchy level as returned by
+     * <code>{@link #getDepth()}</code>.
+     *
+     * @return <code>true</code> if <code>other</code> is a descendant;
+     * otherwise <code>false</code>.
+     * @throws IllegalArgumentException if the given path is <code>null</code>
+     * or if not both paths are either absolute or relative.
+     * @throws RepositoryException if any of the path cannot be normalized.
+     * @see #getDepth()
+     */
+    public boolean isAncestorOf(Path other) throws IllegalArgumentException, RepositoryException;
+
+    /**
+     * Determines if <i>this</i> path is a descendant of the specified path,
+     * based on their (absolute or relative) hierarchy level as returned by
+     * <code>{@link #getDepth()}</code>.
+     *
+     * @return <code>true</code> if <code>other</code> is an ancestor;
+     * otherwise <code>false</code>
+     * @throws IllegalArgumentException If the given path is null.
+     * @throws RepositoryException if not both paths are either absolute or
+     * relative.
+     * @see #getDepth()
+     */
+    public boolean isDescendantOf(Path other) throws IllegalArgumentException, RepositoryException;
+
+    /**
+     * Returns a new <code>Path</code> consisting of those Path.Element objects
+     * between the given <tt><code>from</code>, inclusive, and the given <code>to</code>,
+     * exclusive. An <code>IllegalArgumentException</code> is thrown if <code>from</code>
+     * is greater or equal than <code>to</code> or if any of both params is
+     * out of the possible range. A <code>RepositoryException</code> is thrown
+     * if this <code>Path</code> is not normalized.
+     *
+     * @param from
+     * @param to
+     * @return
+     * @throws IllegalArgumentException
+     * @throws RepositoryException If this Path is not normalized.
+     */
+    public Path subPath(int from, int to) throws IllegalArgumentException, RepositoryException;
+
+    /**
+     * Returns the elements of this path.
+     *
+     * @return the elements of this path.
+     */
+    public Element[] getElements();
+
+    /**
+     * Returns the name element (i.e. the last element) of this path.
+     *
+     * @return the name element of this path
+     */
+    public Element getNameElement();
+
+    /**
+     * Returns the String representation of this Path as it is used
+     * by {@link PathFactory#create(String)}.<p/>
+     * The String representation must consist of the String representation of
+     * its elements separated by {@link Path#DELIMITER}.
+     *
+     * @see Path.Element#getString()
+     * @return
+     */
+    public String getString();
+
+    //----------------------------------------------------< inner interface >---
+    /**
+     * Object representation of a single JCR path element. An <code>Element</code>
+     * object contains the <code>Name</code> and optional index of a single
+     * JCR path element.
+     * <p/>
+     * Once created, a <code>Element</code> object must be immutable.
+     * <p/>
+     * The String presentation of an <code>Element</code> must be in the format
+     * "<code>{namespaceURI}localPart</code>" or
+     * "<code>{namespaceURI}localPart[index]</code>" case of an index greater
+     * than {@link Path#INDEX_DEFAULT}.
+     * <p/>
+     * Note, that the implementation must implement the equals method such, that
+     * two <code>Element</code> objects having equals <code>Name</code>s and the
+     * same normalized index must be equal.
+     */
+    public interface Element extends Serializable {
+
+        /**
+         * Returns the qualified name of this path element.
+         *
+         * @return qualified name
+         */
+        public Name getName();
+
+        /**
+         * Returns the index of the element as it has been assigned upon creation.
+         *
+         * @return index of the element as it has been assigned upon creation.
+         */
+        public int getIndex();
+
+        /**
+         * Returns the normalized index of this path element, i.e. the index
+         * is always equals or greater that {@link Path#INDEX_DEFAULT}.
+         *
+         * @return the normalized index.
+         */
+        public int getNormalizedIndex();
+
+        /**
+         * Returns <code>true</code> if this element denotes the <i>root</i> element,
+         * otherwise returns <code>false</code>.
+         *
+         * @return <code>true</code> if this element denotes the <i>root</i>
+         *         element; otherwise <code>false</code>
+         */
+        public boolean denotesRoot();
+
+        /**
+         * Returns <code>true</code> if this element denotes the <i>parent</i>
+         * ('..') element, otherwise returns <code>false</code>.
+         *
+         * @return <code>true</code> if this element denotes the <i>parent</i>
+         *         element; otherwise <code>false</code>
+         */
+        public boolean denotesParent();
+
+        /**
+         * Returns <code>true</code> if this element denotes the <i>current</i>
+         * ('.') element, otherwise returns <code>false</code>.
+         *
+         * @return <code>true</code> if this element denotes the <i>current</i>
+         *         element; otherwise <code>false</code>
+         */
+        public boolean denotesCurrent();
+
+        /**
+         * Returns <code>true</code> if this element represents a regular name
+         * (i.e. neither root, '.' nor '..'), otherwise returns <code>false</code>.
+         *
+         * @return <code>true</code> if this element represents a regular name;
+         *         otherwise <code>false</code>
+         */
+        public boolean denotesName();
+
+        /**
+         * Return the String presentation of a{@link Path.Element}. It must be
+         * in the format "<code>{namespaceURI}localPart</code>" or
+         * "<code>{namespaceURI}localPart[index]</code>" in case of an index
+         * greater than {@link Path#INDEX_DEFAULT}.
+         * 
+         * @return
+         */
+        public String getString();
+    }
+}
\ No newline at end of file

Propchange: jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/Path.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/Path.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Added: jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/PathFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/PathFactory.java?rev=586055&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/PathFactory.java (added)
+++ jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/PathFactory.java Thu Oct 18 11:30:25 2007
@@ -0,0 +1,181 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.spi;
+
+import javax.jcr.RepositoryException;
+
+/**
+ * <code>PathFactory</code>...
+ */
+public interface PathFactory {
+
+    /**
+     * Return a new <code>Path</code> out of the given <code>parent<code> path
+     * string and the given relative path string. If <code>normalize</code> is
+     * <code>true</code>, the returned path will be normalized (or
+     * canonicalized, if the parent path is absolute).
+     *
+     * @param parent
+     * @param relPath
+     * @param normalize
+     * @return
+     * @throws IllegalArgumentException if <code>relPath</code> is absolute.
+     * @throws RepositoryException if <code>normalize</code> is true but the
+     * created Path cannot be normalized.
+     */
+    public Path create(Path parent, Path relPath, boolean normalize) throws IllegalArgumentException, RepositoryException;
+
+    /**
+     * Creates a new <code>Path</code> out of the given <code>parent<code> path
+     * string and the give name. If <code>normalize</code> is <code>true</code>,
+     * the returned path will be normalized (or canonicalized, if the parent
+     * path is absolute). Use {@link PathFactory#create(Path, Name, int, boolean)}
+     * in order to build a <code>Path</code> having an index with his name element.
+     *
+     * @param parent the parent path
+     * @param name the name of the new path element.
+     * @param normalize
+     * @return
+     * @throws RepositoryException
+     */
+    public Path create(Path parent, Name name, boolean normalize) throws RepositoryException;
+
+    /**
+     * Creates a new <code>Path</code> out of the given <code>parent<code> path
+     * and the give name and normalized index. See also
+     * {@link PathFactory#create(Path, Name, boolean)}.
+     *
+     * @param parent the parent path.
+     * @param name the name of the new path element.
+     * @param index the index of the new path element.
+     * @param normalize If true the Path is normalized before being returned.
+     * @return
+     * @throws IllegalArgumentException If the given index is lower than
+     * {@link Path#INDEX_UNDEFINED}.
+     * @throws RepositoryException If the <code>normalized</code> is
+     * <code>true</code> and the path cannot be normalized.
+     */
+    public Path create(Path parent, Name name, int index, boolean normalize) throws IllegalArgumentException, RepositoryException;
+
+    /**
+     * Creates a relative path based on a {@link Name}.
+     *
+     * @param name  single {@link Name} for this relative path.
+     * @return the relative path created from <code>name</code>.
+     * @throws IllegalArgumentException if the name is <code>null</code>.
+     */
+    public Path create(Name name) throws IllegalArgumentException;
+
+    /**
+     * Creates a relative path based on a {@link Name} and a normalized index.
+     * Same as {@link #create(Name)} but allows to explicitely specify an
+     * index.
+     *
+     * @param name  single {@link Name} for this relative path.
+     * @param index index of the single name element.
+     * @return the relative path created from <code>name</code> and <code>normalizedIndex</code>.
+     * @throws IllegalArgumentException if <code>index</code> is lower
+     * than {@link Path#INDEX_UNDEFINED} or if the name is not valid.
+     */
+    public Path create(Name name, int index) throws IllegalArgumentException;
+
+    /**
+     * Create a new <code>Path</code> from the given elements.
+     *
+     * @param elements
+     * @return the <code>Path</code> created from the elements.
+     * @throws IllegalArgumentException If the given elements are <code>null</code>
+     * or have a length of 0.
+     */
+    public Path create(Path.Element[] elements) throws IllegalArgumentException;
+
+    /**
+     * Returns a <code>Path</code> holding the value of the specified
+     * string. The string must be in the format returned by the
+     * <code>Path.getString()</code> method.
+     *
+     * @param pathString a <code>String</code> containing the <code>Path</code>
+     * representation to be parsed.
+     * @return the <code>Path</code> represented by the argument
+     * @throws IllegalArgumentException if the specified string can not be parsed
+     * as a <code>Path</code>.
+     * @see Path#getString()
+     * @see Path#DELIMITER
+     */
+    public Path create(String pathString) throws IllegalArgumentException;
+
+    /**
+     * Creates a path element with the given qualified name.
+     * The created path element does not contain an explicit index.
+     * <p/>
+     * If the specified name denotes a <i>special</i> path element (either
+     * {@link PathFactory#getParentElement()}, {@link PathFactory#getCurrentElement()} or
+     * {@link PathFactory#getRootElement()}) then the associated constant is returned.
+     *
+     * @param name the name of the element
+     * @return a path element
+     * @throws IllegalArgumentException if the name is <code>null</code>
+     */
+    public Path.Element createElement(Name name) throws IllegalArgumentException;
+
+    /**
+     * Same as {@link #createElement(Name)} except that an explicit index can be
+     * specified.
+     * <p/>
+     * Note that an IllegalArgumentException will be thrown if the specified
+     * name denotes a <i>special</i> path element (either
+     * {@link PathFactory#getParentElement()}, {@link PathFactory#getCurrentElement()} or
+     * {@link PathFactory#getRootElement()}) since an explicit index is not allowed
+     * in this context.
+     *
+     * @param name  the name of the element
+     * @param index the index if the element.
+     * @return a path element
+     * @throws IllegalArgumentException if the name is <code>null</code>,
+     * if the given index is lower than {@link Path#INDEX_UNDEFINED} or if name
+     * denoting a special path element.
+     */
+    public Path.Element createElement(Name name, int index) throws IllegalArgumentException;
+
+    /**
+     * Return the current element.
+     *
+     * @return the current element.
+     */
+    public Path.Element getCurrentElement();
+
+    /**
+     * Return the parent element.
+     *
+     * @return the parent element.
+     */
+    public Path.Element getParentElement();
+
+    /**
+     * Return the root element.
+     *
+     * @return the root element.
+     */
+    public Path.Element getRootElement();
+
+    /**
+     * Return the <code>Path</code> of the root node.
+     *
+     * @return the <code>Path</code> of the root node.
+     */
+    public Path getRootPath();
+}
\ No newline at end of file

Propchange: jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/PathFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/PathFactory.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Modified: jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/PropertyId.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/PropertyId.java?rev=586055&r1=586054&r2=586055&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/PropertyId.java (original)
+++ jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/PropertyId.java Thu Oct 18 11:30:25 2007
@@ -16,8 +16,6 @@
  */
 package org.apache.jackrabbit.spi;
 
-import org.apache.jackrabbit.name.QName;
-
 /**
  * <code>PropertyId</code> identifies a property on the SPI layer.
  */
@@ -31,9 +29,9 @@
     public NodeId getParentId();
 
     /**
-     * Returns the {@link QName name} of the property identified by this id.
+     * Returns the {@link Name} of the property identified by this id.
      * 
      * @return The name of the property that is identified by this <code>PropertyId</code>.
      */
-    public QName getQName();
+    public Name getName();
 }

Modified: jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QItemDefinition.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QItemDefinition.java?rev=586055&r1=586054&r2=586055&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QItemDefinition.java (original)
+++ jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QItemDefinition.java Thu Oct 18 11:30:25 2007
@@ -16,13 +16,11 @@
  */
 package org.apache.jackrabbit.spi;
 
-import org.apache.jackrabbit.name.QName;
-
 import javax.jcr.nodetype.ItemDefinition;
 
 /**
  * <code>QItemDefinition</code> is the qualified SPI representation of
- * an {@link ItemDefinition item definition}. It refers to <code>QName</code>s
+ * an {@link ItemDefinition item definition}. It refers to <code>Name</code>s
  * only and is thus isolated from session-specific namespace mappings.
  *
  * @see javax.jcr.nodetype.ItemDefinition
@@ -39,14 +37,14 @@
      *
      * @return the name of the child item.
      */
-    public QName getQName();
+    public Name getName();
 
     /**
      * Gets the name of the declaring node type.
      *
      * @return the name of the declaring node type.
      */
-    public QName getDeclaringNodeType();
+    public Name getDeclaringNodeType();
 
     /**
      * Determines whether the item is 'autoCreated'.

Modified: jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QNodeDefinition.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QNodeDefinition.java?rev=586055&r1=586054&r2=586055&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QNodeDefinition.java (original)
+++ jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QNodeDefinition.java Thu Oct 18 11:30:25 2007
@@ -16,13 +16,11 @@
  */
 package org.apache.jackrabbit.spi;
 
-import org.apache.jackrabbit.name.QName;
-
 import javax.jcr.nodetype.NodeDefinition;
 
 /**
  * <code>QNodeDefinition</code> is the qualified SPI representation of
- * a {@link NodeDefinition node definition}. It refers to <code>QName</code>s only
+ * a {@link NodeDefinition node definition}. It refers to <code>Name</code>s only
  * and is thus isolated from session-specific namespace mappings.
  *
  * @see javax.jcr.nodetype.NodeDefinition
@@ -39,14 +37,14 @@
      *
      * @return the name of the default primary type.
      */
-    public QName getDefaultPrimaryType();
+    public Name getDefaultPrimaryType();
 
     /**
      * Returns the array of names of the required primary types.
      *
      * @return the array of names of the required primary types.
      */
-    public QName[] getRequiredPrimaryTypes();
+    public Name[] getRequiredPrimaryTypes();
 
     /**
      * Reports whether this node can have same-name siblings.

Modified: jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QNodeTypeDefinition.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QNodeTypeDefinition.java?rev=586055&r1=586054&r2=586055&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QNodeTypeDefinition.java (original)
+++ jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QNodeTypeDefinition.java Thu Oct 18 11:30:25 2007
@@ -16,8 +16,6 @@
  */
 package org.apache.jackrabbit.spi;
 
-import org.apache.jackrabbit.name.QName;
-
 import java.util.Collection;
 
 import javax.jcr.nodetype.NodeType;
@@ -37,7 +35,7 @@
      *
      * @return the name of the node type or <code>null</code> if not set.
      */
-    public QName getQName();
+    public Name getName();
 
     /**
      * Returns an array containing the names of the supertypes. If no
@@ -49,7 +47,7 @@
      *
      * @return an array of supertype names
      */
-    public QName[] getSupertypes();
+    public Name[] getSupertypes();
 
     /**
      * Returns the value of the mixin flag.
@@ -71,7 +69,7 @@
      *
      * @return the name of the primary item or <code>null</code> if not set.
      */
-    public QName getPrimaryItemName();
+    public Name getPrimaryItemName();
 
     /**
      * Returns an array containing the property definitions or
@@ -92,7 +90,7 @@
     public QNodeDefinition[] getChildNodeDefs();
 
     /**
-     * Returns a collection of node type <code>QName</code>s that are being
+     * Returns a collection of node type <code>Name</code>s that are being
      * referenced by <i>this</i> node type definition (e.g. as supertypes, as
      * required/default primary types in child node definitions, as REFERENCE
      * value constraints in property definitions).
@@ -101,7 +99,7 @@
      * the declaring node type as the default primary type) are not considered
      * dependencies.
      *
-     * @return a collection of node type <code>QName</code>s
+     * @return a collection of node type <code>Name</code>s
      */
     public Collection getDependencies();
 }

Modified: jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QValue.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QValue.java?rev=586055&r1=586054&r2=586055&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QValue.java (original)
+++ jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QValue.java Thu Oct 18 11:30:25 2007
@@ -16,9 +16,6 @@
  */
 package org.apache.jackrabbit.spi;
 
-import org.apache.jackrabbit.name.Path;
-import org.apache.jackrabbit.name.QName;
-
 import javax.jcr.RepositoryException;
 import javax.jcr.PropertyType;
 import javax.jcr.Property;
@@ -27,7 +24,7 @@
 
 /**
  * <code>QValue</code> is the qualified SPI representation of a
- * {@link javax.jcr.Value jcr value}. It therefore refers to <code>QName</code>s
+ * {@link javax.jcr.Value jcr value}. It therefore refers to <code>Name</code>s
  * and <code>Path</code>s only and is thus isolated from session-specific
  * namespace mappings.
  */
@@ -86,12 +83,12 @@
     public InputStream getStream() throws RepositoryException;
 
     /**
-     * Returns a <code>QName</code> representation of this value.
+     * Returns a <code>Name</code> representation of this value.
      *
-     * @return A <code>QName</code> representation of this value.
+     * @return A <code>Name</code> representation of this value.
      * @throws RepositoryException if an error occurs.
      */
-    public QName getQName() throws RepositoryException;
+    public Name getName() throws RepositoryException;
 
     /**
      * Returns a <code>Calendar</code> representation of this value.

Modified: jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QValueFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QValueFactory.java?rev=586055&r1=586054&r2=586055&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QValueFactory.java (original)
+++ jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QValueFactory.java Thu Oct 18 11:30:25 2007
@@ -16,9 +16,6 @@
  */
 package org.apache.jackrabbit.spi;
 
-import org.apache.jackrabbit.name.QName;
-import org.apache.jackrabbit.name.Path;
-
 import java.io.IOException;
 import java.io.File;
 import java.io.InputStream;
@@ -56,10 +53,10 @@
     /**
      * Create a new <code>QValue</code> with type {@link javax.jcr.PropertyType#NAME}.
      *
-     * @param value A non-null <code>QName</code>.
+     * @param value A non-null <code>Name</code>.
      * @return a new <code>QValue</code>.
      */
-    public QValue create(QName value);
+    public QValue create(Name value);
 
     /**
      * Create a new <code>QValue</code> with type {@link javax.jcr.PropertyType#PATH}.

Modified: jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QueryInfo.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QueryInfo.java?rev=586055&r1=586054&r2=586055&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QueryInfo.java (original)
+++ jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QueryInfo.java Thu Oct 18 11:30:25 2007
@@ -16,8 +16,6 @@
  */
 package org.apache.jackrabbit.spi;
 
-import org.apache.jackrabbit.name.QName;
-
 import javax.jcr.RangeIterator;
 import java.util.Map;
 
@@ -41,9 +39,9 @@
     public RangeIterator getRows();
 
     /**
-     * @return an array of QName representing the column names of the query
-     * result.
+     * @return an array of <code>Name</code>s representing the column names of
+     * the query result.
      * @see javax.jcr.query.QueryResult#getColumnNames()
      */
-    public QName[] getColumnNames();
+    public Name[] getColumnNames();
 }

Modified: jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QueryResultRow.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QueryResultRow.java?rev=586055&r1=586054&r2=586055&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QueryResultRow.java (original)
+++ jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QueryResultRow.java Thu Oct 18 11:30:25 2007
@@ -41,7 +41,7 @@
      * Returns an array of <code>QValue</code>s.
      *
      * @return an array of <code>QValue</code>s representing the values present
-     * in this result row (missing values are returned as <code>null</code>).
+     * in this result row.
      * @see javax.jcr.query.Row#getValue(String)
      * @see javax.jcr.query.Row#getValues()
      */

Modified: jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/RepositoryService.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/RepositoryService.java?rev=586055&r1=586054&r2=586055&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/RepositoryService.java (original)
+++ jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/RepositoryService.java Thu Oct 18 11:30:25 2007
@@ -16,9 +16,6 @@
  */
 package org.apache.jackrabbit.spi;
 
-import org.apache.jackrabbit.name.QName;
-import org.apache.jackrabbit.name.Path;
-
 import javax.jcr.lock.LockException;
 import javax.jcr.version.VersionException;
 import javax.jcr.version.Version;
@@ -57,7 +54,7 @@
  *    void RepositoryService.copy(SessionInfo sessionInfo,
  *                                String srcWorkspaceName,
  *                                NodeId srcNodeId, NodeId destParentNodeId,
- *                                QName destName)
+ *                                Name destName)
  * </pre>
  * This method performs an immediate persistent copy of the node identified by
  * srcNodeId and that node's subtree to a position as child of the node
@@ -68,7 +65,7 @@
  * If <code>srcWorkspaceName</code> differs from the workspace name present with
  * the SessionInfo, the copy is corresponds to a copy across workspaces.
  * The source and destination of the copy operation are specified by
- * {@link NodeId}s. The <code>QName</code> holds the new name in fully qualified
+ * {@link NodeId}s. The <code>Name</code> holds the new name in fully qualified
  * form. Taken together, this information is sufficient to completely specify
  * and authorize the copy operations.<p/>
  *
@@ -87,6 +84,22 @@
     public IdFactory getIdFactory() throws RepositoryException;
 
     /**
+     * Return the <code>NameFactory</code>.
+     *
+     * @return The <code>NameFactory</code>.
+     * @throws RepositoryException If an error occurs.
+     */
+    public NameFactory getNameFactory() throws RepositoryException;
+
+    /**
+     * Return the <code>PathFactory</code>.
+     *
+     * @return The <code>PathFactory</code>.
+     * @throws RepositoryException If an error occurs.
+     */
+    public PathFactory getPathFactory() throws RepositoryException;
+
+    /**
      * Return the <code>QValueFactory</code> defined with this SPI implementation.
      *
      * @return The <code>QValueFactory</code>.
@@ -412,7 +425,7 @@
      * @throws javax.jcr.RepositoryException
      * @see javax.jcr.Workspace#move(String, String)
      */
-    public void move(SessionInfo sessionInfo, NodeId srcNodeId, NodeId destParentNodeId, QName destName) throws ItemExistsException, PathNotFoundException, VersionException, ConstraintViolationException, LockException, AccessDeniedException, UnsupportedRepositoryOperationException, RepositoryException;
+    public void move(SessionInfo sessionInfo, NodeId srcNodeId, NodeId destParentNodeId, Name destName) throws ItemExistsException, PathNotFoundException, VersionException, ConstraintViolationException, LockException, AccessDeniedException, UnsupportedRepositoryOperationException, RepositoryException;
 
     /**
      * Clone the subtree identified by the given <code>srcNodeId</code>
@@ -441,7 +454,7 @@
      * @see javax.jcr.Workspace#copy(String, String)
      * @see javax.jcr.Workspace#copy(String, String, String)
      */
-    public void copy(SessionInfo sessionInfo, String srcWorkspaceName, NodeId srcNodeId, NodeId destParentNodeId, QName destName) throws NoSuchWorkspaceException, ConstraintViolationException, VersionException, AccessDeniedException, PathNotFoundException, ItemExistsException, LockException, UnsupportedRepositoryOperationException, RepositoryException;
+    public void copy(SessionInfo sessionInfo, String srcWorkspaceName, NodeId srcNodeId, NodeId destParentNodeId, Name destName) throws NoSuchWorkspaceException, ConstraintViolationException, VersionException, AccessDeniedException, PathNotFoundException, ItemExistsException, LockException, UnsupportedRepositoryOperationException, RepositoryException;
 
     //------------------------------------------------------< Update, Clone >---
     /**
@@ -485,7 +498,7 @@
      * @throws javax.jcr.RepositoryException
      * @see javax.jcr.Workspace#clone(String, String, String, boolean)
      */
-    public void clone(SessionInfo sessionInfo, String srcWorkspaceName, NodeId srcNodeId, NodeId destParentNodeId, QName destName, boolean removeExisting) throws NoSuchWorkspaceException, ConstraintViolationException, VersionException, AccessDeniedException, PathNotFoundException, ItemExistsException, LockException, UnsupportedRepositoryOperationException, RepositoryException;
+    public void clone(SessionInfo sessionInfo, String srcWorkspaceName, NodeId srcNodeId, NodeId destParentNodeId, Name destName, boolean removeExisting) throws NoSuchWorkspaceException, ConstraintViolationException, VersionException, AccessDeniedException, PathNotFoundException, ItemExistsException, LockException, UnsupportedRepositoryOperationException, RepositoryException;
 
     //------------------------------------------------------------< Locking >---
     /**
@@ -713,7 +726,7 @@
      * @throws javax.jcr.RepositoryException
      * @see javax.jcr.version.VersionHistory#addVersionLabel(String, String, boolean)
      */
-    public void addVersionLabel(SessionInfo sessionInfo, NodeId versionHistoryId, NodeId versionId, QName label, boolean moveLabel) throws VersionException, RepositoryException;
+    public void addVersionLabel(SessionInfo sessionInfo, NodeId versionHistoryId, NodeId versionId, Name label, boolean moveLabel) throws VersionException, RepositoryException;
 
     /**
      * Remove the given version label in the persistent layer.
@@ -728,7 +741,7 @@
      * @throws javax.jcr.RepositoryException
      * @see javax.jcr.version.VersionHistory#removeVersionLabel(String)
      */
-    public void removeVersionLabel(SessionInfo sessionInfo, NodeId versionHistoryId, NodeId versionId, QName label) throws VersionException, RepositoryException;
+    public void removeVersionLabel(SessionInfo sessionInfo, NodeId versionHistoryId, NodeId versionId, Name label) throws VersionException, RepositoryException;
 
     //----------------------------------------------------------< Searching >---
     /**
@@ -803,7 +816,7 @@
      */
     public EventFilter createEventFilter(SessionInfo sessionInfo, int eventTypes,
                                          Path absPath, boolean isDeep,
-                                         String[] uuid, QName[] nodeTypeName,
+                                         String[] uuid, Name[] nodeTypeName,
                                          boolean noLocal)
             throws UnsupportedRepositoryOperationException, RepositoryException;
 
@@ -957,5 +970,5 @@
      * @see javax.jcr.nodetype.NodeTypeManager#getPrimaryNodeTypes()
      * @see javax.jcr.nodetype.NodeTypeManager#getNodeType(String)
      */
-    public Iterator getQNodeTypeDefinitions(SessionInfo sessionInfo, QName[] nodetypeNames) throws RepositoryException;
+    public Iterator getQNodeTypeDefinitions(SessionInfo sessionInfo, Name[] nodetypeNames) throws RepositoryException;
 }



Mime
View raw message