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

[HasCatalogue] Revert tmp fix for pattern for retrieval of catalogue uri and name #116

Open
jorisbr opened this issue Dec 19, 2024 · 1 comment

Comments

@jorisbr
Copy link
Collaborator

jorisbr commented Dec 19, 2024

Previous query (Elastic):

PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/>
PREFIX ent: <http://www.ontotext.com/owlim/entity#>
prefix la: <https://linked.art/ns/terms/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>

SELECT DISTINCT ?objectUri ?objectId ?propertyUri ?propertyId ?nlValue ?enValue
WHERE {
    {
        SELECT ?objectUri ?propertyUri
        WHERE {
            ?objectUri rdf:type crm:E22_Human-Made_Object.
            ?objectUri la:member_of ?propertyUri.
            # Getty AAT: museum catalogs
            ?propertyUri crm:P2_has_type <http://vocab.getty.edu/aat/300417819>.

        }
        ORDER BY ?objectUri
        LIMIT 50000
        OFFSET 0
    }

	?propertyUri crm:P1_is_identified_by ?catalogueNameAppellation.
    # Getty AAT: preferred terms
    ?catalogueNameAppellation crm:P2_has_type <http://vocab.getty.edu/aat/300404670>.
	?catalogueNameAppellation crm:P190_has_symbolic_content ?catalogueNameContent.

    BIND(MD5(STR(?objectUri)) AS ?objectId)
    BIND(MD5(STR(?propertyUri)) AS ?propertyId)
    BIND(?catalogueNameContent AS ?nlValue)
    BIND(?catalogueNameContent AS ?enValue)
}
@jorisbr
Copy link
Collaborator Author

jorisbr commented Dec 19, 2024

The above query should be used instead of the pattern currently used. We currently derive the name from the URI of the catalogue which is quite hacky.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants