<commit_before><?xml version="1.0" encoding="UTF-8"?>

<!--
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This 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.1 of
 * the License, or (at your option) any later version.
 *
 * This software 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 software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->

<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.xwiki.org/extension"
  xmlns:extension="http://www.xwiki.org/extension" xmlns:xwiki="http://www.xwiki.org" elementFormDefault="qualified">

  <complexType name="Link">
    <attribute name="href" type="string"></attribute>
    <attribute name="rel" type="string"></attribute>
    <attribute name="type" type="string"></attribute>
    <attribute name="hrefLang" type="string"></attribute>
  </complexType>

  <complexType name="LinkCollection">
    <sequence>
      <element name="link" type="extension:Link" minOccurs="0" maxOccurs="unbounded"></element>
    </sequence>
  </complexType>

  <complexType name="Extension">
    <complexContent>
      <extension base="extension:AbstractExtension">
      </extension>
    </complexContent>
  </complexType>

  <complexType name="ExtensionDependency">
    <sequence>
      <element name="id" type="string" maxOccurs="1" minOccurs="1"></element>
      <element name="constraint" type="string" maxOccurs="1"
        minOccurs="1"></element>
    </sequence>
  </complexType>

  <element name="extension" type="extension:Extension"></element>

  <complexType name="ExtensionVersion">
    <complexContent>
      <extension base="extension:AbstractExtension">
        <sequence>
          <element name="version" type="string"></element>
          <element name="dependencies" type="extension:ExtensionDependency" minOccurs="0" maxOccurs="unbounded"></element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>


  <element name="extensionVersion" type="extension:ExtensionVersion"></element>


  <complexType name="ExtensionSummary">
    <complexContent>
      <extension base="extension:LinkCollection">
        <sequence>
          <element name="id" type="string"></element>
          <element name="name" type="string"></element>
          <element name="type" type="string"></element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>


  <complexType name="ExtensionVersionSummary">
    <complexContent>
      <extension base="extension:ExtensionSummary">
        <sequence>
          <element name="version" type="string"></element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>

  <element name="extensions">
    <complexType>
      <complexContent>
        <extension base="extension:LinkCollection">
          <sequence>
            <element name="totalHits" type="int"></element>
            <element name="offset" type="int"></element>
            <element name="extensionSummary" type="extension:ExtensionSummary"
              minOccurs="0" maxOccurs="unbounded"></element>
          </sequence>
        </extension>
      </complexContent>
    </complexType>
  </element>
    
  <element name="extensionVersions">
    <complexType>
      <complexContent>
        <extension base="extension:LinkCollection">
          <sequence>
            <element name="totalHits" type="int"></element>
            <element name="offset" type="int"></element>
            <element name="extensionVersionSummary" type="extension:ExtensionVersionSummary"
              minOccurs="0" maxOccurs="unbounded"></element>
          </sequence>
        </extension>
      </complexContent>
    </complexType>
  </element>

  <element name="extensionsSearchResult" type="extension:ExtensionsSearchResult">
  </element>

  <complexType name="AbstractExtension">
    <complexContent>
      <extension base="extension:ExtensionSummary">
        <sequence>
          <element name="summary" type="string" minOccurs="0"></element>
          <element name="description" type="string" minOccurs="0"></element>
          <element name="licenses" type="extension:License"
            minOccurs="0" maxOccurs="unbounded">
          </element>
          <element name="website" type="string" minOccurs="0"></element>
          <element name="authors" type="extension:ExtensionAuthor"
            minOccurs="0" maxOccurs="unbounded">
          </element>
          <element name="features" type="string" minOccurs="0"
            maxOccurs="unbounded">
          </element>
          <element name="scm" type="extension:ExtensionScm"
            minOccurs="0" maxOccurs="1">
          </element>
          <element name="issueManagement" type="extension:ExtensionIssueManagement" minOccurs="0" maxOccurs="1"></element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>

  <complexType name="License">
    <sequence>
      <element name="name" type="string"></element>
      <element name="content" type="string" minOccurs="0"></element>
    </sequence>
  </complexType>

  <complexType name="ExtensionAuthor">
    <sequence>
      <element name="name" type="string" minOccurs="0"></element><commit_msg>XWIKI-11508 : Include ratings information in the Extension REST API - updated the repository schema to include information related to ratings<commit_after><?xml version="1.0" encoding="UTF-8"?>

<!--
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This 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.1 of
 * the License, or (at your option) any later version.
 *
 * This software 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 software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->

<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.xwiki.org/extension"
  xmlns:extension="http://www.xwiki.org/extension" xmlns:xwiki="http://www.xwiki.org" elementFormDefault="qualified">

  <complexType name="Link">
    <attribute name="href" type="string"></attribute>
    <attribute name="rel" type="string"></attribute>
    <attribute name="type" type="string"></attribute>
    <attribute name="hrefLang" type="string"></attribute>
  </complexType>

  <complexType name="LinkCollection">
    <sequence>
      <element name="link" type="extension:Link" minOccurs="0" maxOccurs="unbounded"></element>
    </sequence>
  </complexType>

  <complexType name="Extension">
    <complexContent>
      <extension base="extension:AbstractExtension">
      </extension>
    </complexContent>
  </complexType>

  <complexType name="ExtensionDependency">
    <sequence>
      <element name="id" type="string" maxOccurs="1" minOccurs="1"></element>
      <element name="constraint" type="string" maxOccurs="1"
        minOccurs="1"></element>
    </sequence>
  </complexType>

  <element name="extension" type="extension:Extension"></element>

  <complexType name="ExtensionVersion">
    <complexContent>
      <extension base="extension:AbstractExtension">
        <sequence>
          <element name="version" type="string"></element>
          <element name="dependencies" type="extension:ExtensionDependency" minOccurs="0" maxOccurs="unbounded"></element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>


  <element name="extensionVersion" type="extension:ExtensionVersion"></element>


  <complexType name="ExtensionSummary">
    <complexContent>
      <extension base="extension:LinkCollection">
        <sequence>
          <element name="id" type="string"></element>
          <element name="name" type="string"></element>
          <element name="type" type="string"></element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>


  <complexType name="ExtensionVersionSummary">
    <complexContent>
      <extension base="extension:ExtensionSummary">
        <sequence>
          <element name="version" type="string"></element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>

  <element name="extensions">
    <complexType>
      <complexContent>
        <extension base="extension:LinkCollection">
          <sequence>
            <element name="totalHits" type="int"></element>
            <element name="offset" type="int"></element>
            <element name="extensionSummary" type="extension:ExtensionSummary"
              minOccurs="0" maxOccurs="unbounded"></element>
          </sequence>
        </extension>
      </complexContent>
    </complexType>
  </element>
    
  <element name="extensionVersions">
    <complexType>
      <complexContent>
        <extension base="extension:LinkCollection">
          <sequence>
            <element name="totalHits" type="int"></element>
            <element name="offset" type="int"></element>
            <element name="extensionVersionSummary" type="extension:ExtensionVersionSummary"
              minOccurs="0" maxOccurs="unbounded"></element>
          </sequence>
        </extension>
      </complexContent>
    </complexType>
  </element>

  <element name="extensionsSearchResult" type="extension:ExtensionsSearchResult">
  </element>
  
  <complexType name="ExtensionRating">
    <sequence>
      <element name="totalVotes" type="int" maxOccurs="1" minOccurs="1"></element>
      <element name="averageVote" type="float" maxOccurs="1" minOccurs="1"></element>
    </sequence>
  </complexType>

  <complexType name="AbstractExtension">
    <complexContent>
      <extension base="extension:ExtensionSummary">
        <sequence>
          <element name="rating" type="extension:ExtensionRating" minOccurs="0" maxOccurs="1"></element>
          <element name="summary" type="string" minOccurs="0"></element>
          <element name="description" type="string" minOccurs="0"></element>
          <element name="licenses" type="extension:License"
            minOccurs="0" maxOccurs="unbounded">
          </element>
          <element name="website" type="string" minOccurs="0"></element>
          <element name="authors" type="extension:ExtensionAuthor"
            minOccurs="0" maxOccurs="unbounded">
          </element>
          <element name="features" type="string" minOccurs="0"
            maxOccurs="unbounded">
          </element>
          <element name="scm" type="extension:ExtensionScm"
            minOccurs="0" maxOccurs="1">
          </element>
          <element name="issueManagement" type="extension:ExtensionIssueManagement" minOccurs="0" maxOccurs="1"></element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>

  <complexType name="License">
    <sequence>
      <element name="name" type="string"></element>
      <element name="content" type="string" minOccurs="0"></element>
    </sequence>
  </complexType>

  <complexType name="ExtensionAuthor">
    <sequence>
      <element name="name" type="string" minOccurs="0"></element>
{'fraction_non_alphanumeric': 0.1412410580602229, 'fraction_numerical': 0.007735817667609383, 'mean_word_length': 3.5352697095435683, 'pattern_counts': {'":': 0, '<': 299, '<?xml version=': 2, '>': 299, 'https://': 0, 'lorem ipsum': 0, 'www.': 10, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2899448', 'n_tokens_mistral': 3251, 'n_tokens_neox': 3154, 'n_words': 773}