<commit_before>/*
 * @package jsDAV
 * @subpackage DAV
 * @copyright Copyright (C) 2010 <NAME>. All rights reserved.
 * @author <NAME> <<EMAIL>>
 * @license http://github.com/mikedeboer/jsDAV/blob/master/LICENSE MIT License
 */

var jsDAV          = require("./../../jsdav"),
    jsDAV_Property = require("./../property").jsDAV_Property,

    Util           = require("./../util"),
    Exc            = require("./../exceptions");

function jsDAV_Property_Response(href, responseProperties) {
    this.href               = href;
    this.responseProperties = responseProperties || {};
}

exports.jsDAV_Property_Response = jsDAV_Property_Response;

(function() {
    this.REGBASE = this.REGBASE | jsDAV.__PROP_RESPONSE__;

    /**
     * Returns the url
     *
     * @return {string}
     */
    this.getHref = function() {
        return this.href;
    };

    /**
     * Returns the property list
     *
     * @return {array}
     */
    this.getResponseProperties = function() {
        return this.responseProperties;
    };

    /**
     * serialize
     *
     * @param {jsDAV_Server} server
     * @param {String}       dom
     * @return void
     */
    this.serialize = function(handler, dom) {
        var properties = this.responseProperties;

        dom += "<d:response>"
            // Adding the baseurl to the beginning of the url
            +  "<d:href>" + handler.server.getBaseUri() + escape(this.href) + "</d:href>";

        // The properties variable is an array containing properties, grouped by
        // HTTP status
        var resHttpStatus, resPropertyGroup, resNsList, resPropertyName, resPropertyValue,
            resPropName, resNodeName, resCurrentProperty, resBlockProps;

        for (resHttpStatus in properties) {
            resPropertyGroup = properties[resHttpStatus];
            // The 'href' is also in this hashmap, and it's special cased.
            // We will ignore it
            if (!resPropertyGroup || resHttpStatus == "href") continue;

            resBlockProps = "";
            resNsList     = handler.xmlNamespaces;

            for (resPropertyName in resPropertyGroup) {
                if (typeof resPropertyName != "string"<commit_msg>fix encoding of URIs<commit_after>/*
 * @package jsDAV
 * @subpackage DAV
 * @copyright Copyright (C) 2010 <NAME>. All rights reserved.
 * @author <NAME> <mike AT ajax DOT org>
 * @license http://github.com/mikedeboer/jsDAV/blob/master/LICENSE MIT License
 */

var jsDAV          = require("./../../jsdav"),
    jsDAV_Property = require("./../property").jsDAV_Property,

    Util           = require("./../util"),
    Exc            = require("./../exceptions");

function jsDAV_Property_Response(href, responseProperties) {
    this.href               = href;
    this.responseProperties = responseProperties || {};
}

exports.jsDAV_Property_Response = jsDAV_Property_Response;

(function() {
    this.REGBASE = this.REGBASE | jsDAV.__PROP_RESPONSE__;

    /**
     * Returns the url
     *
     * @return {string}
     */
    this.getHref = function() {
        return this.href;
    };

    /**
     * Returns the property list
     *
     * @return {array}
     */
    this.getResponseProperties = function() {
        return this.responseProperties;
    };

    /**
     * serialize
     *
     * @param {jsDAV_Server} server
     * @param {String}       dom
     * @return void
     */
    this.serialize = function(handler, dom) {
        var properties = this.responseProperties;

        dom += "<d:response>"
            // Adding the baseurl to the beginning of the url
            +  "<d:href>" + encodeURI(handler.server.getBaseUri() + this.href) + "</d:href>";

        // The properties variable is an array containing properties, grouped by
        // HTTP status
        var resHttpStatus, resPropertyGroup, resNsList, resPropertyName, resPropertyValue,
            resPropName, resNodeName, resCurrentProperty, resBlockProps;

        for (resHttpStatus in properties) {
            resPropertyGroup = properties[resHttpStatus];
            // The 'href' is also in this hashmap, and it's special cased.
            // We will ignore it
            if (!resPropertyGroup || resHttpStatus == "href") continue;

            resBlockProps = "";
            resNsList     = handler.xmlNamespaces;

            for (resPropertyName in resPropertyGroup) {
                if (typeof resPropertyName != "string"
{'fraction_non_alphanumeric': 0.12033476589007013, 'fraction_numerical': 0.0018095453517303778, 'mean_word_length': 2.2136627906976742, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '215197', 'n_tokens_mistral': 1269, 'n_tokens_neox': 1223, 'n_words': 306}