Hi,

Quick fix to my previous message. The attached patch didn't contain changes to the NodeType interface. Here's an updated version.

BR,

Jukka Zitting
Only in phpcr-0.1.orig/php170: BaseValue.php
Only in phpcr-0.1.orig/php170: BinaryValue.php
Only in phpcr-0.1.orig/php170: BooleanValue.php
Only in phpcr-0.1.orig/php170: DateValue.php
Only in phpcr-0.1.orig/php170: DoubleValue.php
diff -r -u -P phpcr-0.1.orig/php170/lock/Lock.php phpcr-0.1/php170/lock/Lock.php
--- phpcr-0.1.orig/php170/lock/Lock.php 2005-05-15 23:26:28.000000000 +0300
+++ phpcr-0.1/php170/lock/Lock.php      2005-06-16 12:08:31.000000000 +0300
@@ -95,6 +95,14 @@
     public function isLive();
 
     /**
+     * Returns <code>true</code> if this is a session-scoped lock. Returns
+     * <code>false</code> if this is an open-scoped lock.
+     *
+     * @return a <code>boolean</code>
+     */
+    public function isSessionScoped();
+
+    /**
      * Refreshes (brings back to life) a previously unlocked <code>Lock</code> 
object
      * (one for which <code>isLive</code> returns <code>false</code>). If this 
lock
      * is still live (<code>isLive</code> returns <code>true</code>) or if 
this <code>Session</code>
Only in phpcr-0.1.orig/php170: LongValue.php
diff -r -u -P phpcr-0.1.orig/php170/Node.php phpcr-0.1/php170/Node.php
--- phpcr-0.1.orig/php170/Node.php      2005-05-16 00:29:59.000000000 +0300
+++ phpcr-0.1/php170/Node.php   2005-06-16 12:08:31.000000000 +0300
@@ -27,7 +27,7 @@
 require_once 'php170/AccessDeniedException.php';
 require_once 'php170/nodetype/ConstraintViolationException.php';
 require_once 'php170/nodetype/NoSuchNodeTypeException.php';
-require_once 'php170/nodetype/NodeDef.php';
+require_once 'php170/nodetype/NodeDefinition.php';
 require_once 'php170/nodetype/NodeType.php';
 require_once 'php170/version/OnParentVersionAction.php';
 require_once 'php170/version/Version.php';
@@ -81,8 +81,8 @@
      * <p/>
      * Since this signature does not allow explicit node type assignment, the
      * new node's node types (primary and mixin, if applicable) will be
-     * determined immediately (not on save) by the <code>NodeDef</code>s
-     * in the node types of its parent. If there is no <code>NodeDef</code>
+     * determined immediately (not on save) by the <code>NodeDefinition</code>s
+     * in the node types of its parent. If there is no 
<code>NodeDefinition</code>
      * corresponding to the name specified for this new node, then a
      * <code>ConstraintViolationException</code> is thrown immediately (not on
      * <code>save</code>).
@@ -93,7 +93,7 @@
      * @throws ItemExistsException If an item at the specified path already 
exists.
      * @throws PathNotFoundException If the specified path implies intermediary
      * nodes that do not exist.
-     * @throws ConstraintViolationException if If there is no NodeDef
+     * @throws ConstraintViolationException if If there is no NodeDefinition
      * corresponding to the name specified for this new node in the parent
      * node's node type, or if an attempt is made to add a node as a child of a
      * property.
@@ -217,6 +217,9 @@
      * @return The updated <code>Property</code> object
      * @throws ValueFormatException if <code>value</code> is incompatible with
      * (i.e. can not be converted to) the type of the specified property.
+     * @throws ConstraintViolationException  if the change would violate
+     * a node-type or other constraint and this implementation performs
+     * this validation immediately instead of waiting until save.
      * @throws RepositoryException  If another error occurs.
      */
     public function setProperty( $name, $val, $type = null );
@@ -444,7 +447,7 @@
      * Adds the specified mixin node type to this node. If a conflict with
      * another assigned mixin or the main node type results, then an exception
      * is thrown on save. Adding a mixin node type to a node immediately adds
-     * the name of that type to the list held in that node?s
+     * the name of that type to the list held in that node�s
      * <code>jcr:mixinTypes</code> property.
      *
      * @param mixinName
@@ -494,7 +497,7 @@
      * </li>
      * <li>
      * The addition is prevented because this node is protected
-     * (as defined in this node's NodeDef, found in this node's parent's node 
type).
+     * (as defined in this node's NodeDefinition, found in this node's 
parent's node type).
      * </li>
      * <li>
      * The addition is prevented due to access control restrictions.
@@ -520,8 +523,8 @@
      * (and its supertypes) for the child node definition applicable to this
      * node.
      *
-     * @return a <code>NodeDef</code> object.
-     * @see NodeType#getChildNodeDefs
+     * @return a <code>NodeDefinition</code> object.
+     * @see NodeType#getChildNodeDefinitions
      */
     public function getDefinition();
 
@@ -563,20 +566,47 @@
     public function update( $srcWorkspaceName, $shallow );
 
     /**
-     * Performs the same function as update (above) with one restriction:
-     * merge only succeeds if the base version of the corresponding node in
-     * <code>srcWorkspace</code> is a successor (or a successor of a 
successor, etc., to
-     * any degree of separation) of the base version of this node. Otherwise,
-     * the operation throws a <code>MergeException</code>. In repositories that
-     * do not support versioning, <code>merge</code> throws an
-     * <code>UnsupportedRepositoryOperationException</code>. If the current
-     * ticket does not have sufficient rights to perform the 
<code>merge</code> or the
-     * specified workspace does not exist, a 
<code>NoSuchWorkspaceException</code> is thrown.
-     * If the <code>merge</code> succeeds, the changes made to this node are
-     * persisted immediately, there is no need to call <code>save</code>.
+     * This method can be thought of as a version-sensitive update
+     * (see 7.1.7 Updating and Cloning Nodes across Workspaces in the
+     * specification).
+     *
+     * It recursively tests each versionable node in the subtree of this
+     * node against its corresponding node in srcWorkspace with respect to
+     * the relation between their respective base versions and either updates
+     * the node in question or not, depending on the outcome of the test.
+     * For details see 8.2.10 Merge in the specification. A MergeException
+     * is thrown if bestEffort is false and a versionable node is encountered
+     * whose corresponding node's base version is on a divergent branch from
+     * this node's base version.
+     *
+     * If successful, the changes are persisted immediately, there is no need
+     * to call save.
+     *
+     * This method returns a NodeIterator over all versionable nodes in the
+     * subtree that received a merge result of fail.
+     *
+     * If bestEffort is false, this iterator will be empty (since if it merge
+     * returns successfully, instead of throwing an exception, it will be
+     * because no failures were encountered).
+     *
+     * If bestEffort is true, this iterator will contain all nodes that
+     * received a fail during the course of this merge operation.
+     *
+     * If the specified srcWorkspace does not exist, a NoSuchWorkspaceException
+     * is thrown.
+     *
+     * If the current session does not have sufficient permissions to perform
+     * the operation, then an AccessDeniedException is thrown.
+     *
+     * An InvalidItemStateException is thrown if this session (not necessarily
+     * this node) has pending unsaved changes.
+     *
+     * A LockException is thrown if a lock prevents the merge. 
      *
      * @param srcWorkspace the name of the source workspace.
      * @param shallow a boolean
+     * @return iterator over all nodes that received a merge result of "fail"
+     * in the course of this operation.
      * @throws UnsupportedRepositoryOperationException if versioning is not 
supported.
      * @throws MergeException succeeds if the base version of the corresponding
      * node in srcWorkspace is not a successor of the base version of this 
node.
diff -r -u -P phpcr-0.1.orig/php170/nodetype/ItemDefinition.php 
phpcr-0.1/php170/nodetype/ItemDefinition.php
--- phpcr-0.1.orig/php170/nodetype/ItemDefinition.php   1970-01-01 
02:00:00.000000000 +0200
+++ phpcr-0.1/php170/nodetype/ItemDefinition.php        2005-06-16 
12:08:31.000000000 +0300
@@ -0,0 +1,111 @@
+<?php
+
+/*
++----------------------------------------------------------------------+
+| Copyright (c) 2005 Mayflower GmbH                                    |
++----------------------------------------------------------------------+
+| This library is free software; you can redistribute it and/or        |
+| modify it under the terms of the GNU Lesser General Public           |
+| License as published by the Free Software Foundation; either         |
+| version 2 of the License, or (at your option) any later version.     |
+|                                                                      |
+| This library is distributed in the hope that it will be useful,      |
+| but WITHOUT ANY WARRANTY; without even the implied warranty of       |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU    |
+| Lesser General Public License for more details.                      |
+|                                                                      |
+| You should have received a copy of the GNU Lesser General Public     |
+| License along with this library; if not, write to the                |
+| Free Software Foundation, Inc., 59 Temple Place - Suite 330,         |
+| Boston, MA 02111-1307, USA.                                          |
++----------------------------------------------------------------------+
+| Author: Markus Nix <[EMAIL PROTECTED]>                               |
++----------------------------------------------------------------------+
+*/
+
+
+/**
+ * An item definition.
+ *
+ * @author Markus Nix <[EMAIL PROTECTED]>
+ * @copyright (c) 2005 Mayflower GmbH
+ * @version $Id$
+ */
+interface ItemDefinition
+{
+    /**
+     * Gets the node type that contains the declaration of <i>this</i>
+     * <code>ItemDefinition</code>.
+     *
+     * @return a <code>NodeType</code> object.
+     */
+    public function getDeclaringNodeType();
+
+    /**
+     * Gets the name of the child item. If <code>"*"</code>, this
+     * <code>ItemDefinition</code> defines a residual set of child items. That 
is,
+     * it defines the characteristics of all those child items with names apart
+     * from the names explicitly used in other child item definitions.
+     *
+     * @return a <code>String</code> denoting the name or <code>"*"</code>.
+     */
+    public function getName();
+
+    /**
+     * Reports whether the item is to be automatically created when its parent 
node is created.
+     * If <code>true</code>, then this <code>ItemDefinition</code> will 
necessarily not be a residual
+     * set definition but will specify an actual item name (in other words 
getName() will not
+     * return �*�).
+     *
+     * @return a <code>boolean</code>.
+     */
+    public function isAutoCreate();
+
+    /**
+     * Reports whether the item is mandatory. A mandatory child node is one 
that,
+     * if its parent node exists, must also exist. A mandatory property is one 
that
+     * must have a value. In the case of single-value properties this means 
that it
+     * must exist (since there is no such thing a null value). In the case of
+     * multi-value properties this means that the property must exist and must 
have
+     * at least one value (it cannot hold an empty array).
+     * <p/>
+     * A mandatory item cannot be removed, short of removing its parent.
+     * Nor can it be set to the empty array (if it is a multi-value property).
+     * <p/>
+     * An attempt to save a node that has a mandatory child item without first
+     * creating that child item and, if it is a property, giving it a value,
+     * will throw a <code>ConstraintViolationException</code> on 
<code>save</code>.
+     *
+     * @return a <code>boolean</code>
+     */
+    public function isMandatory();
+
+    /**
+     * Gets the on-parent-version status of the child item. This governs what 
to do if
+     * the parent node of this child item is versioned.
+     *
+     * @return an <code>int</code>.
+     */
+    public function getOnParentVersion();
+
+    /**
+     * Reports whether the child item is protected. In level 2 
implementations, a protected item is one that cannot be removed
+     * (except by removing its parent) or modified through the the standard 
write methods of this API (that is, Item.remove,
+     * Node.addNode, Node.setProperty and Property.setValue).
+     * <p/>
+     * A protected node may be removed or modified (in a level 2 
implementation), however, through some
+     * mechanism not defined by this specification or as a side-effect of 
operations other than
+     * the standard write methods of the API. For example, in those 
repositories that support versioning, the
+     * <code>Node.checkin</code> method has the side-effect of changing a 
node's <code>jcr:isCheckedOut</code>
+     * property, even though that property is protected.
+     * <p/>
+     * Note that when a node is protected this means that all its
+     * properties are also protected (regardless of their protected setting). 
The protected status of a property
+     * only becomes relevant if its parent node is not protected.
+     *
+     * @return a <code>boolean</code>.
+     */
+    public function isProtected();
+}
+
+?>
\ No newline at end of file
Only in phpcr-0.1.orig/php170/nodetype: ItemDef.php
diff -r -u -P phpcr-0.1.orig/php170/nodetype/NodeDefinition.php 
phpcr-0.1/php170/nodetype/NodeDefinition.php
--- phpcr-0.1.orig/php170/nodetype/NodeDefinition.php   1970-01-01 
02:00:00.000000000 +0200
+++ phpcr-0.1/php170/nodetype/NodeDefinition.php        2005-06-16 
12:08:31.000000000 +0300
@@ -0,0 +1,78 @@
+<?php
+
+/*
++----------------------------------------------------------------------+
+| Copyright (c) 2005 Mayflower GmbH                                    |
++----------------------------------------------------------------------+
+| This library is free software; you can redistribute it and/or        |
+| modify it under the terms of the GNU Lesser General Public           |
+| License as published by the Free Software Foundation; either         |
+| version 2 of the License, or (at your option) any later version.     |
+|                                                                      |
+| This library is distributed in the hope that it will be useful,      |
+| but WITHOUT ANY WARRANTY; without even the implied warranty of       |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU    |
+| Lesser General Public License for more details.                      |
+|                                                                      |
+| You should have received a copy of the GNU Lesser General Public     |
+| License along with this library; if not, write to the                |
+| Free Software Foundation, Inc., 59 Temple Place - Suite 330,         |
+| Boston, MA 02111-1307, USA.                                          |
++----------------------------------------------------------------------+
+| Author: Markus Nix <[EMAIL PROTECTED]>                               |
++----------------------------------------------------------------------+
+*/
+
+
+require_once 'php170/nodetype/ItemDefinition.php';
+
+
+/**
+ * A node definition. Used in node typed definition
+ *
+ * @author Markus Nix <[EMAIL PROTECTED]>
+ * @copyright (c) 2005 Mayflower GmbH
+ * @version $Id$
+ */
+interface NodeDefinition extends ItemDefinition
+{
+    /**
+     * Gets the minimum set of primary node types that the child node must 
have.
+     * Returns an array to support those implementations with multiple
+     * inheritance. The simplest case would be to return <code>nt:base</code>,
+     * which is the base of all primary node types and therefore, in this
+     * context, represents the least restrictive requirement.
+     * <p>
+     * A node must still have only one assigned primary node type, though
+     * this attribute can restrict that node type by taking advantage of any
+     * inheritance hierarchy that the implementation may support.
+     *
+     * @return an array of <code>NodeType</code> objects.
+     */
+    public function getRequiredPrimaryTypes();
+
+    /**
+     * Gets the default primary node type that will be assigned to the child
+     * node if it is created without an explicitly specified primary node type.
+     * This node type must be a subtype of (or the same type as) the node types
+     * returned by <code>getRequiredPrimaryTypes</code>.
+     * <p/>
+     * If <code>null</code> is returned this indicates that no default primary
+     * type is specified and that therefore an attempt to create this node 
without
+     * specifying a node type will throw a 
<code>ConstraintViolationException</code>.
+     *
+     * @return a <code>NodeType</code>.
+     */
+    public function getDefaultPrimaryType();
+
+    /**
+     * Reports whether this child node can have same-name siblings. In other
+     * words, whether the parent node can have more than one child node of this
+     * name.
+     *
+     * @return a boolean.
+     */
+    public function allowSameNameSibs();
+}
+
+?>
\ No newline at end of file
Only in phpcr-0.1.orig/php170/nodetype: NodeDef.php
diff -r -u -P phpcr-0.1.orig/php170/nodetype/NodeType.php 
phpcr-0.1/php170/nodetype/NodeType.php
--- phpcr-0.1.orig/php170/nodetype/NodeType.php 2005-05-16 00:16:04.000000000 
+0300
+++ phpcr-0.1/php170/nodetype/NodeType.php      2005-06-16 12:51:57.000000000 
+0300
@@ -25,8 +25,8 @@
 
 
 require_once 'php170/Value.php';
-require_once 'php170/nodetype/PropertyDef.php';
-require_once 'php170/nodetype/NodeDef.php';
+require_once 'php170/nodetype/PropertyDefinition.php';
+require_once 'php170/nodetype/NodeDefinition.php';
 require_once 'php170/nodetype/NodeType.php';
 
 
@@ -114,33 +114,33 @@
      * including the property definitions inherited from supertypes of this 
node
      * type.
      *
-     * @see #getDeclaredPropertyDefs
+     * @see #getDeclaredPropertyDefinitions
      *
      * @return an array containing the property definitions.
      */
-    public function getPropertyDefs();
+    public function getPropertyDefinitions();
 
     /**
      * Returns an array containing the property definitions explicitly 
specified
      * in the declaration of <i>this</i> node type. This does <i>not</i> 
include
      * property definitions inherited from supertypes of this node type.
      *
-     * @see #getPropertyDefs
+     * @see #getPropertyDefinitions
      *
      * @return an array containing the property definitions.
      */
-    public function getDeclaredPropertyDefs();
+    public function getDeclaredPropertyDefinitions();
 
     /**
      * Returns an array containing the child node definitions of this node 
type,
      * including the child node definitions inherited from supertypes of this
      * node type.
      *
-     * @see #getDeclaredChildNodeDefs
+     * @see #getDeclaredChildNodeDefinitions
      *
      * @return an array containing the child node definitions.
      */
-    public function getChildNodeDefs();
+    public function getChildNodeDefinitions();
 
     /**
      * Returns an array containing the child node definitions explicitly
@@ -148,10 +148,10 @@
      * <i>not</i> include child node definitions inherited from supertypes of
      * this node type.
      *
-     * @see #getChildNodeDefs
+     * @see #getChildNodeDefinitions
      * @return an array containing the child node definitions.
      */
-    public function getDeclaredChildNodeDefs();
+    public function getDeclaredChildNodeDefinitions();
 
     /**
      * Returns <code>true</code> if setting <code>propertyName</code> to
diff -r -u -P phpcr-0.1.orig/php170/nodetype/PropertyDefinition.php 
phpcr-0.1/php170/nodetype/PropertyDefinition.php
--- phpcr-0.1.orig/php170/nodetype/PropertyDefinition.php       1970-01-01 
02:00:00.000000000 +0200
+++ phpcr-0.1/php170/nodetype/PropertyDefinition.php    2005-06-16 
12:08:31.000000000 +0300
@@ -0,0 +1,248 @@
+<?php
+
+/*
++----------------------------------------------------------------------+
+| Copyright (c) 2005 Mayflower GmbH                                    |
++----------------------------------------------------------------------+
+| This library is free software; you can redistribute it and/or        |
+| modify it under the terms of the GNU Lesser General Public           |
+| License as published by the Free Software Foundation; either         |
+| version 2 of the License, or (at your option) any later version.     |
+|                                                                      |
+| This library is distributed in the hope that it will be useful,      |
+| but WITHOUT ANY WARRANTY; without even the implied warranty of       |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU    |
+| Lesser General Public License for more details.                      |
+|                                                                      |
+| You should have received a copy of the GNU Lesser General Public     |
+| License along with this library; if not, write to the                |
+| Free Software Foundation, Inc., 59 Temple Place - Suite 330,         |
+| Boston, MA 02111-1307, USA.                                          |
++----------------------------------------------------------------------+
+| Author: Markus Nix <[EMAIL PROTECTED]>                               |
++----------------------------------------------------------------------+
+*/
+
+
+require_once 'php170/Value.php';
+require_once 'php170/nodetype/ItemDefinition.php';
+
+
+/**
+ * A property definition. Used in node type definitions.
+ *
+ * @author Markus Nix <[EMAIL PROTECTED]>
+ * @copyright (c) 2005 Mayflower GmbH
+ * @version $Id$
+ */
+interface PropertyDefinition extends ItemDefinition
+{
+    /**
+     * Gets the required type of the property. One of:
+     * <ul>
+     *   <li><code>PropertyType::STRING</code></li>
+     *   <li><code>PropertyType::DATE</code></li>
+     *   <li><code>PropertyType::BINARY</code></li>
+     *   <li><code>PropertyType::DOUBLE</code></li>
+     *   <li><code>PropertyType::LONG</code></li>
+     *   <li><code>PropertyType::BOOLEAN</code></li>
+     *   <li><code>PropertyType::NAME</code></li>
+     *   <li><code>PropertyType::PATH</code></li>
+     *   <li><code>PropertyType::REFERENCE</code></li>
+     *   <li><code>PropertyType::UNDEFINED</code></li>
+     * </ul>
+     * <code>PropertyType.UNDEFINED</code> is returned if this property may be
+     * of any type.
+     *
+     * @return an int
+     */
+    public function getRequiredType();
+
+    /**
+     * Gets the array of constraint strings. Each string in the array specifies
+     * a constraint on the value of the property. The constraints are OR-ed 
together,
+     * meaning that in order to be valid, the value must meet at least one of 
the
+     * constraints. For example, a constraint array of <code>["constraint1", 
"constraint2",
+     * "constraint3"]</code> has the interpretation: "the value of this 
property must
+     * meet either constraint1, constraint2 or constraint3".
+     * <p>
+     * Reporting of value constraints is optional. An implementation may return
+     * <code>null</code>, indicating that value constraint information is 
unavailable
+     * (though a constraint may still exist).
+     * <p/>
+     * Returning an empty array, on the other hand, indicates that value 
constraint information
+     * is available and that no constraints are placed on this value.
+     * <p>
+     * In the case of multi-value properties, the constraint string array
+     * returned applies to all the values of the property.
+     * <p>
+     * The constraint strings themselves having differing formats and 
interpretations
+     * depending on the type of the property in question. The following 
describes the
+     * value constraint syntax for each property type:
+     * <ul>
+     * <li>
+     * <code>STRING</code>: The constraint string is a regular expression 
pattern. For example the
+     * regular expression "<code>.*</code>" means "any string, including the 
empty string". Whereas
+     * a simple literal string (without any RE-specific meta-characters) like 
"<code>banana</code>"
+     * matches only the string "<code>banana</code>".
+     * </li>
+     * <li>
+     * <code>PATH</code>: The constraint string is a <i>JCR path</i> with an 
optional "<code>*</code>" character after
+     * the last "<code>/</code>" character. For example,  possible constraint 
strings for a property
+     * of type <code>PATH</code> include:
+     * <ol>
+     * <li>
+     * "<code>/myapp:products/myapp:televisions</code>"
+     * </li>
+     * <li>
+     * "<code>/myapp:products/myapp:televisions/</code>"
+     * </li>
+     * <li>
+     * "<code>/myapp:products/*</code>"
+     * </li>
+     * <li>
+     * "<code>myapp:products/myapp:televisions</code>"
+     * </li>
+     * <li>
+     * "<code>../myapp:televisions</code>"
+     * </li>
+     * <li>
+     * "<code>../myapp:televisions/*</code>"
+     * </li>
+     * </ol>
+     * The following principles apply:
+     * <ul>
+     * <li>
+     * The "*" means "matches descendants" not "matches any subsequent path". 
For example,
+     * <code>/a/*</code> does not match <code>/a/../c</code>.
+     * The constraint must match the normalized path.
+     * </li>
+     * <li>
+     * Relative path constraint only match relative path values and absolute 
path
+     * constraints only match absolute path values.
+     * </li>
+     * <li>
+     * A trailing "<code>/</code>" has no effect (hence, <code>1</code> and 
<code>2</code>, above, are equivalent).
+     * </li>
+     * <li>
+     * The trailing "<code>*</code>" character means that the value of the 
<code>PATH</code> property is
+     * restricted to the indicated subtree (in other words any additional 
relative path
+     * can replace the "<code>*</code>"). For example, 3, above would allow
+     * <code>/myapp:products/myapp:radios</code>, 
<code>/myapp:products/myapp:microwaves/X900</code>, and so
+     * forth.
+     * </li>
+     * <li>
+     * A constraint without a "<code>*</code>" means that the 
<code>PATH</code> property is restricted to that
+     * precise path. For example, <code>1</code>, above, would allow only the 
value
+     * <code>/myapp:products/myapp:televisions</code>.
+     * </li>
+     * <li>
+     * The constraint can indicate either a relative path or an absolute path
+     * depending on whether it includes a leading "<code>/</code>" character. 
<code>1</code> and <code>4</code>, above for
+     * example, are distinct.
+     * </li>
+     * <li>
+     * The string returned must reflect the namespace mapping in the current 
<code>Session</code>
+     * (i.e., the current state of the namespace registry overlaid with any
+     * session-specific mappings). Constraint strings for <code>PATH</code> 
properties should be
+     * stored in fully-qualified form (using the actual URI instead of the 
prefix) and
+     * then be converted to prefix form according to the current mapping upon 
the
+     * <code>PropertyDefinition.getValueConstraints</code> call.
+     * </li>
+     * </ul>
+     * </li>
+     * <li>
+     * <code>NAME</code>: The constraint string is a <i>JCR name</i> in prefix 
form. For example
+     * "<code>myapp:products</code>". No wildcards or other pattern matching 
are supported. As with
+     * <code>PATH</code> properties, the string returned must reflect the 
namespace mapping in the
+     * current <code>Session</code>. Constraint strings for <code>NAME</code> 
properties should be stored in
+     * fully-qualified form (using the actual URI instead of the prefix) and 
then be
+     * converted to prefix form according to the current mapping.
+     * </li>
+     * <li>
+     * <code>REFERENCE</code>: The constraint string is a <i>JCR name</i> in 
prefix form. This name is
+     * interpreted as a node type name and the <code>REFERENCE</code> property 
is restricted to
+     * referring only to nodes that have at least the indicated node type. For
+     * example, a constraint of "<code>mytype:document</code>" would indicate 
that the REFERENCE
+     * property in question can only refer to nodes that have at least the 
node type
+     * <code>mytype:document</code> (assuming this was the only constraint 
returned in the array,
+     * recall that the array of constraints are to be "OR-ed" together). No 
wildcards or other
+     * pattern matching are supported. As with <code>PATH</code> properties, 
the string returned
+     * must reflect the namespace mapping in the current <code>Session</code>. 
Constraint strings
+     * for <code>REFERENCE</code> properties should be stored in 
fully-qualified form (using the
+     * actual URI instead of the prefix) and then be converted to prefix form 
according to the
+     * current mapping.
+     * </li>
+     * <li>
+     * <code>BOOLEAN</code>: Either "<code>true</code>" or 
"<code>false</code>".
+     * </li>
+     * </ul>
+     * The remaining types all have value constraints in the form of inclusive 
or
+     * exclusive ranges: i.e., "<code>[min, max]</code>", "<code>(min, 
max)</code>",
+     * "<code>(min, max]</code>" or "<code>[min, max)</code>". Where 
"<code>[</code>"
+     * and "<code>]</code>" indicate "inclusive", while "<code>(</code>" and 
"<code>)</code>"
+     * indicate "exclusive". A missing <code>min</code> or <code>max</code> 
value
+     * indicates no bound in that direction. For example [,5] means no minimum 
but a
+     * maximum of 5 (inclusive) while [,] means simply that any value will 
suffice,
+     * The meaning of the <code>min</code> and <code>max</code> values 
themselves
+     * differ between types as follows:
+     * <ul>
+     * <li>
+     * <code>BINARY</code>: <code>min</code> and <code>max</code> specify the 
allowed
+     * size range of the binary value in bytes.
+     * </li>
+     * <li>
+     * <code>DATE</code>: <code>min</code> and <code>max</code> are dates 
specifying the
+     * allowed date range. The date strings must be in the ISO8601-compliant 
format:
+     * <code>YYYY-MM-DDThh:mm:ss.sssTZD</code>.
+     * </li>
+     * <li>
+     * <code>LONG</code>, <code>DOUBLE</code>: min and max are numbers.
+     * </li>
+     * </ul>
+     * Because constraints are returned as an array of disjunctive constraints,
+     * in many cases the elements of the array can serve directly as a "choice 
list".
+     * This may, for example, be used by an application to display options to 
the
+     * end user indicating the set of permitted values.
+     *
+     * @return a <code>String</code> array.
+     */
+    public function getValueConstraints();
+
+    /**
+     * Gets the default value(s) of the property. These are the values
+     * that the property defined by this PropertyDefinition will be assigned 
if it
+     * is automatically created (that is, if [EMAIL PROTECTED] #isAutoCreate()}
+     * returns <code>true</code>).
+     * <p>
+     * This method returns an array of Value objects. If the property is
+     * multi-valued, then this array represents the full set of values
+     * that the property will be assigned upon being auto-created.
+     * Note that this could be the empty array. If the property is 
single-valued,
+     * then the array returned will be of size 1.
+     * <p/>
+     * If <code>null</code> is returned, then the property has no fixed 
default value.
+     * This does not exclude the possibility that the property still assumes 
some
+     * value automatically, but that value may be parameterized (for example,
+     * "the current date") and hence not expressable as a single fixed value.
+     * In particular, this <i>must</i> be the case if <code>isAutoCreate</code>
+     * returns <code>true</code> and this method returns <code>null</code>.
+     *
+     * @return an array of <code>Value</code> objects.
+     */
+    public function getDefaultValues();
+
+    /**
+     * Reports whether this property can have multiple values. Note that the
+     * <code>isMultiple</code> flag is special in that a given node type may
+     * have two property definitions that are identical in every respect except
+     * for the their <code>isMultiple</code> status. For example, a node type
+     * can specify two string properties both called <code>X</code>, one of
+     * which is multi-valued and the other not.
+     *
+     * @return a <code>boolean</code>
+     */
+    public function isMultiple();
+}
+
+?>
\ No newline at end of file
Only in phpcr-0.1.orig/php170/nodetype: PropertyDef.php
Only in phpcr-0.1.orig/php170: PathValue.php
diff -r -u -P phpcr-0.1.orig/php170/Property.php phpcr-0.1/php170/Property.php
--- phpcr-0.1.orig/php170/Property.php  2005-05-16 00:23:53.000000000 +0300
+++ phpcr-0.1/php170/Property.php       2005-06-16 12:08:31.000000000 +0300
@@ -28,7 +28,7 @@
 require_once 'php170/Node.php';
 require_once 'php170/RepositoryException.php';
 require_once 'php170/ValueFormatException.php';
-require_once 'php170/nodetype/PropertyDef.php';
+require_once 'php170/nodetype/PropertyDefinition.php';
 require_once 'php170/version/VersionException.php';
 require_once 'php170/lock/LockException.php';
 require_once 'php170/nodetype/ConstraintViolationException.php';
@@ -246,7 +246,7 @@
      * is a <code>PropertyType.BINARY</code>, otherwise it returns the number
      * of characters needed to display the value (for strings this is the 
string
      * length, for numeric types it is the number of characters needed to
-     * display the number). Returns ?1 if the implementation cannot determine
+     * display the number). Returns �1 if the implementation cannot determine
      * the length.
      *
      * If this property is multi-valued, this method throws a 
<code>ValueFormatException</code>.
@@ -264,7 +264,7 @@
      * numeric types it is the number of characters needed to display the 
number). The order of the
      * length values corresponds to the order of the values in the property.
      * <p/>
-     * Returns a <code>?1</code> in the appropriate position if the 
implementation cannot determine
+     * Returns a <code>�1</code> in the appropriate position if the 
implementation cannot determine
      * the length of a value.
      * <p/>
      * If this property is single-valued, this method throws a 
<code>ValueFormatException</code>.
@@ -284,9 +284,9 @@
      * creation from among others which may have been applicable is an 
implemention issue and is not
      * covered by this specification.
      *
-     * @see NodeType#getPropertyDefs
+     * @see NodeType#getPropertyDefinitions
      * @throws RepositoryException if an error occurs.
-     * @return a <code>PropertyDef</code> object.
+     * @return a <code>PropertyDefinition</code> object.
      */
     public function getDefinition();
 
diff -r -u -P phpcr-0.1.orig/php170/query/QueryManager.php 
phpcr-0.1/php170/query/QueryManager.php
--- phpcr-0.1.orig/php170/query/QueryManager.php        2005-05-15 
23:26:28.000000000 +0300
+++ phpcr-0.1/php170/query/QueryManager.php     2005-06-16 12:08:31.000000000 
+0300
@@ -77,6 +77,7 @@
      * See QueryLanguage.
      *
      * @return An string array.
+     * @throws RepositoryException if an error occurs.
      */
     public function getSupportedQueryLanguages();
 }
diff -r -u -P phpcr-0.1.orig/php170/query/Query.php 
phpcr-0.1/php170/query/Query.php
--- phpcr-0.1.orig/php170/query/Query.php       2005-05-15 23:26:28.000000000 
+0300
+++ phpcr-0.1/php170/query/Query.php    2005-06-16 12:08:31.000000000 +0300
@@ -90,26 +90,74 @@
     public function getLanguage();
 
     /**
-     * If this is a persistent query (i.e., it has been saved), returns the 
path of the
-     * node that persists it. If this query has not been saved, it returns 
null.
+     * If this is a Query object that has been stored using
+     * <code>storeAsNode($string)</code> (regardless of whether it has
+     * been saved yet) or retrieved using
+     * <code>QueryManager.getQuery($node)</code>), then this method returns
+     * the path of the <code>nt:query</code> node that stores the query. If
+     * this is a transient query (that is, a <code>Query</code> object created
+     * with <code>QueryManager.createQuery($string, $string)</code> but not
+     * yet stored) then this method throws an ItemNotFoundException.
      *
      * @return path of persisted node representing this query in content.
      */
-    public function getPersistentQueryPath();
+    public function getStoredQueryPath();
 
     /**
-     * Creates a persistent query. The persisted query will be created as a
-     * node of node type <code>nt:query</code>. This method persists the new 
node
-     * immediately; there is no need to call <code>Node.save</code>.
+     * Creates a node representing this Query in content.
+     *
+     * In a level 1 repository this method throws an
+     * UnsupportedRepositoryOperationException.
+     *
+     * In a level 2 repository it creates a node of type nt:query at absPath
+     * and returns that node.
+     *
+     * In order to persist the newly created node, a save must be performed
+     * that includes the parent of this new node within its scope. In other
+     * words, either a Session.save or an Item.save on the parent or
+     * higher-degree ancestor of absPath must be performed.
+     *
+     * An ItemExistsException will be thrown either immediately (by this
+     * method), or on save, if an item at the specified path already exists
+     * and same-name siblings are not allowed. Implementations may differ
+     * on when this validation is performed.
+     *
+     * A PathNotFoundException will be thrown either immediately , or on
+     * save, if the specified path implies intermediary nodes that do not
+     * exist. Implementations may differ on when this validation is performed.
+     *
+     * A ConstraintViolationExceptionwill be thrown either immediately or
+     * on save, if adding the node would violate a node type or
+     * implementation-specific constraintor if an attempt is made to add
+     * a node as the child of a property. Implementations may differ on when
+     * this validation is performed.
+     *
+     * A VersionException will be thrown either immediately (by this method),
+     * or on save, if the node to which the new child is being added is
+     * versionable and checked-in or is non-versionable but its nearest
+     * versionable ancestor is checked-in. Implementations may differ on when
+     * this validation is performed.
+     *
+     * A LockException will be thrown either immediately (by this method), or
+     * on save, if a lock prevents the addition of the node. Implementations
+     * may differ on when this validation is performed.
      *
      * @param absPath path at which to persist this query.
+     * @return the newly created node.
      * @throws ItemExistsException If an item already exists at the indicated 
position
      * @throws PathNotFoundException If the path cannot be found
      * @throws ConstraintViolationException If creating the node would violate 
a
      * node type (or other implementation specific) constraint.
+     * @throws VersionException f the node to which the new child is being
+     * added is versionable and checked-in or is non-versionable but its
+     * nearest versionable ancestor is checked-in and this implementation
+     * performs this validation immediately instead of waiting until save.
+     * @throws LockException if a lock prevents the addition of the node and
+     * this implementation performs this validation immediately instead of
+     * waiting until save.
      * @throws RepositoryException If another error occurs.
      */
-    public function save( $absPath );
+    public function storeAsNode( $absPath );
 }
 
 ?>
\ No newline at end of file
diff -r -u -P phpcr-0.1.orig/php170/query/QueryResult.php 
phpcr-0.1/php170/query/QueryResult.php
--- phpcr-0.1.orig/php170/query/QueryResult.php 2005-05-15 23:26:28.000000000 
+0300
+++ phpcr-0.1/php170/query/QueryResult.php      2005-06-16 12:08:31.000000000 
+0300
@@ -42,10 +42,10 @@
     /**
      * Returns an array of all the property names (column names) in this 
result set.
      *
-     * @return a <code>PropertyIterator</code>
+     * @return array of strings
      * @throws RepositoryException if an error occurs.
      */
-    public function getPropertyNames();
+    public function getColumnNames();
 
     /**
      * Returns an iterator over the <code>Row</code>s of the query result 
table.
Only in phpcr-0.1.orig/php170: ReferenceValue.php
diff -r -u -P phpcr-0.1.orig/php170/Session.php phpcr-0.1/php170/Session.php
--- phpcr-0.1.orig/php170/Session.php   2005-05-16 00:16:37.000000000 +0300
+++ phpcr-0.1/php170/Session.php        2005-06-16 12:08:31.000000000 +0300
@@ -82,7 +82,7 @@
      *
      * @return the user id from the credentials used to acquire this session.
      */
-    public function getUserId();
+    public function getUserID();
 
     /**
      * Returns the value of the named attribute as an <code>Object</code>, or 
<code>null</code> if no attribute of the
@@ -105,6 +105,30 @@
     public function getAttributeNames();
 
     /**
+     * Returns true if this Session object is usable by the client. Otherwise,
+     * returns false. A usable Session is one that is neither logged-out,
+     * timed-out nor in any other way disconnected from the repository.
+     *
+     * @return true if this Session is usable, false otherwise.
+     */
+    public function isLive();
+
+    /**
+     * This method returns a ValueFactory that is used to create Value
+     * objects for use in setting of repository properties.
+     *
+     * If writing to the repository is not supported (because this is
+     * a level 1-only implementation, for example) an
+     * UnsupportedRepositoryOperationException will be thrown.
+     *
+     * @return a <code>[EMAIL PROTECTED] ValueFactory}</code> object
+     * @throws UnsupportedRepositoryOperationException if writing to the
+     * repository is not supported.
+     * @throws RepositoryException if another error occurs
+     */
+    public function getValueFactory();
+
+    /**
      * Returns the <code>Workspace</code> attached to this 
<code>Session</code>.
      *
      * @return a <code>[EMAIL PROTECTED] Workspace}</code> object.
@@ -173,6 +197,7 @@
      *
      * @param absPath an absolute path
      * @return <code>true</code> if an item exists at <code>absPath</code>; 
otherwise returns <code>false</code>.
+     * @throws RepositoryException if an error occurs.
      */
     public function itemExists( $absPath );
 
@@ -438,6 +463,7 @@
      * A <code>RepositoryException</code> is thrown if another error occurs.
      *
      * @param parentAbsPath the absolute path of a node under which (as child) 
the imported subtree will be built.
+     * @param mode a four-value flag that governs how incoming UUIDs are 
handled.
      *
      * @return an org.xml.sax.ContentHandler whose methods may be called to 
feed SAX events into the deserializer.
      *
@@ -450,7 +476,7 @@
      * @throws LockException if a lock prevents the addition of the subtree.
      * @throws RepositoryException if another error occurs.
      */
-    public function getImportContentHandler( $parentAbsPath );
+    public function getImportContentHandler( $parentAbsPath, $mode );
 
     /**
      * Deserializes an XML document and adds the resulting item subtree as a 
child of the node at
@@ -495,6 +521,7 @@
      *
      * @param parentAbsPath the absolute path of the node below which the 
deserialized subtree is added.
      * @param in The <code>Inputstream</code> from which the XML to be 
deserilaized is read.
+     * @param mode a four-value flag that governs how incoming UUIDs are 
handled.
      *
      * @throws IOException if an error during an I/O operation occurs.
      * @throws PathNotFoundException if no node exists at 
<code>parentAbsPath</code>.
@@ -508,7 +535,7 @@
      * @throws LockException if a lock prevents the addition of the subtree.
      * @throws RepositoryException is another error occurs.
      */
-    public function importXML( $parentAbsPath, $in );
+    public function importXML( $parentAbsPath, $in, $mode );
 
     /**
      * Serializes the node (and if <code>noRecurse</code> is 
<code>false</code>,
@@ -557,7 +584,7 @@
      * <code>org.xml.sax.ContentHandler</code>.
      * @throws RepositoryException if another error occurs.
      */
-    public function exportSysView( $absPath, $out, $skipBinary, $noRecurse );
+    public function exportSystemView( $absPath, $out, $skipBinary, $noRecurse 
);
 
     /**
      * Serializes the node (and if <code>noRecurse</code> is 
<code>false</code>,
@@ -605,7 +632,7 @@
      * <code>org.xml.sax.ContentHandler</code>.
      * @throws RepositoryException if another error occurs.
      */
-    public function exportDocView( $absPath, $out, $skipBinary, $noRecurse );
+    public function exportDocumentView( $absPath, $out, $skipBinary, 
$noRecurse );
 
     /**
      * Within the scope of this session, rename a persistently registered
Only in phpcr-0.1.orig/php170: StringValue.php
diff -r -u -P phpcr-0.1.orig/php170/ValueFactory.php 
phpcr-0.1/php170/ValueFactory.php
--- phpcr-0.1.orig/php170/ValueFactory.php      1970-01-01 02:00:00.000000000 
+0200
+++ phpcr-0.1/php170/ValueFactory.php   2005-06-16 12:08:31.000000000 +0300
@@ -0,0 +1,26 @@
+<?php
+
+require_once 'php170/Value.php';
+require_once 'php170/ValueFormatException.php';
+require_once 'php170/RepositoryException.php';
+
+/**
+ * The ValueFactory object provides methods for the creation Value
+ * objects that can then be used to set properties.
+ */
+interface ValueFactory
+{
+    /**
+     * Returns a Value object of with the specified value and an inferred
+     * type.
+     *
+     * @param the specified value
+     * @return a Value object
+     * @throws ValueFormatException if the specified value format is invalid
+     * @throws RepositoryException if a repository error occurs
+     */
+    public function createValue($value);
+
+}
+
+?>

Reply via email to