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

Create CWRC entity lookups (person, organization, place, title) #2

Closed
ilovan opened this issue Apr 17, 2018 · 8 comments
Closed

Create CWRC entity lookups (person, organization, place, title) #2

ilovan opened this issue Apr 17, 2018 · 8 comments
Assignees

Comments

@ilovan
Copy link
Contributor

ilovan commented Apr 17, 2018

Create CWRC entity lookups, reusing the Api calls from the old CWRC entity dialogs:
Person: http://beta.cwrc.ca/islandora/cwrc_entities/v1/search/person?query=jane+austen&limit=100&page=0
Place: http://beta.cwrc.ca/islandora/cwrc_entities/v1/search/place?query=neepawa&limit=100&page=0
Organization: http://beta.cwrc.ca/islandora/cwrc_entities/v1/search/organization?query=royal&limit=100&page=0
Title: http://beta.cwrc.ca/islandora/cwrc_entities/v1/search/title?query=royal&limit=100&page=0

Person example

"responseHeader": {

},
"response": {
    "numFound": 107,
    "start": 0,
    "objects": [
        {
            "solr_doc": {
                "fgs_label_s": "Jane Austen",
                "RELS_EXT_isMemberOfCollection_uri_ms": ["info:fedora/orlando:3be5d6f7-2c2b-40ad-b5ae-143c6102d427"],
                "PID": "orlando:c0f1589a-0eb4-475a-a439-ed009c601715",
                "cwrc_entity_person_preferredForm_et": ["Austen Jane"],
                "cwrc_entity_person_variantForm_et": [
                    "Austen, Jane",
                    "Jane Austen",
                    "A Lady",
                    "Mrs Ashton Dennis"
                ],
                "cwrc_entity_person_birthDate_ms": ["1775-12-16"],
                "cwrc_entity_person_deathDate_ms": ["1817-07-18"],
                "ancestors_ms": [
                    "orlando:3be5d6f7-2c2b-40ad-b5ae-143c6102d427",
                    "orlando:79764579-bb88-4d9f-9c6b-a70276b00d3a",
                    "islandora:57f33e87-35e1-4ac4-98a6-e141b7113de8",
                    "islandora:root"
                ]
            }
         }
     ]
},
"facet_counts": {
}

}

Place sample

{
"responseHeader": {

},
"response": {
    "numFound": 1,
    "start": 0,
    "objects": [{
        "solr_doc": {
            "fgs_label_s": "Neepawa",
            "RELS_EXT_isMemberOfCollection_uri_ms": ["info:fedora/cwrc:place_2015-05-22"],
            "PID": "cwrc:c0e3a5ea-457d-466c-8a66-54a0d3be8a1a",
            "cwrc_entity_place_preferredForm_et": ["Neepawa"],
            "cwrc_entity_place_countryName_et": ["Canada"],
            "cwrc_entity_place_featureClass_et": ["Populated Place Feature"],
            "cwrc_entity_place_firstAdministrativeDivision_et": ["Manitoba"],
            "cwrc_entity_place_geoloc_s": "50.22892,-99.46642",
            "ancestors_ms": [
                "cwrc:place_2015-05-22",
                "cwrc:ingestedEntityCollection_2015-05-22",
                "cwrc:entityCollection",
                "islandora:33767849-a232-41b1-9cd4-276bebd67faa",
                "islandora:e0811471-7040-42ed-a7b7-59e94534b08a",
                "islandora:57f33e87-35e1-4ac4-98a6-e141b7113de8",
                "islandora:root"
            ]
        },
        "PID": "cwrc:c0e3a5ea-457d-466c-8a66-54a0d3be8a1a",
        "object_url": "islandora/object/cwrc:c0e3a5ea-457d-466c-8a66-54a0d3be8a1a",
        "content_models": ["info:fedora/cwrc:place-entityCModel"],
        "datastreams": [
            "AUDIT",
            "RELS-EXT",
            "PLACE",
            "DC",
            "WORKFLOW",
            "POLICY"
        ],
        "object_label": "Neepawa",
        "thumbnail_url": "sites/all/modules/islandora_solr_search/images/defaultimg.png",
        "object_url_params": [],
        "thumbnail_url_params": []
    }]
},
"facet_counts": {
}

}

Organization sample:

{
"responseHeader": {

},
"response": {
    "numFound": 9,
    "start": 0,
    "objects": [
        {
            "solr_doc": {
                "fgs_label_s": "Royal Air Force",
                "RELS_EXT_isMemberOfCollection_uri_ms": ["info:fedora/orlando:f8435ba6-4eba-4d0a-a4b6-7a2a7f20be3f"],
                "PID": "orlando:1ac0a6ad-578f-486d-aa0a-f5fd96a4a0b2",
                "cwrc_entity_org_preferredForm_et": ["Royal Air Force"],
                "cwrc_entity_org_variantForm_et": [
                    "Royal Air Force",
                    "RAF"
                ]
            },
            "PID": "orlando:1ac0a6ad-578f-486d-aa0a-f5fd96a4a0b2",
            "object_url": "islandora/object/orlando:1ac0a6ad-578f-486d-aa0a-f5fd96a4a0b2",
            "content_models": ["info:fedora/cwrc:organization-entityCModel"],
            "datastreams": [
                "AUDIT",
                "RELS-EXT",
                "ORGANIZATION",
                "DC",
                "WORKFLOW",
                "POLICY"
            ],
            "object_label": "Royal Air Force",
            "thumbnail_url": "sites/all/modules/islandora_solr_search/images/defaultimg.png",
            "object_url_params": [],
            "thumbnail_url_params": []
        }
    ]
},
"facet_counts": {
    
}

}

Title sample:

`
{
"responseHeader": {

},
"response": {
    "numFound": 220,
    "start": 0,
    "objects": [
        {
            "solr_doc": {
                "fgs_label_s": "The Royal",
                "RELS_EXT_isMemberOfCollection_uri_ms": ["info:fedora/cwrc:404b485e-0969-45c8-9fe2-dcb46b174c0f"],
                "PID": "cwrc:20e72d21-99c2-46f2-8f66-62ff3814622b",
                "cwrc_entity_title_uniformTitle_et": ["The Royal"],
                "cwrc_entity_title_author_et": ["Anon (aut) (Author)"],
                "cwrc_entity_title_date_ms": ["JAN 1891"],
                "ancestors_ms": [
                    "cwrc:404b485e-0969-45c8-9fe2-dcb46b174c0f",
                    "islandora:ae9a0514-09fd-4aa6-a6fb-1ec36f869f0b",
                    "islandora:root"
                ]
            },
            "PID": "cwrc:20e72d21-99c2-46f2-8f66-62ff3814622b",
            "object_url": "islandora/object/cwrc:20e72d21-99c2-46f2-8f66-62ff3814622b",
            "content_models": ["info:fedora/cwrc:citationCModel"],
            "datastreams": [
                "RELS-EXT",
                "MODS",
                "DC"
            ],
            "object_label": "The Royal",
            "thumbnail_url": "sites/all/modules/islandora_solr_search/images/defaultimg.png",
            "object_url_params": [],
            "thumbnail_url_params": []
        }
    ]
},
"facet_counts": {
    
}

}

`

@ilovan
Copy link
Contributor Author

ilovan commented Apr 23, 2018

This additional lookup should be added to the existing lookups in the dialogs, but only for the CWRC-integrated CWRC-Writer

@ajmacdonald
Copy link
Contributor

cwrc/Islandora-CWRC-Writer@685c32d code is committed but needs to be updated on beta.cwrc.ca in order to use

@SusanBrown
Copy link

SusanBrown commented Apr 24, 2018 via email

@ilovan
Copy link
Contributor Author

ilovan commented May 7, 2018

HI Andrew, based on the Slack conversation with Jeff, could you please implement that variable so that we can test on dev-06 first? I am uncomfortable testing things on beta and I believe @SusanBrown would agree:

Andrew [5:22 PM]
Hi Jeff. I'm not sure if I should ask you or Brad about this, but I've implemented the CWRC entity lookups ( #2 ), and have updated dev-06 with this new version. However, the lookups will only work on beta.cwrc.ca because of the cross-origin issue. Could you please update beta.cwrc.ca with this at some point?

Jeff Antoniuk [1:31 PM]
Unsure. @mihaela_ilovan can you see if this can be added to the next release. @andrew and @mihaela_ilovan a question, instead of hard-coding the server name (URL), can the JS use a parameter passed in during startup (I think there is one that could be re-purposed?). Thoughts?

Andrew [1:44 PM]
@jeff Antoniuk @mihaela_ilovan yes we can pass the URL using a parameter

@ajmacdonald
Copy link
Contributor

@ilovan @jefferya I'm testing it out now on dev-06. Currently it's not working: the entity lookup call gets redirected to the login screen. This occurs when I'm already logged in so it looks like I'll have to send the user's login cookie along with the request.

@ajmacdonald
Copy link
Contributor

@ilovan @jefferya Well that wasn't too hard. It's now available to test on dev-06.

@ilovan
Copy link
Contributor Author

ilovan commented May 8, 2018

Great, thanks, @ajmacdonald
I'll move it to the appropriate pipeline and test this afternoon.

@ilovan
Copy link
Contributor Author

ilovan commented Jun 13, 2018

I'll close this one since the lookups have been created and the rest of the conversation here is very much in line with cwrc/Islandora-CWRC-Writer#30

@ilovan ilovan closed this as completed Jun 13, 2018
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

No branches or pull requests

3 participants