diff --git a/aubreylib/resource.py b/aubreylib/resource.py
index cbea60d..2f7d3d1 100644
--- a/aubreylib/resource.py
+++ b/aubreylib/resource.py
@@ -437,6 +437,9 @@ def get_fileSets(self, manifest, fileSec, file_index):
# See if the pdf dict has value already
if not getattr(self, 'pdf_dict', None):
self.pdf_dict = {}
+ # Create wacz_dict if needed
+ if not getattr(self, 'wacz_dict', None):
+ self.wacz_dict = {}
manifest_view_type = ''
for fileSet in manifest:
# Get the fileSet order number
@@ -486,6 +489,13 @@ def get_fileSets(self, manifest, fileSec, file_index):
# No single representative pdf exists, so empty the pdf dict
self.pdf_dict = {}
multiple_pdfs = True
+ if fileSet_data['wacz'] and not self.wacz_dict:
+ # Set the wacz info to the first one we find
+ self.wacz_dict = {
+ 'manifestation': manifest_num,
+ 'fileSet': fileSet_num,
+ 'filename': fileSet_data['wacz'],
+ }
self.manifestation_view_types[manifest_num] = manifest_view_type
self.manifestation_labels[manifest_num] = manifest.get("LABEL", None)
return manifestation_dict
@@ -520,6 +530,7 @@ def get_file_pointers(self, fileset, fileSec, file_index=None):
fileSet_view_type = ''
zoom = False
pdf = None
+ wacz = None
for ptr_file in file_group:
file_dict = {}
ignore_ptr_field = [
@@ -556,6 +567,10 @@ def get_file_pointers(self, fileset, fileSec, file_index=None):
if 'pdf' in file_dict.get('MIMETYPE', '') and\
'pdf' in file_dict.get('flocat', ''):
pdf = os.path.basename(file_dict['flocat'])
+ # Determine if this is a wacz fileSet
+ elif 'zip' in file_dict.get('MIMETYPE', '') and\
+ file_dict.get('flocat', '').endswith('.wacz'):
+ wacz = os.path.basename(file_dict['flocat'])
# If the fileSet doesn't have a view type
# (return as a regular file)
if fileSet_view_type == '':
@@ -575,6 +590,7 @@ def get_file_pointers(self, fileset, fileSec, file_index=None):
'fileSet_view_type': fileSet_view_type,
'zoom': zoom,
'pdf': pdf,
+ 'wacz': wacz,
}
return fileSet_dict
diff --git a/tests/data/metadc2280433.mets.xml b/tests/data/metadc2280433.mets.xml
new file mode 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644
index 0000000..1704fe8
--- /dev/null
+++ b/tests/data/metadc2280433.untl.xml
@@ -0,0 +1,57 @@
+
+
+ Discriminative Control of Behavioral Variability in Video Game Play
+
+ Arias, Gabriela Isabel
+ per
+
+
+ Dracobly, Joseph
+ per
+
+
+ Becker, April
+ per
+
+
+ Rosales-Ruiz, Jesus
+ per
+
+
+ University of North Texas
+ Denton, Texas
+
+ 2023-05
+ eng
+ Creativity can be a useful skill in today's classrooms and workplaces. When individuals talk about creativity, it's unclear what the controlling variables are when we tact behavior as "creative." Research in understanding the processes behind behaviors that are considered "creative" would assist in identifying functional relations and provide insight on how to teach creativity. Since creativity is often described as doing something different from the norm, behavioral variability may be a potential aspect of creativity. This study aimed to replicate previous findings by investigating the effects of discrimination training in a multiple schedule of varied and repetitive responding in the context of a video game. Participants played through a 2D online video game made in Bloxels. Different alternating-colored platforms served as the discriminative stimuli for the vary and repeat components. Three parameters of variability were measured (e.g., left jumps, right jumps, and double jumps). The results of the study indicate that participants were able to learn the discrimination of when to repeat and vary their responses depending on which colored platform they encountered.
+ Behavioral Variability
+ Discriminative Control
+ Stimulus Control
+ Repetition
+ Stereotypy
+ Video Game Play
+ Operant Dimension
+ Psychology, Behavioral
+ UNTETD
+ UNT
+ public
+ Arias, Gabriela Isabel
+ copyright
+ Copyright is held by the author, unless otherwise noted. All rights Reserved.
+ text_etd
+ text
+ submission_3270
+ Master of Science
+ Master's
+ Department of Behavior Analysis
+ College of Health and Public Service
+ Behavior Analysis
+ thesi
+ University of North Texas
+ The work will be published after approval.
+ mphillips
+ DC
+ ark:/67531/metadc2280433
+ 2024-02-11, 10:39:02
+
+
diff --git a/tests/test_resource.py b/tests/test_resource.py
index 4bd365a..5ac3843 100644
--- a/tests/test_resource.py
+++ b/tests/test_resource.py
@@ -254,3 +254,36 @@ def testGetAcpLastModificationDate(self, mocked_fileSet_file):
b''
)))
assert ro.acp_modification_date is None
+
+ @patch.object(resource.ResourceObject, 'get_fileSet_file')
+ def testResourceObjectWaczDict(self, mocked_fileSet_file):
+ """Verifies the resource object for an item containing a WACZ populates wacz_dict."""
+ mocked_fileSet_file.return_value = {'file_mimetype': '',
+ 'file_name': '',
+ 'files_system': ''}
+ # Use the test METs file containing a WACZ reference to make the resource object.
+ current_directory = os.path.dirname(os.path.abspath(__file__))
+ mets_path = '{0}/data/metadc2280433.mets.xml'.format(current_directory)
+
+ ro = resource.ResourceObject(identifier=mets_path, metadataLocations=[],
+ staticFileLocations=[],
+ mimetypeIconsPath='', use=USE)
+ assert ro.wacz_dict == {'fileSet': 2,
+ 'filename': 'submission_3270_ARIAS-THESIS-2023.wacz',
+ 'manifestation': 4}
+
+ @patch.object(resource.ResourceObject, 'get_fileSet_file')
+ def testResourceObjectNoWaczData(self, mocked_fileSet_file):
+ """Verifies item with no WACZ has empty wacz_dict."""
+ mocked_fileSet_file.return_value = {'file_mimetype': '',
+ 'file_name': '',
+ 'files_system': ''}
+
+ # Use a METs file without a WACZ to make the resource object.
+ current_directory = os.path.dirname(os.path.abspath(__file__))
+ mets_path = '{0}/data/metapth12434.mets.xml'.format(current_directory)
+
+ ro = resource.ResourceObject(identifier=mets_path, metadataLocations=[],
+ staticFileLocations=[],
+ mimetypeIconsPath='', use=USE)
+ assert ro.wacz_dict == {}