<commit_before># This file is part of Access to Memory (AtoM).
#
# Access to Memory (AtoM) is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.
#
# Access to Memory (AtoM) 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 General Public License along with
# Access to Memory (AtoM); if not, write to the Free Software Foundation, Inc., 51
# Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

# MODS XML IMPORT FILTER MAPPINGS
#
# @package AccesstoMemory
# @subpackage object import
# @author <NAME> <<EMAIL>>
# @version svn: $Id:$

information_object:
  XPath:  "//mods"
  Object:  InformationObject
  # define an axis for the parent object; if no node is matched here, the object is rooted if possible

  Methods:
    collection_type:
      XPath:   "."    # not really a match, just use self
      Method:  setCollectionTypeId
      Parameters: [QubitTerm::PUBLISHED_MATERIAL_ID]

    # each of the following XPath expressions are relative to the current matched node:<commit_msg>add MODS import config, refs #4303<commit_after># This file is part of Access to Memory (AtoM).
#
# Access to Memory (AtoM) is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.
#
# Access to Memory (AtoM) 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 General Public License along with
# Access to Memory (AtoM); if not, write to the Free Software Foundation, Inc., 51
# Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

# MODS XML IMPORT FILTER MAPPINGS
#
# @package AccesstoMemory
# @subpackage object import
# @author <NAME> <<EMAIL>>
# @version svn: $Id:$

information_object:
  XPath:  "//mods"
  Object:  InformationObject
  # define an axis for the parent object; if no node is matched here, the object is rooted if possible

  Methods:
    collection_type:
      XPath:   "."    # not really a match, just use self
      Method:  setCollectionTypeId
      Parameters: [QubitTerm::PUBLISHED_MATERIAL_ID]

    sourceStandard:
      XPath: "." # not really a match, just use self
      Method: setSourceStandard
      Parameters: ["'http://www.loc.gov/standards/mods/v3/mods-3-5.xsd'"]

    publicationStatus:
      XPath: "." # not really a match, just use self
      Method: setStatus
      Parameters: ["array('typeId' => QubitTerm::STATUS_TYPE_PUBLICATION_ID, 'statusId' => sfConfig::get('app_defaultPubStatus', QubitTerm::PUBLICATION_STATUS_DRAFT_ID))"]


    # each of the following XPath expressions are relative to the current matched node:

    title:
      XPath: "titleInfo/title"
      Method: setTitle

    dates:
      XPath: "originInfo/dateCreated"
      Method: setDates
      Parameters: [$nodeValue, "$options = array('date_type' => 'creation')"]

    controlaccess_subject:
      XPath: "subject"
      Method: setTermRelationByName
      Parameters: [$nodeValue, "$options = array('taxonomyId' => QubitTaxonomy::SUBJECT_ID, 'source' => $importDOM->xpath->query('@source', $domNode2)->item(0)->nodeValue)"]

    identifier:
      XPath: "identifier"
      Method: setIdentifier

    # langmaterial:
      # XPath: "language"
      # Method:

    repository:
      XPath: "(location/physicalLocation)[2]"
      Method: setRepositoryByName

    creator:
      XPath: "name/namePart"
      Method: setActorByName
      Parameters: [$nodeValue, "$options = array('event_type_id' => QubitTerm::CREATION_ID)"]

    accessrestrict:
      XPath: "accessCondition"
      Method: setAccessConditions

    digital_object:
      XPath: "(location/url)[1]"
      Method: importDigitalObjectFromUri
{'fraction_non_alphanumeric': 0.08973471741637831, 'fraction_numerical': 0.008073817762399077, 'mean_word_length': 3.754385964912281, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, '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': '1078212', 'n_tokens_mistral': 1293, 'n_tokens_neox': 1228, 'n_words': 490}