/*
 * ModeShape (http://www.modeshape.org)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
 
//------------------------------------------------------------------------------
// N A M E S P A C E S
//------------------------------------------------------------------------------
<jcr = "http://www.jcp.org/jcr/1.0">
<nt  = "http://www.jcp.org/jcr/nt/1.0">
<mix = "http://www.jcp.org/jcr/mix/1.0">
<mode = "http://www.modeshape.org/1.0">

//------------------------------------------------------------------------------
// N O D E T Y P E S
//------------------------------------------------------------------------------

[mode:namespace] > nt:base primaryitem mode:uri
- mode:uri (string) protected version
- mode:generated (boolean) protected version

[mode:namespaces] > nt:base
+ * (mode:namespace) = mode:namespace protected version

[mode:nodeTypes] > nt:base
+ * (nt:nodeType) = nt:nodeType protected version

[mode:lock] > nt:base
- mode:lockToken (string) protected ignore
- jcr:lockOwner (string) protected ignore
- mode:lockingSession (string) protected ignore
- mode:expirationDate (date) protected ignore
- mode:isSessionScoped (boolean) protected ignore
- jcr:lockIsDeep (boolean) protected ignore
- mode:isHeldBySession (boolean) protected ignore
- mode:workspace (string) protected ignore

[mode:locks] > nt:base
+ * (mode:lock) = mode:lock protected ignore

[mode:versionHistoryFolder] > nt:base
+ * (nt:versionHistory) = nt:versionHistory protected ignore
+ * (mode:versionHistoryFolder) protected ignore

[mode:versionStorage] > mode:versionHistoryFolder

[mode:repository] > nt:base, mix:created

[mode:federation]
+ mode:projection (mode:projection) = mode:projection sns protected ignore

[mode:projection]
- mode:externalNodeKey (String) mandatory protected ignore
- mode:projectedNodeKey (String) mandatory protected ignore
- mode:alias (String) mandatory protected ignore

[mode:system] > nt:base
- * (undefined) protected
- * (undefined) multiple protected
+ mode:namespaces (mode:namespaces) = mode:namespaces autocreated mandatory protected abort
+ mode:locks (mode:locks) = mode:locks autocreated mandatory protected abort
+ mode:repository (mode:repository) = mode:repository autocreated protected abort
+ mode:federation (mode:federation) = mode:federation autocreated protected abort
+ jcr:nodeTypes (mode:nodeTypes) = mode:nodeTypes autocreated mandatory protected abort
+ jcr:versionStorage (mode:versionStorage) = mode:versionStorage autocreated mandatory protected abort

[mode:root] > nt:base, mix:referenceable orderable
- * (undefined) multiple version
- * (undefined) version
+ jcr:system (mode:system) = mode:system autocreated mandatory protected ignore
+ * (nt:base) = nt:unstructured sns version

// This is the same as 'nt:resource' (which should generally be used instead)...
[mode:resource] > nt:base, mix:mimeType, mix:lastModified primaryitem jcr:data
- jcr:data (binary) mandatory

[mode:share] > mix:referenceable    // Used for non-original shared nodes, but never really exposed to JCR clients
- mode:sharedUuid (reference) mandatory protected initialize 

[mode:hashed] mixin
- mode:sha1 (string)

// A marker node type that can be used to denote areas into which files can be published.
// Published areas have optional titles and descriptions.
[mode:publishArea] > mix:title mixin

[mode:derived] mixin
- mode:derivedFrom (path) // the location of the original information from which this was derived
- mode:derivedAt (date)  // the timestamp of the last change to the original information from which this was derived

[mode:accessControllable] mixin 
    + mode:acl (mode:Acl) protected 
[mode:Acl] noquery
    + * (mode:Permission) protected
[mode:Permission] noquery
    - name (string) nofulltext
    - privileges (string) multiple nofulltext protected
