/*
 * 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.
 */

<cnd='http://www.modeshape.org/sequencer/cnd/1.0'>

[cnd:nodeType]
  - cnd:nodeTypeName (name) mandatory
  - cnd:supertypes (name) multiple
  - cnd:isAbstract (boolean) mandatory
  - cnd:isMixin (boolean) mandatory  copy
  - cnd:isQueryable (boolean) mandatory copy
  - cnd:hasOrderableChildNodes (boolean) mandatory copy
  - cnd:primaryItemName (name) copy
  + cnd:propertyDefinition (cnd:propertyDefinition)  = cnd:propertyDefinition sns copy
  + cnd:childNodeDefinition (cnd:childNodeDefinition) = cnd:childNodeDefinition sns copy

[cnd:propertyDefinition]
  - cnd:name (name)
  - cnd:autoCreated (boolean) mandatory
  - cnd:mandatory (boolean) mandatory
  - cnd:isFullTextSearchable (boolean) mandatory
  - cnd:isQueryOrderable (boolean) mandatory
  - cnd:onParentVersion (string) mandatory
      < 'COPY', 'VERSION', 'INITIALIZE', 'COMPUTE',
        'IGNORE', 'ABORT'
  - cnd:protected (boolean) mandatory
  - cnd:requiredType (string) mandatory
    < 'STRING', 'BINARY', 'LONG', 'DOUBLE', 'BOOLEAN',
      'DATE', 'NAME', 'PATH', 'REFERENCE', 'UNDEFINED'
  - cnd:valueConstraints (string) multiple
  - cnd:availableQueryOperators (name) mandatory multiple
  - cnd:defaultValues (undefined) multiple
  - cnd:multiple (boolean) mandatory

[cnd:childNodeDefinition]
  - cnd:name (name)
  - cnd:autoCreated (boolean) mandatory
  - cnd:mandatory (boolean) mandatory
  - cnd:onParentVersion (string) mandatory
      < 'COPY', 'VERSION', 'INITIALIZE', 'COMPUTE',
        'IGNORE', 'ABORT'
  - cnd:protected (boolean) mandatory
  - cnd:requiredPrimaryTypes (name) = 'nt:base' mandatory multiple
  - cnd:defaultPrimaryType (name)
  - cnd:sameNameSiblings (boolean) mandatory