<commit_before>'use strict';

// What is Controller?
// ---

// Controller helps facilitate routing via express
// by providing configuring route handlers
//
// For example, a route to `/users/:id`
// would be handled by a `UsersController` with function `findOne`
//
// It provides a way for each controller
// to setup the routes and handlers it wants to respond to
//
// Also provides a mechanism to define pre, before, and after middleware
// per controller or per route
//
// Finally, it also provides response and error handling middleware
//
// Also parses query strings for filter, limit, and sort

// Dependencies
// ---
var _ = require('lodash');
var Backbone = require('backbone');
var Model = require('./model');
var Collection = require('./collection');
var xml2js = require('xml2js');

module.exports = Backbone.Model.extend({
  debug: false,

  path: '/',

  sortParam: 'created',
  sortOrder: 'desc',
  skip: 0,
  limit: 100,

  xmlBuilder: new xml2js.Builder(),

  // Route specific middleware definitions
  // Object or Function
  middleware: function() {
    return {};
  },

  // Database query parameters/filters
  // Object or Function
  queryParams: function() {
    return {};
  },<commit_msg>force xml output to not be pretty<commit_after>'use strict';

// What is Controller?
// ---

// Controller helps facilitate routing via express
// by providing configuring route handlers
//
// For example, a route to `/users/:id`
// would be handled by a `UsersController` with function `findOne`
//
// It provides a way for each controller
// to setup the routes and handlers it wants to respond to
//
// Also provides a mechanism to define pre, before, and after middleware
// per controller or per route
//
// Finally, it also provides response and error handling middleware
//
// Also parses query strings for filter, limit, and sort

// Dependencies
// ---
var _ = require('lodash');
var Backbone = require('backbone');
var Model = require('./model');
var Collection = require('./collection');
var xml2js = require('xml2js');

module.exports = Backbone.Model.extend({
  debug: false,

  path: '/',

  sortParam: 'created',
  sortOrder: 'desc',
  skip: 0,
  limit: 100,

  xmlBuilder: new xml2js.Builder({
    renderOpts: {
      pretty: false
    }
  }),

  // Route specific middleware definitions
  // Object or Function
  middleware: function() {
    return {};
  },

  // Database query parameters/filters
  // Object or Function
  queryParams: function() {
    return {};
  },
{'fraction_non_alphanumeric': 0.1278465840990811, 'fraction_numerical': 0.005593288054334798, 'mean_word_length': 3.2225969645868466, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 9}, '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': '1011590', 'n_tokens_mistral': 710, 'n_tokens_neox': 684, 'n_words': 275}