<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  -->
<vaultfs version="1.0">
    <!--
        Defines the default java packages to search for the respective
        elements below.
    -->
    <defaultPackages>
        <aggregator>org.apache.jackrabbit.vault.fs.aggregator</aggregator>
        <handler>org.apache.jackrabbit.vault.fs.imprt</handler>
        <include>org.apache.jackrabbit.vault.fs.filter</include>
        <exclude>org.apache.jackrabbit.vault.fs.filter</exclude>
    </defaultPackages>

    <!--
        Defines the default java classes to use for the respective elements
        below.
    -->
    <defaultClasses>
        <aggregator>org.apache.jackrabbit.vault.fs.impl.aggregator.GenericAggregator</aggregator>
    </defaultClasses>

    <!--
        Defines the content aggregators
    -->
    <aggregators>

        <!--
            Defines an aggregator that handles nt:file and nt:resource nodes.
        -->
        <aggregator name="File" class="FileAggregator" />

        <!--
            Defines an aggregator that handles cq:Page like nodes. It matches
            all cq:Page nodes and excludes child nodes with cq:Page in the
            aggregate.
        -->
        <aggregator name="Page">
            <contentFilter>
                <exclude class="NodeTypeItemFilter" nodeType="cq:Page" respectSupertype="true" />
            </contentFilter>
            <matchFilter>
                <include class="NodeTypeItemFilter" nodeType="cq:Page" respectSupertype="true" />
            </matchFilter>
        </aggregator>

        <!--
            Defines an aggregator that defines full coverage for certain node
            types.
        -->
        <aggregator name="FullCoverage" class="FullCoverageAggregator">
            <matchFilter>
                <include class="NodeTypeItemFilter" nodeType="rep:AccessControl" respectSupertype="true" />
                <include class="NodeTypeItemFilter" nodeType="cq:AbstractWidget" respectSupertype="true" />
                <include class="NodeTypeItemFilter" nodeType="cq:DropTarget" respectSupertype="true" />
                <include class="NodeTypeItemFilter" nodeType="cq:EditConfig" respectSupertype="true" />
            </matchFilter>
        </aggregator>

        <!--
            Defines an aggregator that handles nt:nodeType nodes and serializes
            them into .cnd notation.
        -->
        <aggregator name="NodeType" class="NodeTypeAggregator">
            <matchFilter>
                <include class="NodeTypeItemFilter" nodeType="nt:nodeType" />
            </matchFilter>
        </aggregator>

        <!--
            Defines an aggregator that handles nt:folder nodes.
        -->
        <aggregator name="Folder">
            <contentFilter>
                <exclude class="IsNodeFilter" />
            </contentFilter>
            <matchFilter>
                <include class="NodeTypeItemFilter" nodeType="nt:folder" respectSupertype="true" />
                <include class="NodeTypeItemFilter" nodeType="cq:Folder" respectSupertype="true" />
                <include class="NodeTypeItemFilter" nodeType="sling:Folder" respectSupertype="true" />
                <include class="NodeTypeItemFilter" nodeType="wiki:Topic" respectSupertype="true" />
            </matchFilter>
        </aggregator>

        <!--
            Defines the default aggregator
        -->
        <aggregator name="default" isDefault="true">
            <contentFilter>
                <exclude class="NodeTypeItemFilter" nodeType="nt:hierarchyNode" respectSupertype="true" />
                <!-- <exclude class="IsNodeFilter" /> -->
                <include class="ItemFilter#ALL" />
            </contentFilter>
            <matchFilter>
                <include class="ItemFilter#ALL" />
            </matchFilter>
        </aggregator>

    </aggregators>

    <!--
      defines the input handlers
    -->
    <handlers>
        <handler class="FolderArtifactHandler"/>
        <handler class="FileArtifactHandler"/>
        <handler class="NodeTypeArtifactHandler"/>
        <handler class="GenericArtifactHandler"/>
    </handlers>
</vaultfs>
