Don't use relators as property but indicate relator via "role" property #38

Closed
acka47 opened this Issue Feb 26, 2016 · 7 comments

Comments

Projects
None yet
2 participants
@acka47
Contributor

acka47 commented Feb 26, 2016

As discussed in #10 , we will indicate the roles of a contributor in the contributor object with the "role" property and won't use relators as properties.

Example:

{
  "@context": {
    "id": "@id",
    "type": "@type",
    "role": "http://bibframe.org/vocab/relator",
    "contributor": {
      "@type": "@id",
      "@id": "http://purl.org/dc/terms/contributor",
      "@container": "@set"
    },
    "label": "http://www.w3.org/2000/01/rdf-schema#label",
    "altLabel": "http://www.w3.org/2004/02/skos/core#altLabel",
    "subject": {
      "@type": "@id",
      "@id": "http://purl.org/dc/terms/subject",
      "@container": "@list"
    }
  },
  "@id" : "http://lobid.org/resources/HT018843259#!",
  "contributor": [ {
    "id": "http://d-nb.info/gnd/118548018",
    "type": "DifferentiatedPerson",
    "role": {
      "id": "http://id.loc.gov/vocabulary/relators/cre",
      "label": "Autor/in"
    },
    "label": "Becker, Thomas Paul",
    "altLabel": [ "Becker, Thomas P." ]
  } ],
  "subject": [ {
     "id" : "http://d-nb.info/gnd/4031485-6",
     "type": "PlaceOrGeographicName",
     "label": "Erzstift Köln",
     "altLabel": [ "Kölner Krieg", "Truchsessischer Krieg" ]
  } ]
}

We won't be able to only use a string as value for "role" as proposed in #10 but will – as you can see in the example – also use the side car approach here – giving us presentation labels for the different roles in the data.

@acka47

This comment has been minimized.

Show comment
Hide comment
@acka47

acka47 Nov 8, 2016

Contributor

@jschnasse just pointed out that the approach we chose above is not correct as it associates the role with the person. As the role is a relation between the person and the resource this has to somehow be made clear. Taking a look at Bibframe 2.0, it seems to be a reasonable approach. An example from http://www.loc.gov/bibframe/docs/pdf/bf2-roles-apr2016.pdf:

<http://bibframe.example.org/resource> bf:contribution [
    a bf:Contribution ;
    bf:role “illustrator” ;
    bf:agent <http://id.loc.gov/rwo/agents/n94064763> ] .

For the example above, the result would look like this:

{
  "@context": {
    "id": "@id",
    "type": "@type",
    "agent": "http://bibframe.org/vocab/agent",
    "role": "http://bibframe.org/vocab/relator",
    "conbtribution": "http://bibframe.org/vocab/contribution",
    "Contribution": "http://bibframe.org/vocab/Contribution",
    "label": "http://www.w3.org/2000/01/rdf-schema#label",
    "altLabel": "http://www.w3.org/2004/02/skos/core#altLabel",
    "subject": {
      "@type": "@id",
      "@id": "http://purl.org/dc/terms/subject",
      "@container": "@list"
    }
  },
  "id" : "http://lobid.org/resources/HT018843259#!",
  "contribution": [ {
    "type": "Contribution",
    "role": {
    "id": "http://id.loc.gov/vocabulary/relators/cre",
    "label": "Autor/in"
    },
    "agent": {
      "id": "http://d-nb.info/gnd/118548018",
      "type": "DifferentiatedPerson",
      "label": "Becker, Thomas Paul",
      "altLabel": [ "Becker, Thomas P." ]
      }
  } ],
  "subject": [ {
     "id" : "http://d-nb.info/gnd/4031485-6",
     "type": "PlaceOrGeographicName",
     "label": "Erzstift Köln",
     "altLabel": [ "Kölner Krieg", "Truchsessischer Krieg" ]
  } ]
}
Contributor

acka47 commented Nov 8, 2016

@jschnasse just pointed out that the approach we chose above is not correct as it associates the role with the person. As the role is a relation between the person and the resource this has to somehow be made clear. Taking a look at Bibframe 2.0, it seems to be a reasonable approach. An example from http://www.loc.gov/bibframe/docs/pdf/bf2-roles-apr2016.pdf:

<http://bibframe.example.org/resource> bf:contribution [
    a bf:Contribution ;
    bf:role “illustrator” ;
    bf:agent <http://id.loc.gov/rwo/agents/n94064763> ] .

For the example above, the result would look like this:

{
  "@context": {
    "id": "@id",
    "type": "@type",
    "agent": "http://bibframe.org/vocab/agent",
    "role": "http://bibframe.org/vocab/relator",
    "conbtribution": "http://bibframe.org/vocab/contribution",
    "Contribution": "http://bibframe.org/vocab/Contribution",
    "label": "http://www.w3.org/2000/01/rdf-schema#label",
    "altLabel": "http://www.w3.org/2004/02/skos/core#altLabel",
    "subject": {
      "@type": "@id",
      "@id": "http://purl.org/dc/terms/subject",
      "@container": "@list"
    }
  },
  "id" : "http://lobid.org/resources/HT018843259#!",
  "contribution": [ {
    "type": "Contribution",
    "role": {
    "id": "http://id.loc.gov/vocabulary/relators/cre",
    "label": "Autor/in"
    },
    "agent": {
      "id": "http://d-nb.info/gnd/118548018",
      "type": "DifferentiatedPerson",
      "label": "Becker, Thomas Paul",
      "altLabel": [ "Becker, Thomas P." ]
      }
  } ],
  "subject": [ {
     "id" : "http://d-nb.info/gnd/4031485-6",
     "type": "PlaceOrGeographicName",
     "label": "Erzstift Köln",
     "altLabel": [ "Kölner Krieg", "Truchsessischer Krieg" ]
  } ]
}
@acka47

This comment has been minimized.

Show comment
Hide comment
@acka47

acka47 Nov 8, 2016

Contributor

Here is an example with multiple contributions:

{
   "@context":{
      "id":"@id",
      "type":"@type",
      "agent":"http://bibframe.org/vocab/agent",
      "role":"http://bibframe.org/vocab/relator",
      "contribution":"http://bibframe.org/vocab/contribution",
      "Contribution":"http://bibframe.org/vocab/Contribution",
      "label":"http://www.w3.org/2000/01/rdf-schema#label",
      "altLabel":"http://www.w3.org/2004/02/skos/core#altLabel",
      "subject":{
         "@type":"@id",
         "@id":"http://purl.org/dc/terms/subject",
         "@container":"@list"
      }
   },
   "id":"http://lobid.org/resources/HT019093814#!",
   "contribution":[
      {
         "type":"Contribution",
         "role":{
            "id":"http://id.loc.gov/vocabulary/relators/pht",
            "label":"Fotografie"
         },
         "agent":{
            "id":"http://d-nb.info/gnd/1067217789",
            "label":"Ganslmeier, Jakob",
            "type":[
               "Person"
            ]
         }
      },
      {
         "type":"Contribution",
         "role":{
            "id":"http://id.loc.gov/vocabulary/relators/pht",
            "label":"Fotografie"
         },
         "agent":{
            "id":"http://d-nb.info/gnd/1108328849",
            "label":"Boeszoermeny, Louisa",
            "type":[
               "Person"
            ]
         }
      },
      {
         "type":"Contribution",
         "role":{
            "id":"http://id.loc.gov/vocabulary/relators/ctb",
            "label":"Mitwirkung"
         },
         "agent":{
            "id":"http://d-nb.info/gnd/5555595-0",
            "label":"Kultur Ruhr GmbH",
            "type":[
               "CorporateBody"
            ]
         }
      },
      {
         "type":"Contribution",
         "role":{
            "id":"http://id.loc.gov/vocabulary/relators/ctb",
            "label":"Mitwirkung"
         },
         "agent":{
            "id":"http://d-nb.info/gnd/7741856-6",
            "label":"Kultur Ruhr GmbH",
            "type":[
               "CorporateBody"
            ]
         }
      }
   ]
}
Contributor

acka47 commented Nov 8, 2016

Here is an example with multiple contributions:

{
   "@context":{
      "id":"@id",
      "type":"@type",
      "agent":"http://bibframe.org/vocab/agent",
      "role":"http://bibframe.org/vocab/relator",
      "contribution":"http://bibframe.org/vocab/contribution",
      "Contribution":"http://bibframe.org/vocab/Contribution",
      "label":"http://www.w3.org/2000/01/rdf-schema#label",
      "altLabel":"http://www.w3.org/2004/02/skos/core#altLabel",
      "subject":{
         "@type":"@id",
         "@id":"http://purl.org/dc/terms/subject",
         "@container":"@list"
      }
   },
   "id":"http://lobid.org/resources/HT019093814#!",
   "contribution":[
      {
         "type":"Contribution",
         "role":{
            "id":"http://id.loc.gov/vocabulary/relators/pht",
            "label":"Fotografie"
         },
         "agent":{
            "id":"http://d-nb.info/gnd/1067217789",
            "label":"Ganslmeier, Jakob",
            "type":[
               "Person"
            ]
         }
      },
      {
         "type":"Contribution",
         "role":{
            "id":"http://id.loc.gov/vocabulary/relators/pht",
            "label":"Fotografie"
         },
         "agent":{
            "id":"http://d-nb.info/gnd/1108328849",
            "label":"Boeszoermeny, Louisa",
            "type":[
               "Person"
            ]
         }
      },
      {
         "type":"Contribution",
         "role":{
            "id":"http://id.loc.gov/vocabulary/relators/ctb",
            "label":"Mitwirkung"
         },
         "agent":{
            "id":"http://d-nb.info/gnd/5555595-0",
            "label":"Kultur Ruhr GmbH",
            "type":[
               "CorporateBody"
            ]
         }
      },
      {
         "type":"Contribution",
         "role":{
            "id":"http://id.loc.gov/vocabulary/relators/ctb",
            "label":"Mitwirkung"
         },
         "agent":{
            "id":"http://d-nb.info/gnd/7741856-6",
            "label":"Kultur Ruhr GmbH",
            "type":[
               "CorporateBody"
            ]
         }
      }
   ]
}

@dr0i dr0i added working and removed ready labels Nov 18, 2016

@dr0i dr0i added ready working and removed working ready labels Nov 22, 2016

dr0i added a commit that referenced this issue Nov 25, 2016

Substitute relator properties with roles
Instead of using flat properties, such as dct:creator or marcrel:sng, no every
entity is a dct:contributor with roles (depicting that entity as creator,
singer etc.).

See #38.

dr0i added a commit that referenced this issue Nov 25, 2016

Substitute relator properties with roles
Instead of using flat properties, such as dct:creator or marcrel:sng, no every
entity is a dct:contributor with roles (depicting that entity as creator,
singer etc.).

See #38.

dr0i added a commit to hbz/lobid-rdf-to-json that referenced this issue Nov 25, 2016

dr0i added a commit that referenced this issue Nov 25, 2016

Substitute relator properties with roles
Instead of using flat properties, such as dct:creator or marcrel:sng, no every
entity is a dct:contributor with roles (depicting that entity as creator,
singer etc.).

See #38.

@dr0i dr0i added ready working and removed working ready labels Dec 1, 2016

dr0i added a commit that referenced this issue Dec 2, 2016

dr0i added a commit that referenced this issue Dec 2, 2016

WIP todo: contributor without ID
Brauchst einen bnode fuer die agents wenn ohne ID:
MapperParsingException[object mapping for [contribution.agent] tried to parse field [agent] as object, but found a concrete value]

sihe TT050409948

See #38.
@acka47

This comment has been minimized.

Show comment
Hide comment
@acka47

acka47 Dec 7, 2016

Contributor

When we are finished with this we can clean up our JSON-LD context by removing all the MARC relator entries. We will need them in labels.json, though.

{
   "cinematographer":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/cng",
      "@container":"@set"
   },
   "engraver":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/egr",
      "@container":"@set"
   },
   "collaborator":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/clb",
      "@container":"@set"
   },
   "bibliographicAntecedent":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/ant",
      "@container":"@set"
   },
   "introductionBy":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/aui",
      "@container":"@set"
   },
   "cartographer":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/ctg",
      "@container":"@set"
   },
   "director":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/drt",
      "@container":"@set"
   },
   "singer":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/sng",
      "@container":"@set"
   },
   "musician":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/mus",
      "@container":"@set"
   },
   "performer":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/prf",
      "@container":"@set"
   },
   "composer":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/cmp",
      "@container":"@set"
   },
   "conductor":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/cnd",
      "@container":"@set"
   },
   "actor":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/act",
      "@container":"@set"
   },
   "afterwordBy":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/aft",
      "@container":"@set"
   },
   "redaktor":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/red",
      "@container":"@set"
   },
   "producer":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/pro",
      "@container":"@set"
   },
   "dedicatee":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/dte",
      "@container":"@set"
   },
   "honoree":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/hnr",
      "@container":"@set"
   },
   "collector":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/col",
      "@container":"@set"
   },
   "photographer":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/pht",
      "@container":"@set"
   },
   "screenwriter":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/aus",
      "@container":"@set"
   },
   "interviewer":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/ivr",
      "@container":"@set"
   },
   "contributor_":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/ctb",
      "@container":"@set"
   },
   "interviewee":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/ive",
      "@container":"@set"
   },
   "illustrator":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/ill",
      "@container":"@set"
   }
}
Contributor

acka47 commented Dec 7, 2016

When we are finished with this we can clean up our JSON-LD context by removing all the MARC relator entries. We will need them in labels.json, though.

{
   "cinematographer":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/cng",
      "@container":"@set"
   },
   "engraver":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/egr",
      "@container":"@set"
   },
   "collaborator":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/clb",
      "@container":"@set"
   },
   "bibliographicAntecedent":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/ant",
      "@container":"@set"
   },
   "introductionBy":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/aui",
      "@container":"@set"
   },
   "cartographer":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/ctg",
      "@container":"@set"
   },
   "director":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/drt",
      "@container":"@set"
   },
   "singer":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/sng",
      "@container":"@set"
   },
   "musician":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/mus",
      "@container":"@set"
   },
   "performer":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/prf",
      "@container":"@set"
   },
   "composer":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/cmp",
      "@container":"@set"
   },
   "conductor":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/cnd",
      "@container":"@set"
   },
   "actor":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/act",
      "@container":"@set"
   },
   "afterwordBy":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/aft",
      "@container":"@set"
   },
   "redaktor":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/red",
      "@container":"@set"
   },
   "producer":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/pro",
      "@container":"@set"
   },
   "dedicatee":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/dte",
      "@container":"@set"
   },
   "honoree":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/hnr",
      "@container":"@set"
   },
   "collector":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/col",
      "@container":"@set"
   },
   "photographer":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/pht",
      "@container":"@set"
   },
   "screenwriter":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/aus",
      "@container":"@set"
   },
   "interviewer":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/ivr",
      "@container":"@set"
   },
   "contributor_":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/ctb",
      "@container":"@set"
   },
   "interviewee":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/ive",
      "@container":"@set"
   },
   "illustrator":{
      "@type":"@id",
      "@id":"http://id.loc.gov/vocabulary/relators/ill",
      "@container":"@set"
   }
}

dr0i added a commit that referenced this issue Dec 7, 2016

WIP todo: contributor without ID
fast geschafft - zwei labels für _:BIrlenbusch

Brauchst einen bnode fuer die agents wenn ohne ID:
MapperParsingException[object mapping for [contribution.agent] tried to parse field [agent] as object, but found a concrete value]

sihe TT050409948

See #38.

@dr0i dr0i referenced this issue in hbz/lobid-rdf-to-json Dec 8, 2016

Merged

Hbz lobid resources 38 subsume under contribution #62

dr0i added a commit that referenced this issue Dec 8, 2016

Add contributor bag
Subsume contributors and creators as "agents" in parallel with their "role"
under the "contributor"-array.
When contributors don't have an ID they will become an bnode object.

See #38.

dr0i added a commit to hbz/lobid-rdf-to-json that referenced this issue Dec 8, 2016

Substitue dc(t):contributor with bibf:agent and bibf:contribution
- substitue bibo:translator with relator:trl
- substitue bibo:editor with relator:edt
- update tests with new data

See hbz/lobid-resources#38.

dr0i added a commit that referenced this issue Dec 8, 2016

Add contribution bag
Subsume contributors and creators as "agents" in parallel with their "role"
under the "contribution"-object.
When contributors don't have an ID they will become an bnode object.

- substitue bibo:translator with relator:trl
- substitue bibo:editor with relator:edt

See #38.
@dr0i

This comment has been minimized.

Show comment
Hide comment
@dr0i

dr0i Dec 8, 2016

Contributor

Deployed test set to staging, see e.g. http://test.lobid.org/resources/HT018454638#!.

Contributor

dr0i commented Dec 8, 2016

Deployed test set to staging, see e.g. http://test.lobid.org/resources/HT018454638#!.

@dr0i dr0i assigned acka47 and unassigned dr0i Dec 8, 2016

@dr0i dr0i added review and removed working labels Dec 8, 2016

dr0i added a commit that referenced this issue Dec 9, 2016

Fix "bnode to literal" in contributorOrder
This is a workaround. "contributorOrder" will be removed in whole when #125
is solved.

Part of #38.

@acka47 acka47 removed their assignment Dec 13, 2016

fsteeg added a commit to hbz/nwbib that referenced this issue Dec 13, 2016

@fsteeg fsteeg referenced this issue in lobid/lobid.github.com Dec 13, 2016

Merged

Short post based on UI updates for new contribution field #1

dr0i added a commit that referenced this issue Dec 15, 2016

Take some more blank-node contributors into account
- take just one preferred name into account, see TT001230001

See #38.

dr0i added a commit to hbz/lobid-rdf-to-json that referenced this issue Dec 15, 2016

@dr0i dr0i referenced this issue in hbz/lobid-rdf-to-json Dec 15, 2016

Merged

Remove MARC relators from context. #65

@dr0i dr0i self-assigned this Dec 15, 2016

@dr0i dr0i added processing review and removed review labels Dec 15, 2016

@dr0i dr0i closed this in #131 Dec 20, 2016

@dr0i dr0i removed the review label Dec 20, 2016

@dr0i

This comment has been minimized.

Show comment
Hide comment
@dr0i

dr0i Dec 20, 2016

Contributor

Deployed to staging and production, @acka47 please have a look.

Contributor

dr0i commented Dec 20, 2016

Deployed to staging and production, @acka47 please have a look.

@dr0i dr0i reopened this Dec 20, 2016

@dr0i dr0i assigned acka47 and unassigned dr0i Dec 20, 2016

@dr0i dr0i added review and removed processing labels Dec 20, 2016

@acka47

This comment has been minimized.

Show comment
Hide comment
@acka47

acka47 Dec 20, 2016

Contributor

+1. Closing.

Contributor

acka47 commented Dec 20, 2016

+1. Closing.

@acka47 acka47 closed this Dec 20, 2016

@acka47 acka47 removed the review label Dec 20, 2016

dr0i pushed a commit that referenced this issue Jan 11, 2017

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