SFULibrary / islandora_rest_ingester

Command-line tool for ingesting objects via the Islandora REST interface
The Unlicense
3 stars 0 forks source link

Add ability to get object and datastream properties from foxml.xml #5

Closed mjordan closed 6 years ago

mjordan commented 6 years ago

As outlined in https://github.com/mjordan/islandora_rest_ingester/issues/3#issuecomment-335243264, we should get object and datastream properties from FOXML if it is present in the object input directories, e.g. within Bags. Of interest to @McFateM

mjordan commented 6 years ago

Some preliminary work produces an array of properties from the FOXML like this:

Array
(
    [object] => Array
        (
            [PID] => foo:123
            [state] => Active
            [label] => Alcatraz Island
            [ownerId] => admin
            [createdDate] => 2017-03-10T07:09:34.383Z
            [lastModifiedDate] => 2017-10-07T16:23:17.457Z
        )

    [datastreams] => Array
        (
            [AUDIT] => Array
                (
                    [state] => A
                    [control_group] => X
                    [versionable] => false
                )

            [RELS-EXT] => Array
                (
                    [state] => A
                    [control_group] => X
                    [versionable] => true
                )

            [MODS] => Array
                (
                    [state] => A
                    [control_group] => M
                    [versionable] => true
                )

            [DC] => Array
                (
                    [state] => A
                    [control_group] => M
                    [versionable] => true
                )

            [OBJ] => Array
                (
                    [state] => A
                    [control_group] => M
                    [versionable] => true
                )

            [TECHMD] => Array
                (
                    [state] => A
                    [control_group] => M
                    [versionable] => true
                )

            [TN] => Array
                (
                    [state] => A
                    [control_group] => M
                    [versionable] => true
                )

            [MEDIUM_SIZE] => Array
                (
                    [state] => A
                    [control_group] => M
                    [versionable] => true
                )

        )

)
mjordan commented 6 years ago

Integrated into #9.

mjordan commented 6 years ago

Owner, label, and state are now taken from foxml.xml, if it is present in the object input directory.