mediachain / aleph

א: The mediachain universe manipulation engine
MIT License
38 stars 16 forks source link

Using refs #51

Open denisnazarov opened 7 years ago

denisnazarov commented 7 years ago

How does one use refs to other objects?

Example: https://github.com/MuseumofModernArt/collection has an Artists.json and Artworks.json. Artworks reference objects in Artists via an array of ConstituentID:

{
  "Title": "Ferdinandsbrücke Project, Vienna, Austria, Elevation, preliminary version",
  "Artist": [
    "Otto Wagner"
  ],
  "ConstituentID": [
    6210
  ],
  "ArtistBio": [
    "Austrian, 1841–1918"
  ],
  "Nationality": [
    "Austrian"
  ],
  "BeginDate": [
    1841
  ],
  "EndDate": [
    1918
  ],
  "Gender": [
    "Male"
  ],
  "Date": "1896",
  "Medium": "Ink and cut-and-pasted painted pages on paper",
  "Dimensions": "19 1/8 x 66 1/2\" (48.6 x 168.9 cm)",
  "CreditLine": "Fractional and promised gift of Jo Carole and Ronald S. Lauder",
  "AccessionNumber": "885.1996",
  "Classification": "Architecture",
  "Department": "Architecture & Design",
  "DateAcquired": "1996-04-09",
  "Cataloged": "Y",
  "ObjectID": 2,
  "URL": "http://www.moma.org/collection/works/2",
  "ThumbnailURL": "http://www.moma.org/media/W1siZiIsIjU5NDA1Il0sWyJwIiwiY29udmVydCIsIi1yZXNpemUgMzAweDMwMFx1MDAzZSJdXQ.jpg?sha=137b8455b1ec6167",
  "Height (cm)": 48.6,
  "Width (cm)": 168.9
}

I want to include a reference to the Artist object via the statement's refs array:

Other, probably not solved via refs:

vyzo commented 7 years ago

Two mechanisms supported at the lowest level:

parkan commented 7 years ago

@denisnazarov the case you're describing goes like this:

Let me give you a simple example of merging based on ukiyo-e. For example, this image:

http://www.mfa.org/collections/object/226444

gets a WKI of mfa:226444, while this one:

http://collections.artsmia.org/art/2006/kirifuri-waterfall-at-mount-kurokami-in-shimotsuke-province-katsushika-hokusai

gets mia:2006. For simplicity, let's say that the prefixes and namespaces are the same. Then in the ukiyoe namespace, you have a statement w/o a body but with wki refs of mfa:226444, mia:2006, which says that from this perspective, these items constitute a single entity. Does that make sense?

denisnazarov commented 7 years ago

Yep makes total sense. I think the artist example is more exciting because it would let you find artworks in a different collection (picassos in tate) using an artist id in yours (picasso in moma).

Is this something we can illustrate with a query with what we have built today? If so would be great to get an example so I can include that in the tutorial/vid.

parkan commented 7 years ago

@denisnazarov yeah, I used this example for clarity, the artist case is equivalent. This kind of join is not supported yet, tho