<commit_before>/**
 * @license
 * Copyright 2015 Google Inc. All Rights Reserved.
 *
 * Licensed 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
 */

CLASS({
  package: 'foam.dao',
  name: 'ZipArchiveDAO',
  extendsModel: 'foam.dao.ProxyDAO',

  requires: [
    'foam.util.zip.Archive',
    'foam.util.zip.File',
  ],

  properties: [
    {
      type: 'foam.util.zip.Archive',
      name: 'archive',
      lazyFactory: function() {
        return this.Archive.create({}, this.Y);
      },
    },
    {
      model_: 'DAOProperty',
      name: 'delegate',
      lazyFactory: function() {
        return this.archive.files.dao;
      },
    },
  ],

  methods: [
    function find(fileName, sink) {
      var file = this.archive.files.filter(function(file) {
        return file.fileName === fileName;
      })[0];<commit_msg>Zip Archive DAO: Fix package-naming of DAOProperty<commit_after>/**
 * @license
 * Copyright 2015 Google Inc. All Rights Reserved.
 *
 * Licensed 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
 */

CLASS({
  package: 'foam.dao',
  name: 'ZipArchiveDAO',
  extendsModel: 'foam.dao.ProxyDAO',

  requires: [
    'foam.util.zip.Archive',
    'foam.util.zip.File',
  ],

  properties: [
    {
      type: 'foam.util.zip.Archive',
      name: 'archive',
      lazyFactory: function() {
        return this.Archive.create({}, this.Y);
      },
    },
    {
      model_: 'foam.core.types.DAOProperty',
      name: 'delegate',
      lazyFactory: function() {
        return this.archive.files.dao;
      },
    },
  ],

  methods: [
    function find(fileName, sink) {
      var file = this.archive.files.filter(function(file) {
        return file.fileName === fileName;
      })[0];
{'fraction_non_alphanumeric': 0.14621026894865527, 'fraction_numerical': 0.008801955990220049, 'mean_word_length': 2.521514629948365, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, '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': '3838956', 'n_tokens_mistral': 679, 'n_tokens_neox': 666, 'n_words': 163}