-
Notifications
You must be signed in to change notification settings - Fork 111
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
Conversation
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'); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
21ede76
to
2134903
Compare
035c515
to
0196ab8
Compare
0196ab8
to
60ed467
Compare
This depends on/works with #145 |
63019a9
to
cb717af
Compare
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? |
749b397
to
3f83f07
Compare
7d995fa
to
033c9dd
Compare
Rebased, and squashed many of the fix commits into their original feature commits. |
4a4f44b
to
b3b758e
Compare
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): |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
dc7e578
to
c4303e6
Compare
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 |
There was a problem hiding this comment.
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?
c4303e6
to
b64377b
Compare
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?
aead678
to
98c8aa2
Compare
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 ofDirectory
. 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: