jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r785863 - in /jackrabbit/trunk: jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/nodetype/ jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/ jackrabbit-jcr...
Date Thu, 18 Jun 2009 00:11:49 GMT
Author: tripod
Date: Thu Jun 18 00:11:48 2009
New Revision: 785863

URL: http://svn.apache.org/viewvc?rev=785863&view=rev
Log:
JCR-2116 JSR 283: Built-In Node Types

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/BatchedItemOperations.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/JackrabbitRepositoryStub.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/nodetype/builtin_nodetypes.cnd
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/MixinTest.java
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/nodetype/PredefinedNodeTypeTest.java
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/resources/org/apache/jackrabbit/test/api/nodetype/spec/nt-childNodeDefinition.txt
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/resources/org/apache/jackrabbit/test/api/nodetype/spec/nt-folder.txt
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/resources/org/apache/jackrabbit/test/api/nodetype/spec/nt-hierarchyNode.txt
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/resources/org/apache/jackrabbit/test/api/nodetype/spec/nt-linkedFile.txt
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/resources/org/apache/jackrabbit/test/api/nodetype/spec/nt-nodeType.txt
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/resources/org/apache/jackrabbit/test/api/nodetype/spec/nt-propertyDefinition.txt
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/resources/org/apache/jackrabbit/test/api/nodetype/spec/nt-resource.txt
    jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/HierarchyNodeTest.java
    jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/NameConstants.java
    jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/compact/CompactNodeTypeDefReader.java
    jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/compact/Lexer.java
    jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/AbstractQValueFactory.java
    jackrabbit/trunk/jackrabbit-spi2jcr/pom.xml

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/BatchedItemOperations.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/BatchedItemOperations.java?rev=785863&r1=785862&r2=785863&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/BatchedItemOperations.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/BatchedItemOperations.java Thu Jun 18 00:11:48 2009
@@ -1542,7 +1542,8 @@
                 }
                 genValues = values.toArray(new InternalValue[values.size()]);
             }
-        } else if (NameConstants.NT_HIERARCHYNODE.equals(declaringNT)) {
+        } else if (NameConstants.NT_HIERARCHYNODE.equals(declaringNT)
+                || NameConstants.MIX_CREATED.equals(declaringNT)) {
             // nt:hierarchyNode node type
             if (NameConstants.JCR_CREATED.equals(name)) {
                 // jcr:created property

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/JackrabbitRepositoryStub.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/JackrabbitRepositoryStub.java?rev=785863&r1=785862&r2=785863&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/JackrabbitRepositoryStub.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/JackrabbitRepositoryStub.java Thu Jun 18 00:11:48 2009
@@ -278,6 +278,8 @@
         }
 
         Node resource = node.addNode("myResource", "nt:resource");
+        // nt:resource not longer referenceable since JCR 2.0
+        resource.addMixin("mix:referenceable");
         resource.setProperty("jcr:encoding", ENCODING);
         resource.setProperty("jcr:mimeType", "text/plain");
         resource.setProperty(

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java?rev=785863&r1=785862&r2=785863&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java Thu Jun 18 00:11:48 2009
@@ -328,7 +328,8 @@
                genValues = new InternalValue[]{InternalValue.create(new UUID(hist.getRootVersion().getUUID()))};
            }
 */
-        } else if (nt.getQName().equals(NameConstants.NT_HIERARCHYNODE)) {
+        } else if (nt.getQName().equals(NameConstants.NT_HIERARCHYNODE)
+                || nt.getQName().equals(NameConstants.MIX_CREATED)) {
             // nt:hierarchyNode node type
             if (name.equals(NameConstants.JCR_CREATED)) {
                 // jcr:created property

Modified: jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/nodetype/builtin_nodetypes.cnd
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/nodetype/builtin_nodetypes.cnd?rev=785863&r1=785862&r2=785863&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/nodetype/builtin_nodetypes.cnd (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/nodetype/builtin_nodetypes.cnd Thu Jun 18 00:11:48 2009
@@ -21,27 +21,281 @@
 <mix='http://www.jcp.org/jcr/mix/1.0'>
 
 //------------------------------------------------------------------------------
-// B A S E  T Y P E S
+// B A S E  T Y P E
 //------------------------------------------------------------------------------
 
+/**
+ * nt:base is an abstract primary node type that is the base type for all other
+ * primary node types. It is the only primary node type without supertypes.
+ *
+ * @since 1.0
+ */
 [nt:base]
-  - jcr:primaryType (name) mandatory autocreated protected compute
-  - jcr:mixinTypes (name) protected multiple compute
+  // abstract (currently fails due to JCR-2159)
+  - jcr:primaryType (NAME) mandatory autocreated protected COMPUTE
+  - jcr:mixinTypes (NAME) protected multiple COMPUTE
+
+//------------------------------------------------------------------------------
+// S T A N D A R D   A P P L I C A T I O N   N O D E   T Y P E S
+//------------------------------------------------------------------------------
+
+/**
+ * This abstract node type serves as the supertype of nt:file and nt:folder.
+ * @since 1.0
+ */
+[nt:hierarchyNode] > nt:base, mix:created
+  // abstract (currently fails due to JCR-2159)
+
+/**
+ * Nodes of this node type may be used to represent files. This node type inherits
+ * the item definitions of nt:hierarchyNode and requires a single child node called
+ * jcr:content. The jcr:content node is used to hold the actual content of the
+ * file. This child node is mandatory, but not auto-created. Its node type will be
+ * application-dependent and therefore it must be added by the user. A common
+ * approach is to make the jcr:content a node of type nt:resource. The
+ * jcr:content child node is also designated as the primary child item of its parent.
+ *
+ * @since 1.0
+ */
+[nt:file] > nt:hierarchyNode
+  primaryitem jcr:content
+  + jcr:content (nt:base) mandatory
+
+/**
+ * The nt:linkedFile node type is similar to nt:file, except that the content
+ * node is not stored directly as a child node, but rather is specified by a
+ * REFERENCE property. This allows the content node to reside anywhere in the
+ * workspace and to be referenced by multiple nt:linkedFile nodes. The content
+ * node must be referenceable.
+ *
+ * @since 1.0
+ */
+[nt:linkedFile] > nt:base, nt:hierarchyNode
+  primaryitem jcr:content
+  - jcr:content (REFERENCE) mandatory
+
+/**
+ * Nodes of this type may be used to represent folders or directories. This node
+ * type inherits the item definitions of nt:hierarchyNode and adds the ability
+ * to have any number of other nt:hierarchyNode child nodes with any names.
+ * This means, in particular, that it can have child nodes of types nt:folder,
+ * nt:file or nt:linkedFile.
+ *
+ * @since 1.0
+ */
+[nt:folder] > nt:base, nt:hierarchyNode
+  + * (nt:hierarchyNode) VERSION
+
+/**
+ * This node type may be used to represent the content of a file. In particular,
+ * the jcr:content subnode of an nt:file node will often be an nt:resource.
+ *
+ * @since 1.0
+ */
+[nt:resource] > nt:base, mix:mimeType, mix:lastModified
+  primaryitem jcr:data
+  - jcr:data (BINARY) mandatory
+  
+/**
+ * This mixin node type can be used to add standardized title and description
+ * properties to a node.
+ *
+ * Note that the protected attributes suggested by JSR283 are omitted in this variant.
+ * @since 2.0
+ */
+[mix:title]
+  mixin
+  - jcr:title (STRING)
+  - jcr:description (STRING)
+
+/**
+ * This mixin node type can be used to add standardized creation information
+ * properties to a node. Since the properties are protected, their values are
+ * controlled by the repository, which should set them appropriately upon the
+ * initial persist of a node with this mixin type. In cases where this mixin is
+ * added to an already existing node the semantics of these properties are
+ * implementation specific.
+ *
+ * @since 2.0
+ */
+[mix:created]
+  mixin
+  - jcr:created (DATE) autocreated protected
+  - jcr:createdBy (STRING) protected
+
+/**
+ * This mixin node type can be used to provide standardized modification
+ * information properties to a node.
+ *
+ * The following is not yet implemented in Jackrabbit:
+ * "Since the properties are protected, their values
+ *  are controlled by the repository, which should set them appropriately upon a
+ *  significant modification of the subgraph of a node with this mixin. What
+ *  constitutes a significant modification will depend on the semantics of the various
+ *  parts of a node's subgraph and is implementation-dependent"
+ *
+ * Note that the protected attributes suggested by JSR283 are omitted in this variant.
+ * @since 2.0
+ */
+[mix:lastModified]
+  mixin
+  - jcr:lastModified (DATE)
+  - jcr:lastModifiedBy (STRING)
+
+/**
+ * This mixin node type can be used to provide a standardized property that
+ * specifies the natural language in which the content of a node is expressed.
+ * The value of the jcr:language property should be a language code as defined
+ * in RFC 46465. Examples include "en" (English), "en-US" (United States English),
+ * "de" (German) and "de-CH" (Swiss German).
+ *
+ * Note that the protected attributes suggested by JSR283 are omitted in this variant.
+ * @since 2.0
+ */
+[mix:language]
+  mixin
+  - jcr:language (STRING)
 
+/**
+ * This mixin node type can be used to provide standardized mimetype and
+ * encoding properties to a node. If a node of this type has a primary item
+ * that is a single-value BINARY property then jcr:mimeType property indicates
+ * the media type applicable to the contents of that property and, if that
+ * media type is one to which a text encoding applies, the jcr:encoding property
+ * indicates the character set used. If a node of this type does not meet the
+ * above precondition then the interpretation of the jcr:mimeType and
+ * jcr:encoding properties is implementation-dependent.
+ *
+ * Note that the protected attributes suggested by JSR283 are omitted in this variant.
+ * @since 2.0
+ */
+[mix:mimeType]
+  mixin
+  - jcr:mimeType (STRING)
+  - jcr:encoding (STRING)
+
+/**
+ * This node type may be used to represent the location of a JCR item not just
+ * within a particular workspace but within the space of all workspaces in all JCR
+ * repositories.
+ *
+ * @prop jcr:protocol Stores a string holding the protocol through which the
+ *                    target repository is to be accessed.
+ * @prop jcr:host     Stores a string holding the host name of the system
+ *                    through which the repository is to be accessed.
+ * @prop jcr:port     Stores a string holding the port number through which the
+ *                    target repository is to be accessed.
+ *
+ * The semantics of these properties above are left undefined but are assumed to be
+ * known by the application. The names and descriptions of the properties are not
+ * normative and the repository does not enforce any particular semantic
+ * interpretation on them.
+ *
+ * @prop jcr:repository Stores a string holding the name of the target repository.
+ * @prop jcr:workspace  Stores the name of a workspace.
+ * @prop jcr:path       Stores a path to an item.
+ * @prop jcr:id         Stores a weak reference to a node.
+ *
+ * In most cases either the jcr:path or the jcr:id property would be used, but
+ * not both, since they may point to different nodes. If any of the properties
+ * other than jcr:path and jcr:id are missing, the address can be interpreted as
+ * relative to the current container at the same level as the missing specifier.
+ * For example, if no repository is specified, then the address can be
+ * interpreted as referring to a workspace and path or id within the current
+ * repository.
+ *
+ * @since 2.0
+ */
+[nt:address]
+  - jcr:protocol (STRING)
+  - jcr:host (STRING)
+  - jcr:port (STRING)
+  - jcr:repository (STRING)
+  - jcr:workspace (STRING)
+  - jcr:path (PATH)
+  - jcr:id (WEAKREFERENCE)
+
+/**
+ * The mix:etag mixin type defines a standardized identity validator for BINARY 
+ * properties similar to the entity tags used in HTTP/1.1
+ *
+ * A jcr:etag property is an opaque string whose syntax is identical to that
+ * defined for entity tags in HTTP/1.1. Semantically, the jcr:etag is comparable
+ * to the HTTP/1.1 strong entity tag.
+ *
+ * On creation of a mix:etag node N, or assignment of mix:etag to N, the
+ * repository must create a jcr:etag property with an implementation determined
+ * value.
+ *
+ * The value of the jcr:etag property must change immediately on persist of any
+ * of the following changes to N:
+ * - A BINARY property is added t o N.
+ * - A BINARY property is removed from N.
+ * - The value of an existing BINARY property of N changes.
+ *
+ * @since 2.0
+ */
+[mix:etag]
+  mixin
+  // currently has a default value because auto-creation not handled see JCR-2116
+  - jcr:etag (STRING) = '' protected autocreated
+
+//------------------------------------------------------------------------------
+// U N S T R U C T U R E D   C O N T E N T
+//------------------------------------------------------------------------------
+
+/**
+ * This node type is used to store unstructured content. It allows any number of
+ * child nodes or properties with any names. It also allows multiple nodes having
+ * the same name as well as both multi-value and single-value properties with any
+ * names. This node type also supports client-orderable child nodes.
+ *
+ * @since 1.0
+ */
 [nt:unstructured]
   orderable
-  - * (undefined) multiple
-  - * (undefined)
-  + * (nt:base) = nt:unstructured multiple version
+  - * (UNDEFINED) multiple
+  - * (UNDEFINED)
+  + * (nt:base) = nt:unstructured sns VERSION
+
+//------------------------------------------------------------------------------
+// R E F E R E N C E A B L E
+//------------------------------------------------------------------------------
 
+/**
+ * This node type adds an auto-created, mandatory, protected STRING property to
+ * the node, called jcr:uuid, which exposes the identifier of the node.
+ * Note that the term "UUID" is used for backward compatibility with JCR 1.0
+ * and does not necessarily imply the use of the UUID syntax, or global uniqueness.
+ * The identifier of a referenceable node must be a referenceable identifier.
+ * Referenceable identifiers must fulfill a number of constraints beyond the
+ * minimum required of standard identifiers (see ยค3.8.3 Referenceable Identifiers).
+ * A reference property is a property that holds the referenceable identifier of a
+ * referenceable node and therefore serves as a pointer to that node. The two types
+ * of reference properties, REFERENCE and WEAKREFERENCE differ in that the former
+ * enforces referential integrity while the latter does not.
+ *
+ * @since 1.0
+ */
 [mix:referenceable]
   mixin
-  - jcr:uuid (string) mandatory autocreated protected initialize
+  - jcr:uuid (STRING) mandatory autocreated protected INITIALIZE 
+
+//------------------------------------------------------------------------------
+// L O C K I N G
+//------------------------------------------------------------------------------
 
+/**
+ * @since 1.0
+ */
 [mix:lockable]
   mixin
-  - jcr:lockOwner (string) protected ignore
-  - jcr:lockIsDeep (boolean) protected ignore
+  - jcr:lockOwner (STRING) protected IGNORE
+  - jcr:lockIsDeep (BOOLEAN) protected IGNORE
+
+//------------------------------------------------------------------------------
+// S H A R E A B L E   N O D E S
+//------------------------------------------------------------------------------
 
 /**
  * @since 2.0
@@ -58,163 +312,204 @@
  */
 [mix:simpleVersionable]
   mixin
-  - jcr:isCheckedOut (boolean) = 'true' mandatory autocreated protected ignore
+  - jcr:isCheckedOut (BOOLEAN) = 'true' mandatory autocreated protected IGNORE
 
+/**
+ * @since 1.0
+ */
 [mix:versionable] > mix:simpleVersionable, mix:referenceable
   mixin
-  - jcr:versionHistory (reference) mandatory protected
-    < 'nt:versionHistory'
-  - jcr:baseVersion (reference) mandatory protected ignore
-    < 'nt:version'
-  - jcr:predecessors (reference) mandatory protected multiple
-    < 'nt:version'
-  - jcr:mergeFailed (reference) protected multiple abort
+  - jcr:versionHistory (REFERENCE) mandatory protected < 'nt:versionHistory'
+  - jcr:baseVersion (REFERENCE) mandatory protected IGNORE < 'nt:version'
+  - jcr:predecessors (REFERENCE) mandatory protected multiple < 'nt:version'
+  - jcr:mergeFailed (REFERENCE) protected multiple ABORT < 'nt:version'
     /** @since 2.0 */
-  - jcr:activity (reference) protected
-    < 'nt:activity'
+  - jcr:activity (REFERENCE) protected < 'nt:activity'
     /** @since 2.0 */
-  - jcr:configuration (reference) protected
-    < 'nt:configuration'
+  - jcr:configuration (REFERENCE) protected < 'nt:configuration'
 
+/**
+ * @since 1.0
+ */
 [nt:versionHistory] > nt:base, mix:referenceable
-  - jcr:versionableUuid (string) mandatory autocreated protected abort
+  - jcr:versionableUuid (STRING) mandatory autocreated protected ABORT
     /** @since 2.0 */
-  - jcr:copiedFrom (weakreference) protected abort < 'nt:version'
-  + jcr:rootVersion (nt:version) = nt:version mandatory autocreated protected abort
-  + jcr:versionLabels (nt:versionLabels) = nt:versionLabels mandatory autocreated protected abort
-  + * (nt:version) = nt:version protected abort
+  - jcr:copiedFrom (WEAKREFERENCE) protected ABORT < 'nt:version'
+  + jcr:rootVersion (nt:version) = nt:version mandatory autocreated protected ABORT
+  + jcr:versionLabels (nt:versionLabels) = nt:versionLabels mandatory autocreated protected ABORT
+  + * (nt:version) = nt:version protected ABORT
 
+/**
+ * @since 1.0
+ */
 [nt:versionLabels]
-  - * (reference) protected abort
-    < 'nt:version'
+  - * (REFERENCE) protected ABORT < 'nt:version'
 
+/**
+ * @since 1.0
+ */
 [nt:version] > nt:base, mix:referenceable
-  - jcr:created (date) mandatory autocreated protected abort
-  - jcr:predecessors (reference) protected multiple abort
-    < 'nt:version'
-  - jcr:successors (reference) protected multiple abort
-    < 'nt:version'
+  - jcr:created (DATE) mandatory autocreated protected ABORT
+  - jcr:predecessors (REFERENCE) protected multiple ABORT < 'nt:version'
+  - jcr:successors (REFERENCE) protected multiple ABORT < 'nt:version'
     /** @since 2.0 */
-  - jcr:activity (reference) protected abort
-    < 'nt:activity'
-  + jcr:frozenNode (nt:frozenNode) protected abort
+  - jcr:activity (REFERENCE) protected ABORT < 'nt:activity'
+  + jcr:frozenNode (nt:frozenNode) protected ABORT
 
+/**
+ * @since 1.0
+ */
 [nt:frozenNode] > nt:base, mix:referenceable
   orderable
-  - jcr:frozenPrimaryType (name) mandatory autocreated protected abort
-  - jcr:frozenMixinTypes (name) protected multiple abort
-  - jcr:frozenUuid (string) mandatory autocreated protected abort
-  - * (undefined) protected abort
-  - * (undefined) protected multiple abort
-  + * (nt:base) protected multiple abort
+  - jcr:frozenPrimaryType (NAME) mandatory autocreated protected ABORT
+  - jcr:frozenMixinTypes (NAME) protected multiple ABORT
+  - jcr:frozenUuid (STRING) mandatory autocreated protected ABORT
+  - * (UNDEFINED) protected ABORT
+  - * (UNDEFINED) protected multiple ABORT
+  + * (nt:base) protected sns ABORT
 
+/**
+ * @since 1.0
+ */
 [nt:versionedChild]
-  - jcr:childVersionHistory (reference) mandatory autocreated protected abort
-    < 'nt:versionHistory'
+  - jcr:childVersionHistory (REFERENCE) mandatory autocreated protected ABORT < 'nt:versionHistory'
 
 /**
  * @since 2.0
  */
 [nt:activity] > nt:base, mix:referenceable
-  - jcr:activityTitle (string) mandatory autocreated protected
+  - jcr:activityTitle (STRING) mandatory autocreated PROTECTED
 
 /**
  * @since 2.0
  */
 [nt:configuration] > nt:base, mix:versionable
-  - jcr:root (reference) mandatory autocreated protected
+  - jcr:root (REFERENCE) mandatory autocreated protected
 
 //------------------------------------------------------------------------------
 // N O D E T Y P E S
 //------------------------------------------------------------------------------
 
+/**
+ * This node type is used to store a node type definition. Property and child node
+ * definitions within the node type definition are stored as same-name sibling nodes
+ * of type nt:propertyDefinition and nt:childNodeDefinition.
+ *
+ * @since 1.0
+ */
 [nt:nodeType]
-  - jcr:nodeTypeName (name) mandatory
-  - jcr:supertypes (name) multiple
-  - jcr:isMixin (boolean) mandatory
-  - jcr:hasOrderableChildNodes (boolean) mandatory
-  - jcr:primaryItemName (name)
-  + jcr:propertyDefinition (nt:propertyDefinition) = nt:propertyDefinition multiple version
-  + jcr:childNodeDefinition (nt:childNodeDefinition) = nt:childNodeDefinition multiple version
+  - jcr:nodeTypeName (NAME) protected mandatory
+  - jcr:supertypes (NAME) protected multiple
+  - jcr:isAbstract (BOOLEAN) protected mandatory
+  - jcr:isQueryable (BOOLEAN) protected mandatory
+  - jcr:isMixin (BOOLEAN) protected mandatory
+  - jcr:hasOrderableChildNodes (BOOLEAN) protected mandatory
+  - jcr:primaryItemName (NAME) protected
+  + jcr:propertyDefinition (nt:propertyDefinition) = nt:propertyDefinition protected sns
+  + jcr:childNodeDefinition (nt:childNodeDefinition) = nt:childNodeDefinition protected sns
 
+/**
+ * This node type used to store a property definition within a node type definition,
+ * which itself is stored as an nt:nodeType node.
+ *
+ * @since 1.0
+ */
 [nt:propertyDefinition]
-  - jcr:name (name)
-  - jcr:autoCreated (boolean) mandatory
-  - jcr:mandatory (boolean) mandatory
-  - jcr:onParentVersion (string) mandatory
-    < 'COPY', 'VERSION', 'INITIALIZE', 'COMPUTE', 'IGNORE', 'ABORT'
-  - jcr:protected (boolean) mandatory
-  - jcr:requiredType (string) mandatory
-    < 'STRING', 'BINARY', 'LONG', 'DOUBLE', 'BOOLEAN', 'DATE', 'NAME', 'PATH', 'REFERENCE', 'UNDEFINED'
-  - jcr:valueConstraints (string) multiple
-  - jcr:defaultValues (undefined) multiple
-  - jcr:multiple (boolean) mandatory
+  - jcr:name (NAME) protected 
+  - jcr:autoCreated (BOOLEAN) protected mandatory
+  - jcr:mandatory (BOOLEAN) protected mandatory
+  - jcr:onParentVersion (STRING) protected mandatory
+      < 'COPY', 'VERSION', 'INITIALIZE', 'COMPUTE', 'IGNORE', 'ABORT'
+  - jcr:protected (BOOLEAN) protected mandatory
+  - jcr:requiredType (STRING) protected mandatory
+    < 'STRING', 'URI', 'BINARY', 'LONG', 'DOUBLE',
+      'DECIMAL', 'BOOLEAN', 'DATE', 'NAME', 'PATH',
+      'REFERENCE', 'WEAKREFERENCE', 'UNDEFINED'
+  - jcr:valueConstraints (STRING) protected multiple
+  - jcr:defaultValues (UNDEFINED) protected multiple
+  - jcr:multiple (BOOLEAN) protected mandatory
+  - jcr:availableQueryOperators (NAME) protected mandatory multiple
+  - jcr:isFullTextSearchable (BOOLEAN) protected mandatory
+  - jcr:isQueryOrderable (BOOLEAN) protected mandatory
 
+/**
+ * This node type used to store a child node definition within a node type definition,
+ * which itself is stored as an nt:nodeType node.
+ *
+ * @since 1.0
+ */
 [nt:childNodeDefinition]
-  - jcr:name (name)
-  - jcr:autoCreated (boolean) mandatory
-  - jcr:mandatory (boolean) mandatory
-  - jcr:onParentVersion (string) mandatory
-    < 'COPY', 'VERSION', 'INITIALIZE', 'COMPUTE', 'IGNORE', 'ABORT'
-  - jcr:protected (boolean) mandatory
-  - jcr:requiredPrimaryTypes (name) = 'nt:base' mandatory multiple
-  - jcr:defaultPrimaryType (name)
-  - jcr:sameNameSiblings (boolean) mandatory
+  - jcr:name (NAME) protected
+  - jcr:autoCreated (BOOLEAN) protected mandatory
+  - jcr:mandatory (BOOLEAN) protected mandatory
+  - jcr:onParentVersion (STRING) protected mandatory 
+      < 'COPY', 'VERSION', 'INITIALIZE', 'COMPUTE', 'IGNORE', 'ABORT'
+  - jcr:protected (BOOLEAN) protected mandatory
+  - jcr:requiredPrimaryTypes (NAME) = 'nt:base' protected mandatory multiple
+  - jcr:defaultPrimaryType (NAME) protected
+  - jcr:sameNameSiblings (BOOLEAN) protected mandatory
 
 //------------------------------------------------------------------------------
-// M I S C
+// Q U E R Y
 //------------------------------------------------------------------------------
 
-[nt:hierarchyNode]
-  - jcr:created (date) autocreated protected initialize
-
-[nt:folder] > nt:hierarchyNode
-  + * (nt:hierarchyNode) version
-
-[nt:file] > nt:hierarchyNode
-  + jcr:content (nt:base) primary mandatory
-
-[nt:linkedFile] > nt:hierarchyNode
-  - jcr:content (reference) primary mandatory
-
-[nt:resource] > nt:base, mix:referenceable
-  - jcr:encoding (string)
-  - jcr:mimeType (string) mandatory
-  - jcr:data (binary) primary mandatory
-  - jcr:lastModified (date) mandatory ignore
-
+/**
+ * @since 1.0
+ */
 [nt:query]
   - jcr:statement (string)
   - jcr:language (string)
 
 //------------------------------------------------------------------------------
+// L I F E C Y C L E   M A N A G E M E N T
+//------------------------------------------------------------------------------
+
+/**
+ * Only nodes with mixin node type mix:lifecycle may participate in a lifecycle.
+ *
+ * @peop jcr:lifecyclePolicy
+ *              This property is a reference to another node that contains
+ *              lifecycle policy information. The definition of the referenced
+ *              node is not specified.
+ * @prop jcr:currentLifecycleState
+ *              This property is a string identifying the current lifecycle
+ *              state of this node. The format of this string is not specified.
+ *
+ * @since 2.0
+ */
+[mix:lifecycle]
+  mixin
+  - jcr:lifecyclePolicy (REFERENCE) protected INITIALIZE
+  - jcr:currentLifecycleState (STRING) protected INITIALIZE
+
+//------------------------------------------------------------------------------
 // J A C K R A B B I T   I N T E R N A L S
 //------------------------------------------------------------------------------
 
 [rep:nodeTypes]
-  + * (nt:nodeType) = nt:nodeType protected abort
+  + * (nt:nodeType) = nt:nodeType protected ABORT
 
 [rep:root] > nt:unstructured
-  + jcr:system (rep:system) = rep:system mandatory ignore
+  + jcr:system (rep:system) = rep:system mandatory IGNORE
 
 [rep:system]
   orderable
-  + jcr:versionStorage (rep:versionStorage) = rep:versionStorage mandatory protected abort
-  + jcr:nodeTypes (rep:nodeTypes) = rep:nodeTypes mandatory protected abort
-  + * (nt:base) = nt:unstructured multiple ignore
+  + jcr:versionStorage (rep:versionStorage) = rep:versionStorage mandatory protected ABORT
+  + jcr:nodeTypes (rep:nodeTypes) = rep:nodeTypes mandatory protected ABORT
+  + * (nt:base) = nt:unstructured sns IGNORE
 
 // implementation note: currently we keep the activities below the version storage
 // because of the complexity of adding new virtual item state providers.
 // the future goal is to keep them as siblings, of course.
 
 [rep:versionStorage]
-  + * (nt:versionHistory) = nt:versionHistory protected multiple abort
-  + * (rep:versionStorage) = rep:versionStorage protected multiple abort
-  + * (rep:activities) = rep:activities protected multiple abort
+  + * (nt:versionHistory) = nt:versionHistory protected sns ABORT
+  + * (rep:versionStorage) = rep:versionStorage protected sns ABORT
+  + * (rep:activities) = rep:activities protected sns ABORT
 
 [rep:activities]
-  + * (nt:activity) = nt:activity protected multiple abort
-  + * (rep:activities) = rep:activities protected multiple abort
+  + * (nt:activity) = nt:activity protected sns ABORT
+  + * (rep:activities) = rep:activities protected sns ABORT
 
 // implementation note: because node references are not maintained within the
 // version storage, we store a bidirectional relationship between activities and
@@ -228,19 +523,20 @@
 
 [rep:AccessControllable]
   mixin
-  + rep:policy (rep:Policy) protected ignore
+  + rep:policy (rep:Policy) protected IGNORE
 
-[rep:Policy] abstract
+[rep:Policy]
+  abstract
 
 [rep:ACL] > rep:Policy
-  + * (rep:ACE) = rep:GrantACE protected ignore
+  + * (rep:ACE) = rep:GrantACE protected IGNORE
 
 [rep:ACE]
-  - rep:principalName (string) protected mandatory
-  - rep:privileges (name) protected mandatory multiple
-  - rep:nodePath (path) protected
-  - rep:glob (string) protected
-  - * (undefined) protected
+  - rep:principalName (STRING) protected mandatory
+  - rep:privileges (NAME) protected mandatory multiple
+  - rep:nodePath (PATH) protected
+  - rep:glob (STRING) protected
+  - * (UNDEFINED) protected
 
 [rep:GrantACE] > rep:ACE
 
@@ -251,38 +547,39 @@
 // -----------------------------------------------------------------------------
 
 [rep:AccessControl]
-  + * (rep:AccessControl) protected ignore
-  + * (rep:PrincipalAccessControl) protected ignore
+  + * (rep:AccessControl) protected IGNORE
+  + * (rep:PrincipalAccessControl) protected IGNORE
 
 [rep:PrincipalAccessControl] > rep:AccessControl
-  + rep:policy (rep:Policy) protected ignore
+  + rep:policy (rep:Policy) protected IGNORE
 
 // -----------------------------------------------------------------------------
 // User Management 
 // -----------------------------------------------------------------------------
 
-[rep:Authorizable] > nt:base, mix:referenceable abstract
-  + * (rep:Authorizable) = rep:Authorizable protected version
-  + * (rep:AuthorizableFolder) = rep:AuthorizableFolder protected version
-  - rep:principalName (string) protected mandatory
-  - rep:referees (string) protected multiple
-  - rep:groups (weakreference) protected multiple < 'rep:Group'
-  - * (undefined)
-  - * (undefined) multiple
+[rep:Authorizable] > nt:base, mix:referenceable
+  abstract
+  + * (rep:Authorizable) = rep:Authorizable protected VERSION
+  + * (rep:AuthorizableFolder) = rep:AuthorizableFolder protected VERSION
+  - rep:principalName (STRING) protected mandatory
+  - rep:referees (STRING) protected multiple
+  - rep:groups (WEAKREFERENCE) protected multiple < 'rep:Group'
+  - * (UNDEFINED)
+  - * (UNDEFINED) multiple
 
 [rep:Impersonatable]
   mixin
-  - rep:impersonators (string) protected multiple
+  - rep:impersonators (STRING) protected multiple
 
 [rep:User] > rep:Authorizable, rep:Impersonatable
-  - rep:userId (string) protected mandatory
-  - rep:password (string) protected mandatory
+  - rep:userId (STRING) protected mandatory
+  - rep:password (STRING) protected mandatory
 
 [rep:Group] > rep:Authorizable
 
 [rep:AuthorizableFolder] > nt:base, mix:referenceable
-  + * (rep:Authorizable) = rep:User protected version
-  + * (rep:AuthorizableFolder) = rep:AuthorizableFolder protected version
+  + * (rep:Authorizable) = rep:User protected VERSION
+  + * (rep:AuthorizableFolder) = rep:AuthorizableFolder protected VERSION
 
 // -----------------------------------------------------------------------------
 // J A C K R A B B I T  R E T E N T I O N  M A N A G E M E N T
@@ -290,5 +587,5 @@
 
 [rep:RetentionManageable]
   mixin
-  - rep:hold (undefined) protected  multiple ignore
-  - rep:retentionPolicy (undefined) protected ignore
\ No newline at end of file
+  - rep:hold (UNDEFINED) protected  multiple IGNORE
+  - rep:retentionPolicy (UNDEFINED) protected IGNORE
\ No newline at end of file

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/MixinTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/MixinTest.java?rev=785863&r1=785862&r2=785863&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/MixinTest.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/MixinTest.java Thu Jun 18 00:11:48 2009
@@ -34,10 +34,10 @@
 
         JackrabbitNodeTypeManager manager = (JackrabbitNodeTypeManager)
             superuser.getWorkspace().getNodeTypeManager();
-        if (!manager.hasNodeType("test:referenceable")) {
+        if (!manager.hasNodeType("test:mimeType")) {
             String cnd =
                 "<test='http://www.apache.org/jackrabbit/test'>\n"
-                + "[test:referenceable] > mix:referenceable mixin";
+                + "[test:mimeType] > mix:mimeType mixin";
             manager.registerNodeTypes(
                     new ByteArrayInputStream(cnd.getBytes()),
                     JackrabbitNodeTypeManager.TEXT_X_JCR_CND);
@@ -45,7 +45,7 @@
     }
 
     public void testBuiltInMixin() throws RepositoryException {
-        // nt:resoure is referenceable by its node type definition
+        // nt:resource is mix:mimeType by its node type definition
         Node n1 = testRootNode.addNode("n1", "nt:resource");
         n1.setProperty("jcr:data", new ByteArrayInputStream("hello world".getBytes()));
         n1.setProperty("jcr:lastModified", Calendar.getInstance());
@@ -53,15 +53,15 @@
 
         // assign mix:referenceable to arbitrary node
         Node n2 = testRootNode.addNode("n2");
-        n2.addMixin("mix:referenceable");
+        n2.addMixin("mix:mimeType");
 
-        // make node referenceable using a mixin that extends from mix:referenceable
+        // make node referenceable using a mixin that extends from mix:mimeType
         Node n3 = testRootNode.addNode("n3");
-        n3.addMixin("test:referenceable");
+        n3.addMixin("test:mimeType");
 
         testRootNode.save();
 
-        String query = testPath + "//element(*, mix:referenceable)";
+        String query = testPath + "//element(*, mix:mimeType)";
         executeXPathQuery(query, new Node[]{n1, n2, n3});
     }
 

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/nodetype/PredefinedNodeTypeTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/nodetype/PredefinedNodeTypeTest.java?rev=785863&r1=785862&r2=785863&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/nodetype/PredefinedNodeTypeTest.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/nodetype/PredefinedNodeTypeTest.java Thu Jun 18 00:11:48 2009
@@ -289,6 +289,9 @@
             String name = supertypes[i].getName();
             if (name.startsWith("nt:") ||
                     name.equals("mix:simpleVersionable") ||
+                    name.equals("mix:created") ||
+                    name.equals("mix:mimeType") ||
+                    name.equals("mix:lastModified") ||
                     (name.equals("mix:referenceable") &&
                         (typeName.equals("mix:versionable") ||
                             typeName.equals("mix:shareable") ||

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/resources/org/apache/jackrabbit/test/api/nodetype/spec/nt-childNodeDefinition.txt
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/resources/org/apache/jackrabbit/test/api/nodetype/spec/nt-childNodeDefinition.txt?rev=785863&r1=785862&r2=785863&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/resources/org/apache/jackrabbit/test/api/nodetype/spec/nt-childNodeDefinition.txt (original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/resources/org/apache/jackrabbit/test/api/nodetype/spec/nt-childNodeDefinition.txt Thu Jun 18 00:11:48 2009
@@ -15,7 +15,7 @@
   AutoCreated false
   Mandatory true
   OnParentVersion COPY
-  Protected false
+  Protected true
   Multiple false
 PropertyDefinition
   Name jcr:defaultPrimaryType
@@ -24,7 +24,7 @@
   AutoCreated false
   Mandatory false
   OnParentVersion COPY
-  Protected false
+  Protected true
   Multiple false
 PropertyDefinition
   Name jcr:mandatory
@@ -33,7 +33,7 @@
   AutoCreated false
   Mandatory true
   OnParentVersion COPY
-  Protected false
+  Protected true
   Multiple false
 PropertyDefinition
   Name jcr:name
@@ -42,7 +42,7 @@
   AutoCreated false
   Mandatory false
   OnParentVersion COPY
-  Protected false
+  Protected true
   Multiple false
 PropertyDefinition
   Name jcr:onParentVersion
@@ -51,7 +51,7 @@
   AutoCreated false
   Mandatory true
   OnParentVersion COPY
-  Protected false
+  Protected true
   Multiple false
 PropertyDefinition
   Name jcr:protected
@@ -60,7 +60,7 @@
   AutoCreated false
   Mandatory true
   OnParentVersion COPY
-  Protected false
+  Protected true
   Multiple false
 PropertyDefinition
   Name jcr:requiredPrimaryTypes
@@ -69,7 +69,7 @@
   AutoCreated false
   Mandatory true
   OnParentVersion COPY
-  Protected false
+  Protected true
   Multiple true
 PropertyDefinition
   Name jcr:sameNameSiblings
@@ -78,5 +78,5 @@
   AutoCreated false
   Mandatory true
   OnParentVersion COPY
-  Protected false
-  Multiple false
+  Protected true
+  Multiple false
\ No newline at end of file

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/resources/org/apache/jackrabbit/test/api/nodetype/spec/nt-folder.txt
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/resources/org/apache/jackrabbit/test/api/nodetype/spec/nt-folder.txt?rev=785863&r1=785862&r2=785863&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/resources/org/apache/jackrabbit/test/api/nodetype/spec/nt-folder.txt (original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/resources/org/apache/jackrabbit/test/api/nodetype/spec/nt-folder.txt Thu Jun 18 00:11:48 2009
@@ -1,6 +1,7 @@
 NodeTypeName
   nt:folder
 Supertypes
+  nt:base
   nt:hierarchyNode
 IsMixin
   false

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/resources/org/apache/jackrabbit/test/api/nodetype/spec/nt-hierarchyNode.txt
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/resources/org/apache/jackrabbit/test/api/nodetype/spec/nt-hierarchyNode.txt?rev=785863&r1=785862&r2=785863&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/resources/org/apache/jackrabbit/test/api/nodetype/spec/nt-hierarchyNode.txt (original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/resources/org/apache/jackrabbit/test/api/nodetype/spec/nt-hierarchyNode.txt Thu Jun 18 00:11:48 2009
@@ -2,18 +2,10 @@
   nt:hierarchyNode
 Supertypes
   nt:base
+  mix:created
 IsMixin
   false
 HasOrderableChildNodes
   false
 PrimaryItemName
-  null
-PropertyDefinition
-  Name jcr:created
-  RequiredType DATE
-  DefaultValues null
-  AutoCreated true
-  Mandatory false
-  OnParentVersion INITIALIZE
-  Protected true
-  Multiple false
+  null
\ No newline at end of file

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/resources/org/apache/jackrabbit/test/api/nodetype/spec/nt-linkedFile.txt
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/resources/org/apache/jackrabbit/test/api/nodetype/spec/nt-linkedFile.txt?rev=785863&r1=785862&r2=785863&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/resources/org/apache/jackrabbit/test/api/nodetype/spec/nt-linkedFile.txt (original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/resources/org/apache/jackrabbit/test/api/nodetype/spec/nt-linkedFile.txt Thu Jun 18 00:11:48 2009
@@ -1,6 +1,7 @@
 NodeTypeName
   nt:linkedFile
 Supertypes
+  nt:base
   nt:hierarchyNode
 IsMixin
   false

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/resources/org/apache/jackrabbit/test/api/nodetype/spec/nt-nodeType.txt
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/resources/org/apache/jackrabbit/test/api/nodetype/spec/nt-nodeType.txt?rev=785863&r1=785862&r2=785863&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/resources/org/apache/jackrabbit/test/api/nodetype/spec/nt-nodeType.txt (original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/resources/org/apache/jackrabbit/test/api/nodetype/spec/nt-nodeType.txt Thu Jun 18 00:11:48 2009
@@ -14,8 +14,8 @@
   DefaultPrimaryType nt:childNodeDefinition
   AutoCreated false
   Mandatory false
-  OnParentVersion VERSION
-  Protected false
+  OnParentVersion COPY
+  Protected true
   SameNameSiblings true
 ChildNodeDefinition
   Name jcr:propertyDefinition
@@ -23,8 +23,8 @@
   DefaultPrimaryType nt:propertyDefinition
   AutoCreated false
   Mandatory false
-  OnParentVersion VERSION
-  Protected false
+  OnParentVersion COPY
+  Protected true
   SameNameSiblings true
 PropertyDefinition
   Name jcr:hasOrderableChildNodes
@@ -33,7 +33,16 @@
   AutoCreated false
   Mandatory true
   OnParentVersion COPY
-  Protected false
+  Protected true
+  Multiple false
+PropertyDefinition
+  Name jcr:isAbstract
+  RequiredType BOOLEAN
+  DefaultValues null
+  AutoCreated false
+  Mandatory true
+  OnParentVersion COPY
+  Protected true
   Multiple false
 PropertyDefinition
   Name jcr:isMixin
@@ -42,7 +51,16 @@
   AutoCreated false
   Mandatory true
   OnParentVersion COPY
-  Protected false
+  Protected true
+  Multiple false
+PropertyDefinition
+  Name jcr:isQueryable
+  RequiredType BOOLEAN
+  DefaultValues null
+  AutoCreated false
+  Mandatory true
+  OnParentVersion COPY
+  Protected true
   Multiple false
 PropertyDefinition
   Name jcr:nodeTypeName
@@ -51,7 +69,7 @@
   AutoCreated false
   Mandatory true
   OnParentVersion COPY
-  Protected false
+  Protected true
   Multiple false
 PropertyDefinition
   Name jcr:primaryItemName
@@ -60,7 +78,7 @@
   AutoCreated false
   Mandatory false
   OnParentVersion COPY
-  Protected false
+  Protected true
   Multiple false
 PropertyDefinition
   Name jcr:supertypes
@@ -69,5 +87,5 @@
   AutoCreated false
   Mandatory false
   OnParentVersion COPY
-  Protected false
-  Multiple true
+  Protected true
+  Multiple true
\ No newline at end of file

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/resources/org/apache/jackrabbit/test/api/nodetype/spec/nt-propertyDefinition.txt
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/resources/org/apache/jackrabbit/test/api/nodetype/spec/nt-propertyDefinition.txt?rev=785863&r1=785862&r2=785863&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/resources/org/apache/jackrabbit/test/api/nodetype/spec/nt-propertyDefinition.txt (original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/resources/org/apache/jackrabbit/test/api/nodetype/spec/nt-propertyDefinition.txt Thu Jun 18 00:11:48 2009
@@ -15,25 +15,52 @@
   AutoCreated false
   Mandatory true
   OnParentVersion COPY
-  Protected false
+  Protected true
   Multiple false
 PropertyDefinition
+  Name jcr:availableQueryOperators
+  RequiredType NAME
+  DefaultValues null
+  AutoCreated false
+  Mandatory true
+  OnParentVersion COPY
+  Protected true
+  Multiple true
+PropertyDefinition
   Name jcr:defaultValues
   RequiredType UNDEFINED
   DefaultValues null
   AutoCreated false
   Mandatory false
   OnParentVersion COPY
-  Protected false
+  Protected true
   Multiple true
 PropertyDefinition
+  Name jcr:isFullTextSearchable
+  RequiredType BOOLEAN
+  DefaultValues null
+  AutoCreated false
+  Mandatory true
+  OnParentVersion COPY
+  Protected true
+  Multiple false
+PropertyDefinition
+  Name jcr:isQueryOrderable
+  RequiredType BOOLEAN
+  DefaultValues null
+  AutoCreated false
+  Mandatory true
+  OnParentVersion COPY
+  Protected true
+  Multiple false
+PropertyDefinition
   Name jcr:mandatory
   RequiredType BOOLEAN
   DefaultValues null
   AutoCreated false
   Mandatory true
   OnParentVersion COPY
-  Protected false
+  Protected true
   Multiple false
 PropertyDefinition
   Name jcr:multiple
@@ -42,7 +69,7 @@
   AutoCreated false
   Mandatory true
   OnParentVersion COPY
-  Protected false
+  Protected true
   Multiple false
 PropertyDefinition
   Name jcr:name
@@ -51,7 +78,7 @@
   AutoCreated false
   Mandatory false
   OnParentVersion COPY
-  Protected false
+  Protected true
   Multiple false
 PropertyDefinition
   Name jcr:onParentVersion
@@ -60,7 +87,7 @@
   AutoCreated false
   Mandatory true
   OnParentVersion COPY
-  Protected false
+  Protected true
   Multiple false
 PropertyDefinition
   Name jcr:protected
@@ -69,7 +96,7 @@
   AutoCreated false
   Mandatory true
   OnParentVersion COPY
-  Protected false
+  Protected true
   Multiple false
 PropertyDefinition
   Name jcr:requiredType
@@ -78,7 +105,7 @@
   AutoCreated false
   Mandatory true
   OnParentVersion COPY
-  Protected false
+  Protected true
   Multiple false
 PropertyDefinition
   Name jcr:valueConstraints
@@ -87,5 +114,5 @@
   AutoCreated false
   Mandatory false
   OnParentVersion COPY
-  Protected false
-  Multiple true
+  Protected true
+  Multiple true
\ No newline at end of file

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/resources/org/apache/jackrabbit/test/api/nodetype/spec/nt-resource.txt
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/resources/org/apache/jackrabbit/test/api/nodetype/spec/nt-resource.txt?rev=785863&r1=785862&r2=785863&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/resources/org/apache/jackrabbit/test/api/nodetype/spec/nt-resource.txt (original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/resources/org/apache/jackrabbit/test/api/nodetype/spec/nt-resource.txt Thu Jun 18 00:11:48 2009
@@ -2,7 +2,8 @@
   nt:resource
 Supertypes
   nt:base
-  mix:referenceable
+  mix:lastModified
+  mix:mimeType
 IsMixin
   false
 HasOrderableChildNodes
@@ -17,31 +18,4 @@
   Mandatory true
   OnParentVersion COPY
   Protected false
-  Multiple false
-PropertyDefinition
-  Name jcr:encoding
-  RequiredType STRING
-  DefaultValues null
-  AutoCreated false
-  Mandatory false
-  OnParentVersion COPY
-  Protected false
-  Multiple false
-PropertyDefinition
-  Name jcr:lastModified
-  RequiredType DATE
-  DefaultValues null
-  AutoCreated false
-  Mandatory true
-  OnParentVersion IGNORE
-  Protected false
-  Multiple false
-PropertyDefinition
-  Name jcr:mimeType
-  RequiredType STRING
-  DefaultValues null
-  AutoCreated false
-  Mandatory true
-  OnParentVersion COPY
-  Protected false
-  Multiple false
+  Multiple false
\ No newline at end of file

Modified: jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/HierarchyNodeTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/HierarchyNodeTest.java?rev=785863&r1=785862&r2=785863&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/HierarchyNodeTest.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/HierarchyNodeTest.java Thu Jun 18 00:11:48 2009
@@ -64,7 +64,6 @@
         resourceProps.add(jcrPrefix+":lastModified");
         resourceProps.add(jcrPrefix+":mimeType");
         resourceProps.add(jcrPrefix+":data");
-        resourceProps.add(jcrPrefix+":uuid");
 
         try {
             Node folder = testRootNode.addNode("folder", ntFolder);

Modified: jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/NameConstants.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/NameConstants.java?rev=785863&r1=785862&r2=785863&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/NameConstants.java (original)
+++ jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/NameConstants.java Thu Jun 18 00:11:48 2009
@@ -62,11 +62,21 @@
     public static final Name JCR_CREATED = FACTORY.create(Name.NS_JCR_URI, "created");
 
     /**
+     * jcr:createdBy
+     */
+    public static final Name JCR_CREATEDBY = FACTORY.create(Name.NS_JCR_URI, "createdBy");
+
+    /**
      * jcr:lastModified
      */
     public static final Name JCR_LASTMODIFIED = FACTORY.create(Name.NS_JCR_URI, "lastModified");
 
     /**
+     * jcr:lastModifiedBy
+     */
+    public static final Name JCR_LASTMODIFIEDBY = FACTORY.create(Name.NS_JCR_URI, "lastModifiedBy");
+
+    /**
      * jcr:encoding
      */
     public static final Name JCR_ENCODING = FACTORY.create(Name.NS_JCR_URI, "encoding");
@@ -86,6 +96,41 @@
      */
     public static final Name JCR_CONTENT = FACTORY.create(Name.NS_JCR_URI, "content");
 
+    /**
+     * jcr:etag
+     */
+    public static final Name JCR_ETAG = FACTORY.create(Name.NS_JCR_URI, "etag");
+
+    /**
+     * jcr:protocol
+     */
+    public static final Name JCR_PROTOCOL = FACTORY.create(Name.NS_JCR_URI, "protocol");
+
+    /**
+     * jcr:host
+     */
+    public static final Name JCR_HOST = FACTORY.create(Name.NS_JCR_URI, "host");
+
+    /**
+     * jcr:port
+     */
+    public static final Name JCR_PORT = FACTORY.create(Name.NS_JCR_URI, "port");
+
+    /**
+     * jcr:repository
+     */
+    public static final Name JCR_REPOSITORY = FACTORY.create(Name.NS_JCR_URI, "repository");
+
+    /**
+     * jcr:workspace
+     */
+    public static final Name JCR_WORKSPACE = FACTORY.create(Name.NS_JCR_URI, "workspace");
+
+    /**
+     * jcr:id
+     */
+    public static final Name JCR_ID = FACTORY.create(Name.NS_JCR_URI, "id");
+
     //--------------------------------------< xml related item name constants >
 
     /**
@@ -387,6 +432,41 @@
     public static final Name NT_FOLDER = FACTORY.create(Name.NS_NT_URI, "folder");
 
     /**
+     * mix:created
+     */
+    public static final Name MIX_CREATED = FACTORY.create(Name.NS_MIX_URI, "created");
+
+    /**
+     * mix:lastModified
+     */
+    public static final Name MIX_LASTMODIFIED = FACTORY.create(Name.NS_MIX_URI, "lastModified");
+
+    /**
+     * mix:title
+     */
+    public static final Name MIX_TITLE = FACTORY.create(Name.NS_MIX_URI, "title");
+
+    /**
+     * mix:language
+     */
+    public static final Name MIX_LANGUAGE = FACTORY.create(Name.NS_MIX_URI, "language");
+
+    /**
+     * mix:mimeType
+     */
+    public static final Name MIX_MIMETYPE = FACTORY.create(Name.NS_MIX_URI, "mimeType");
+
+    /**
+     * mix:etag
+     */
+    public static final Name MIX_ETAG = FACTORY.create(Name.NS_MIX_URI, "etag");
+
+    /**
+     * nt:address
+     */
+    public static final Name NT_ADDRESS = FACTORY.create(Name.NS_NT_URI, "address");
+
+    /**
      * nt:query
      */
     public static final Name NT_QUERY = FACTORY.create(Name.NS_NT_URI, "query");

Modified: jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/compact/CompactNodeTypeDefReader.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/compact/CompactNodeTypeDefReader.java?rev=785863&r1=785862&r2=785863&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/compact/CompactNodeTypeDefReader.java (original)
+++ jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/compact/CompactNodeTypeDefReader.java Thu Jun 18 00:11:48 2009
@@ -506,7 +506,7 @@
     private void doPropertyAttributes(QPropertyDefinitionBuilder pd,
                                       QNodeTypeDefinitionBuilder ntd)
             throws ParseException {
-        while (currentTokenEquals(Lexer.ATTRIBUTE)) {
+        while (currentTokenEquals(Lexer.PROP_ATTRIBUTE)) {
             if (currentTokenEquals(Lexer.PRIMARY)) {
                 if (ntd.getPrimaryItemName() != null) {
                     String name = null;
@@ -705,7 +705,7 @@
     private void doChildNodeAttributes(QNodeDefinitionBuilder nd,
                                        QNodeTypeDefinitionBuilder ntd)
             throws ParseException {
-        while (currentTokenEquals(Lexer.ATTRIBUTE)) {
+        while (currentTokenEquals(Lexer.NODE_ATTRIBUTE)) {
             if (currentTokenEquals(Lexer.PRIMARY)) {
                 if (ntd.getPrimaryItemName() != null) {
                     String name = null;
@@ -723,7 +723,7 @@
                 nd.setMandatory(true);
             } else if (currentTokenEquals(Lexer.PROTECTED)) {
                 nd.setProtected(true);
-            } else if (currentTokenEquals(Lexer.MULTIPLE)) {
+            } else if (currentTokenEquals(Lexer.SNS)) {
                 nd.setAllowsSameNameSiblings(true);
             } else if (currentTokenEquals(Lexer.COPY)) {
                 nd.setOnParentVersion(OnParentVersionAction.COPY);

Modified: jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/compact/Lexer.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/compact/Lexer.java?rev=785863&r1=785862&r2=785863&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/compact/Lexer.java (original)
+++ jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/compact/Lexer.java Thu Jun 18 00:11:48 2009
@@ -51,6 +51,7 @@
     public static final String[] MANDATORY = new String[]{"mandatory", "man", "m"};
     public static final String[] PROTECTED = new String[]{"protected", "pro", "p"};
     public static final String[] MULTIPLE = new String[]{"multiple", "mul", "*"};
+    public static final String[] SNS = new String[]{"sns", "*", "multiple"};
     public static final String[] QUERYOPS = new String[]{"queryops", "qop"};
     public static final String[] NOFULLTEXT = new String[]{"nofulltext", "nof"};
     public static final String[] NOQUERYORDER = new String[]{"noqueryorder", "nqord"};
@@ -62,7 +63,8 @@
     public static final String[] IGNORE = new String[]{"IGNORE"};
     public static final String[] ABORT = new String[]{"ABORT"};
 
-    public static final String[] ATTRIBUTE;
+    public static final String[] PROP_ATTRIBUTE;
+    public static final String[] NODE_ATTRIBUTE;
     static {
         ArrayList<String> attr = new ArrayList<String>();
         attr.addAll(Arrays.asList(PRIMARY));
@@ -79,7 +81,20 @@
         attr.addAll(Arrays.asList(COMPUTE));
         attr.addAll(Arrays.asList(IGNORE));
         attr.addAll(Arrays.asList(ABORT));
-        ATTRIBUTE = attr.toArray(new String[attr.size()]);
+        PROP_ATTRIBUTE = attr.toArray(new String[attr.size()]);
+        attr = new ArrayList<String>();
+        attr.addAll(Arrays.asList(PRIMARY));
+        attr.addAll(Arrays.asList(AUTOCREATED));
+        attr.addAll(Arrays.asList(MANDATORY));
+        attr.addAll(Arrays.asList(PROTECTED));
+        attr.addAll(Arrays.asList(SNS));
+        attr.addAll(Arrays.asList(COPY));
+        attr.addAll(Arrays.asList(VERSION));
+        attr.addAll(Arrays.asList(INITIALIZE));
+        attr.addAll(Arrays.asList(COMPUTE));
+        attr.addAll(Arrays.asList(IGNORE));
+        attr.addAll(Arrays.asList(ABORT));
+        NODE_ATTRIBUTE = attr.toArray(new String[attr.size()]);
     }
 
     public static final String QUEROPS_EQUAL = "=";

Modified: jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/AbstractQValueFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/AbstractQValueFactory.java?rev=785863&r1=785862&r2=785863&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/AbstractQValueFactory.java (original)
+++ jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/AbstractQValueFactory.java Thu Jun 18 00:11:48 2009
@@ -61,7 +61,7 @@
         Name nodeType = propertyDefinition.getDeclaringNodeType();
         Name name = propertyDefinition.getName();
 
-        if (NameConstants.NT_HIERARCHYNODE.equals(nodeType) && NameConstants.JCR_CREATED.equals(name)) {
+        if ((NameConstants.NT_HIERARCHYNODE.equals(nodeType) || NameConstants.MIX_CREATED.equals(nodeType))&& NameConstants.JCR_CREATED.equals(name)) {
             return new QValue[] { create(Calendar.getInstance()) };
         } else if (NameConstants.NT_RESOURCE.equals(nodeType) && NameConstants.JCR_LASTMODIFIED.equals(name)) {
             return new QValue[] { create(Calendar.getInstance()) };

Modified: jackrabbit/trunk/jackrabbit-spi2jcr/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi2jcr/pom.xml?rev=785863&r1=785862&r2=785863&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi2jcr/pom.xml (original)
+++ jackrabbit/trunk/jackrabbit-spi2jcr/pom.xml Thu Jun 18 00:11:48 2009
@@ -69,6 +69,7 @@
               <value>
                 org.apache.jackrabbit.jcr2spi.name.NamespaceRegistryTest#testReRegisteredNamespaceVisibility
                 org.apache.jackrabbit.jcr2spi.name.NamespaceRegistryTest#testRegisteredNamespaceVisibility
+                org.apache.jackrabbit.jcr2spi.xml.SessionImportTest#testEmptyMixins2
                 org.apache.jackrabbit.test.api.observation.EventJournalTest
                 org.apache.jackrabbit.test.api.query.OrderByDateTest
                 org.apache.jackrabbit.test.api.query.OrderByDoubleTest



Mime
View raw message