Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hierarchical DIP support #130

Merged
merged 31 commits into from
Jul 24, 2015
Merged

Hierarchical DIP support #130

merged 31 commits into from
Jul 24, 2015

Conversation

mistydemeo
Copy link
Contributor

This adds support for a new form of structMap, the logical structMap.

Directories created via SIP arrange can now be assigned a level of description label, in addition to a name. If directories with levels of description exist when the METS is created, then a logical structMap is created alongside the physical structMap. The structure of the logical structMap is identical, but the type value for directories is now the assigned level of description instead of Directory. The logical structMap can be used to assign levels of description to records on import to access systems like AtoM.

Major changes in this branch:

  • AtoM upload configuration has been refactored, and now now form-based; the user no longer directly writes an argument string.
  • If an AtoM system has been configured for upload, then the levels of description can be fetched from AtoM for use in SIP arrange.
  • The hierarchy of levels of description can be configured in Archivematica. (For instance, in custom LOD hierarchies, to control what levels are higher than others.)
  • Levels of description can be assigned to directories when they are created in SIP arrange.
  • Logical structMap creation in createMETS2.

@mistydemeo
Copy link
Contributor Author

This history needs to be cleaned up before merging.

@@ -0,0 +1,11 @@
-- Set AtoM DIP upload defaults
INSERT INTO DashboardSettings (name, value) VALUES ('dip_upload_atom_url', 'http://localhost/ica-atom');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be 'http://localhost/atom' instead, as well as below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

@qubot qubot force-pushed the dev/issue-6988-atom-dip-config branch 2 times, most recently from 21ede76 to 2134903 Compare December 9, 2014 19:26
@qubot qubot force-pushed the dev/issue-6988-atom-dip-config branch 2 times, most recently from 035c515 to 0196ab8 Compare January 5, 2015 20:01
@qubot qubot force-pushed the dev/issue-6988-atom-dip-config branch from 0196ab8 to 60ed467 Compare January 13, 2015 18:16
@Hwesta
Copy link
Contributor

Hwesta commented Jan 14, 2015

This depends on/works with #145

@qubot qubot force-pushed the dev/issue-6988-atom-dip-config branch 2 times, most recently from 63019a9 to cb717af Compare January 29, 2015 18:05
@jhsimpson jhsimpson added this to the 1.5.0 milestone Apr 21, 2015
@Hwesta
Copy link
Contributor

Hwesta commented Jun 11, 2015

This has been rebased on top of qa/1.x as dev/issue-6988-hierarchical-dip Should we reset dev/issue-6988-atom-dip-config to be the same as dev/issue-6988-hierarchical-dip to update this PR, or open a new one?

@qubot qubot force-pushed the dev/issue-6988-atom-dip-config branch from 749b397 to 3f83f07 Compare June 24, 2015 17:13
@qubot qubot force-pushed the dev/issue-6988-atom-dip-config branch 4 times, most recently from 7d995fa to 033c9dd Compare July 13, 2015 23:55
@mistydemeo
Copy link
Contributor Author

Rebased, and squashed many of the fix commits into their original feature commits.

@qubot qubot force-pushed the dev/issue-6988-atom-dip-config branch 4 times, most recently from 4a4f44b to b3b758e Compare July 14, 2015 18:43
@mistydemeo
Copy link
Contributor Author

Tested and confirmed to be working again after the rebase.

@@ -827,7 +829,59 @@ def createFileSec(directoryPath, parentDiv, baseDirectoryPath, baseDirectoryName
file_elem.set("DMDID", dspaceMetsDMDID)

return structMapDiv


def build_arranged_structmap(original_structmap, fileGroupIdentifier):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docstring? Especially coming to this after a year I'm not sure what this function is supposed to do.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

@qubot qubot force-pushed the dev/issue-6988-atom-dip-config branch 2 times, most recently from dc7e578 to c4303e6 Compare July 16, 2015 21:15
Logical arrangement is determined using the levels of description which were assigned to them during SIP arrange.

:param etree.Element original_structmap: the structMap on which the arranged structMap should be based.
:param str fileGroupIdentifier: the SIP's UUID
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Especially since this is new code, maybe we can start referring to sip_uuid instead of the ever-confusing fileGroupIdentifier?

@qubot qubot force-pushed the dev/issue-6988-atom-dip-config branch from c4303e6 to b64377b Compare July 16, 2015 21:38
Misty De Meo and others added 26 commits July 24, 2015 16:47
Conflicts:
	src/dashboard/src/components/administration/urls.py
Added a button, and stumped in logic, for editing a directory's
level of description.
This tracks the level of description for a filesystem entry in a SIP,
either a file or a directory.
This hierarchical structMap is created by assigning levels of description
to a SIP during SIP arrangement.
Added a pop-up form in the SIP arrange interface that allows editing of
a directory's metadata.
Added logic, during SIP creation from the arrange panel, to assign
the SIP UUID to each DB entry for a directory's level of description.
Removed the UI restriction preventing assigning level of description,
in the SIP arrange panel, to files.
Changed how file level of descriptions are stored so once a
SIP is created the relative location becomes relative to the
SIP directory (rather than, before it becomes a SIP, the
arrange directory).
refs #7068, #7071

Remove the FileLevelOfDescription and replace it with attributes on
SIPArrange. Instead of attaching the level of description to the
FileLevelOfDescription, populate the new level_of_description field in
SIPArrange. This is easier to find, set and update when the SIP is created,
and less error prone when creating a SIP from not top level directories. Do
not delete SIPArrange directories, as they are now needed for level of
description information.

In createMETS2, search based on the path relative to the objects directory.
Query SIPArrange instead of FileLevelOfDescription.
refs #7068

Add SQL to update SIPArrange for new columns. syncdb will create these
on a fresh install, but not on update.
refs #7068

Add the label from the directory the SIP was created from to the
logical structMap's objects div. If there was an objects directory in
the arranged SIP already, delete it. Delete TYPE=Directory from the SIP
level div.
refs #7070

Fix get_atom_levels_of_description to work correctly with clear=False.
New LoD get unique sortorders, starting at the max value of the
existing sortorders, since swapping sortorder values will not work if
they have the same value.

Fix hiding of promote/demote arrows only when sortorder is the max or
min value (instead of 1 or length, since values may be deleted). Align
all demote arrows vertically. Use STATIC_URL instead of hardcoded value.

Clean up _atom_levels_of_description_sort_adjust remove unnecessary
iterate and inefficient swap.  Misc other minor fixes.
Updated the AJAX feed for providing SIP arrange directory data
with level of directory metadata.
Updated client-side UI logic to display level of description for
directories.
Added disabling of SIP arrange panel action buttons when the user has
highlighted an item that the action should not apply to (creating
directories within files, for example).

Added an error alert in the SIP arrange UI if someone tries to
create a directory within a file.

Commented and cleaned up JavaScript.

Conflicts:
	src/dashboard/src/media/js/ingest/ingest_file_browser.js
If a open opens the originals file browser and the transfer backlog isn't
yet searched, trigger a search.
Squash with Add API method to fetch levels of description?
@qubot qubot force-pushed the dev/issue-6988-atom-dip-config branch from aead678 to 98c8aa2 Compare July 24, 2015 23:48
@qubot qubot merged commit 98c8aa2 into qa/1.x Jul 24, 2015
@qubot qubot deleted the dev/issue-6988-atom-dip-config branch July 24, 2015 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants