<commit_before><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapping PUBLIC "-//EXOLAB/Castor Mapping DTD Version 1.0//EN" "http://castor.org/mapping.dtd">
<mapping>
    <description>This file describes how Castor should map between a Protempa query and an XML file that conforms to the protempa_query.xsd
        schema.</description>
    <class name="org.protempa.query.Query">
        <description> This maps the top-level object of a query to the top-level XML element of the corresponding XML document. It pretends that
            dataSourceBackend, knowledgeSourceBackend, algorithmSourceBackend and termSourceBackend are fields of class so that when marshalling a Query object
            to XML, this run-time context information can be captured. When unmarshalling an XML document to a Query object, this information will be ignored
            unless the unmarshaller is configured with appropriate handlers.</description>
        <map-to xml="protempaQuery" element-definition="true"/>
        <field name="dataSourceBackend" type="other" required="false" handler="org.protempa.xml.DataSourceBackendHandler">
            <description>When marshaling this field, the class name of the curently configured back end will be obtains by the field handler consulting the
                appropriate factory class. When unmarshalling, this field is ignored unelss the unmarshaller is configured with an appropriate handler. In this
                case, an instance of the named class is created and passed to the handler.</description>
            <bind-xml name="dataSourceBackend" type="string" node="element"></bind-xml>
        </field>
        <field name="knowledgeSourceBackend" type="other" required="false" handler="org.protempa.xml.KnowledgeSourceBackendHandler">
            <description>When marshaling this field, the class name of the curently configured back end will be obtains by the field handler consulting the
                appropriate factory class. When unmarshalling, this field is ignored unelss the unmarshaller is configured with an appropriate handler. In this
                case, an instance of the named class is created and passed to the handler.</description>
            <bind-xml name="knowledgeSourceBackend" type="string" node="element"></bind-xml>
        </field>
        <field name="algorithmSourceBackend" type="other" required="false" handler="org.protempa.xml.AlgorithmSourceBackendBackendHandler">
            <description>When marshaling this field, the class name of the curently configured back end will be obtains by the field handler consulting the
                appropriate factory class. When unmarshalling, this field is ignored unelss the unmarshaller is configured with an appropriate handler. In this
                case, an instance of the named class is created and passed to the handler.</description>
            <bind-xml name="algorithmSourceBackend" type="string" node="element"></bind-xml>
        </field>
        <field name="termSourceBackend" type="other" required="false" handler="org.protempa.xml.TermSourceBackendHandler">
            <description>When marshaling this field, the class name of the curently configured back end will be obtains by the field handler consulting the
                appropriate factory class. When unmarshalling, this field is ignored unelss the unmarshaller is configured with an appropriate handler. In this
                case, an instance of the named class is created and passed to the handler.</description>
            <bind-xml name="termSourceBackend" type="string" node="element"></bind-xml>
        </field>
        <field name="keyIds" type="string" collection="array" required="false" get-method="getKeyIds" set-method="%1">
            <bind-xml name="keyId" node="element" location="keyIDs"/>
        </field>
        <field name="propIds" type="string" collection="array" required="true" get-method="getPropIds" set-method="%3">
            <bind-xml name="propositionID" node="element" location="propositionIDs"/>
        </field>
        <field name="filters" type="org.protempa.backend.dsb.filter.Filter" collection="array" required="false" handler="org.protempa.xml.FiltersHandler">
            <description>Filters are organized into collections by being chained to each other. Since Castor has no direct support for this kind of collection,
                we will make it look to Castor like it is collected into an array by using a field handler.</description>
            <bind-xml auto-naming="deriveByClass" node="element" location="filters"/>
        </field>
    </class>
    <class name="org.protempa.backend.dsb.filter.Filter"></class>
</mapping><commit_msg>Incremental additions<commit_after><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapping PUBLIC "-//EXOLAB/Castor Mapping DTD Version 1.0//EN" "http://castor.org/mapping.dtd">
<mapping>
    <description>This file describes how Castor should map between a Protempa query and an XML file that conforms to the protempa_query.xsd
        schema.</description>
    <class name="org.protempa.query.Query">
        <description> This maps the top-level object of a query to the top-level XML element of the corresponding XML document. It pretends that
            dataSourceBackend, knowledgeSourceBackend, algorithmSourceBackend and termSourceBackend are fields of class so that when marshalling a Query object
            to XML, this run-time context information can be captured. When unmarshalling an XML document to a Query object, this information will be ignored
            unless the unmarshaller is configured with appropriate handlers.</description>
        <map-to xml="protempaQuery" element-definition="true"/>
        <field name="dataSourceBackend" type="other" required="false" handler="org.protempa.xml.DataSourceBackendHandler">
            <description>When marshaling this field, the class name of the currently configured back end will be obtains by the field handler consulting the
                appropriate factory class. When unmarshalling, this field is ignored unless the unmarshaller is configured with an appropriate handler. In this
                case, an instance of the named class is created and passed to the handler.</description>
            <bind-xml name="dataSourceBackend" type="string" node="element"></bind-xml>
        </field>
        <field name="knowledgeSourceBackend" type="other" required="false" handler="org.protempa.xml.KnowledgeSourceBackendHandler">
            <description>When marshaling this field, the class name of the currently configured back end will be obtains by the field handler consulting the
                appropriate factory class. When unmarshalling, this field is ignored unless the unmarshaller is configured with an appropriate handler. In this
                case, an instance of the named class is created and passed to the handler.</description>
            <bind-xml name="knowledgeSourceBackend" type="string" node="element"></bind-xml>
        </field>
        <field name="algorithmSourceBackend" type="other" required="false" handler="org.protempa.xml.AlgorithmSourceBackendBackendHandler">
            <description>When marshaling this field, the class name of the currently configured back end will be obtains by the field handler consulting the
                appropriate factory class. When unmarshalling, this field is ignored unless the unmarshaller is configured with an appropriate handler. In this
                case, an instance of the named class is created and passed to the handler.</description>
            <bind-xml name="algorithmSourceBackend" type="string" node="element"></bind-xml>
        </field>
        <field name="termSourceBackend" type="other" required="false" handler="org.protempa.xml.TermSourceBackendHandler">
            <description>When marshaling this field, the class name of the currently configured back end will be obtains by the field handler consulting the
                appropriate factory class. When unmarshalling, this field is ignored unless the unmarshaller is configured with an appropriate handler. In this
                case, an instance of the named class is created and passed to the handler.</description>
            <bind-xml name="termSourceBackend" type="string" node="element"></bind-xml>
        </field>
        <field name="keyIds" type="string" collection="array" required="false" get-method="getKeyIds" set-method="%1">
            <bind-xml name="keyId" node="element" location="keyIDs"/>
        </field>
        <field name="propIds" type="string" collection="array" required="true" get-method="getPropIds" set-method="%3">
            <bind-xml name="propositionID" node="element" location="propositionIDs"/>
        </field>
        <field name="filters" type="org.protempa.backend.dsb.filter.Filter" collection="array" required="false" get-method="getFiltersArray" set-method="%2">
            <description>Filters are organized into collections by being chained to each other. Since Castor has no direct support for this kind of collection,
                we access filters through methods that make them appear to be collected into an array.</description>
            <bind-xml auto-naming="deriveByClass" node="element" location="filters"/>
        </field>
        <field name="termIds" type="org.protempa.query.And" collection="array" required="false" get-method="getTermIds" set-method="%4">
            <bind-xml name="and" node="element" location="termIDs"/>
        </field>
    </class>
    <class name="org.protempa.query.And">
        <map-to xml="and" element-definition="true"/>
        <field name="anded" type="string" collection="arraylist" required="false">
            <bind-xml name="termID" node="element"/>
        </field>
    </class>
    <class name="org.protempa.backend.dsb.filter.PositionFilter">
        <map-to xml="dateTimeFilter" element-definition="true"/>
        <field name="propositionIds" type="string" collection="array" required="true" get-method="getPropositionIds" set-method="%1">
            <bind-xml name="propositionID" node="element" location="propositionIDs"/>
        </field>
        <field name="start" type="long" required="true" get-method="getStart" set-method="%2">
            <bind-xml name="start" node="attribute" />
        </field>
        <field name="startGranularity" type="string" required="true" get-method="getStartGranularityName" set-method="%3">
            <bind-xml name="startGranularity" node="attribute"/>
        </field>
    </class>
    <class name="org.protempa.backend.dsb.filter.PropertyValueFilter"></class>
    <class name="org.protempa.backend.dsb.filter.ValueFilter"></class>
</mapping>
{'fraction_non_alphanumeric': 0.09888268156424582, 'fraction_numerical': 0.0017690875232774675, 'mean_word_length': 3.5551314673452077, 'pattern_counts': {'":': 0, '<': 122, '<?xml version=': 2, '>': 122, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 42}, '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': '6962427', 'n_tokens_mistral': 2658, 'n_tokens_neox': 2633, 'n_words': 968}