ucd-library / ucdlib-theme

University branding, additional theme support, theme elements
MIT License
0 stars 0 forks source link

`<ucdlib-sils-permalink href="">` link update #39

Open qjhart opened 2 years ago

qjhart commented 2 years ago

The way to use this component is usually that someone finds the item they are interested in using primo. That is where they identify what the permalink is. Because ExLibris SILS currently does not include proper SEO, this does NOT correspond to where we go for the data. So, we need to discover another endpoint to get data about our permalink in some manner.

Note the the Primo instance does this exact step. For each item in the catalog, primo makes an additional API call to get the record data (esp the pnx record) in JSON format. However, this web-component cannot use this endpoint because of the limitation ins the CORS headers. By default, browsers will not allow pages to access data from another site, unless that site explicitly allows it. The Alma Site forbids access to these pnx records.

there needs to be a function that checks this permalink, and converts the permalink to a URI with the JSON data.

Type pnx linked
Video pnx ld
Book pnx ld
Article pnx ???

So First, we test the link for correctness of the link.

url = |https://search.library.ucdavis.edu/permalink/01UCD_INST/([^/]+)/([a-z0-9]+)$|

If it doesn't match, then fail with an "href is not a permalink"

Linked Data

How you can access the Linked data from ALMA is dependant on where the record is coming from. Access is different whether or not the data comes from the local zone, network zone, or Central Discovery Index,

For the local zone, this presentation of about the Linked Data Configuration shows that, once the llinked data configuration is set, you can always find the linked data from the permalink by going to: https://open-na.hosted.exlibrisgroup.com/alma/[INSTITUTION_CODE]/bibs/[MMSID].jsonld where for the UC Davis the [INSTITUTION_CODE]=01UCD_INST. The permalink includes the [Institution Code], so we know in advance it should work.

For Network Zone data, For example, this Permalink [https://search.library.ucdavis.edu/permalink/01UCD_INST/9fle3i/alma990038431710403126] in the alma interface points to a network zone linked data location: https://open-na.hosted.exlibrisgroup.com/alma/01UCS_NETWORK/bibs/9912892263406531 But this link doesn't work. In addition, using the notes from the configuration presentation, we'd expect https://open-na.hosted.exlibrisgroup.com/alma/01UCD_INST/bibs/9912892263406531 to work.

CDI Data

CDI

Network Zone

Adding Linked Data To Results

Other Notes

ExLibris DashBoard

Linked Data

Linked Data Integration

qjhart commented 2 years ago

Here is a brief summary of how we could actually be able to use linked data more actively. In order of goodness

  1. The schema.org data could actually be included in the permalink data. With that access, we would have the most standard accepted way of getting the information needed for a infocards. We cannot do this, because the permalink page renders this information dynamically.

  2. We could have consistent access to the open-na linked data from ExLibris. This would also allow us access to the data needed to create an infocard. We also cannot do this, because we don't have reliable methods to determine the proper URL to get from our permalink. In addition our 01UCS_NETWORK data is not properly setup, (II'm not sure about the community zone) and there seems to be no link what-so-ever to the CDI data. I don't understand the licensing that Ex-Libris is taking w/ the metadata associated w/ the CDI data. In terms of linking. In a perfect world, Primo could, eg. add a link to the open-na data via either a tag for a link reference in the http header.

  3. We could use the same API that drives the primo site, to access our info cards. Every permalilnk ends up calling an Ex-Libris API for the data to fill the result site. This call includes all the information we need to create an infocard, though it is in an Ex-Libris specific format. See above for examples. We currently cannot do this, because the API doesn't include a header to allow cross site scripting, and so we can't use this method either.

  4. We could setup a proxy API on library.ucdavis.edu that could fetch and reformat the data from the Ex-Libris Primo API call, create SEO metadata and respond with that. I don't know if that violates any licensing with the Ex-Libris application. This one we could do, though I'm not sure about legality

  5. We could read our own site map, run a headless browser over the data, extract the schema.org metadata, and build our own API that responds with this data. This would be quite a burden but maybe avoids any potential issues w/ Ex-Libris.

schema.org metadata (via permalink)

{
  "@context": "http://schema.org",
  "@type": "WebPage",
  "@id": "/fulldisplay?context=L&vid=01UCD_INST:UCD&search_scope=DN_and_CI&tab=UCSILSDefaultSearch&docid=alma990030849910403126",
  "identifier": {
    "@type": "PropertyValue",
    "propertyID": "local",
    "value": "alma990030849910403126"
  },
  "name": "Bande à part ",
  "mainEntity": {
    "@type": "Movie",
    "@id": "#Movie",
    "creator": [
      {
        "@type": "Person",
        "name": "Godard, Jean-Luc"
      },
      {
        "@type": "Person",
        "name": "Karina, Anna"
      },
      {
        "@type": "Person",
        "name": "Frey, Sami"
      },
      {
        "@type": "Person",
        "name": "Brasseur, Claude"
      },
      {
        "@type": "Person",
        "name": "Coutard, Raoul."
      },
      {
        "@type": "Person",
        "name": "Guillemot, Agnès"
      },
      {
        "@type": "Person",
        "name": "Legrand, Michel"
      },
      {
        "@type": "Person",
        "name": "Hitchens, Dolores"
      }
    ],
    "description": [
      "This disc is PAL format, region 4 and will not play in standard North American DVD players.",
      "Aspect ratio: 1:33:1.",
      "Originally produced as a motion picture in 1964.",
      "Based on the novel Fools gold by Dolores Birk Hitchens.",
      "DVD includes commentary on fragments of the movie, by Rolando Caputo; original and re-release theatrical trailers; image gallery.",
      "The story of two aimless thieves and an adventursome young girl who plan a robbery only to have it escalate into murder."
    ],
    "inLanguage": "fre",
    "publisher": "©2006",
    "about": [
      {
        "@type": "Thing",
        "name": "Robbery -- France"
      },
      {
        "@type": "Thing",
        "name": "Criminals -- France"
      },
      {
        "@type": "Thing",
        "name": "Criminals"
      },
      {
        "@type": "Thing",
        "name": "Robbery"
      },
      {
        "@type": "Thing",
        "name": "France"
      }
    ]
  }
}

CDI Schema.org metadata

{
  "@context": "http://schema.org",
  "@type": "WebPage",
  "@id": "/fulldisplay?context=PC&vid=01UCD_INST:UCD&search_scope=DN_and_CI&tab=UCSILSDefaultSearch&docid=cdi_crossref_primary_10_1145_3345551",
  "identifier": {
    "@type": "PropertyValue",
    "propertyID": "local",
    "value": "cdi_crossref_primary_10_1145_3345551"
  },
  "name": "Large-scale Semantic Integration of Linked Data: A Survey",
  "mainEntity": {
    "@type": "Article",
    "@id": "#Article",
    "description": [
      "A large number of published datasets (or sources) that follow Linked Data principles is currently available and this number grows rapidly. However, the major target of Linked Data, i.e., linking and integration, is not easy to achieve. In general, information integration is difficult, because (a) datasets are produced, kept, or managed by different organizations using different models, schemas, or formats, (b) the same real-world entities or relationships are referred with different URIs or names and in different natural languages, (c) datasets usually contain complementary information, (d) datasets can contain data that are erroneous, out-of-date, or conflicting, (e) datasets even about the same domain may follow different conceptualizations of the domain, (f) everything can change (e.g., schemas, data) as time passes. This article surveys the work that has been done in the area of Linked Data integration, it identifies the main actors and use cases, it analyzes and factorizes the integration process according to various dimensions, and it discusses the methods that are used in each step. Emphasis is given on methods that can be used for integrating several datasets. Based on this analysis, the article concludes with directions that are worth further research."
    ],
    "issn": [
      "0360-0300",
      "1557-7341"
    ],
    "inLanguage": "eng",
    "publisher": {
      "@type": "Organization",
      "name": [
        "ACM"
      ]
    },
    "about": [
      {
        "@type": "Thing",
        "name": "big data"
      },
      {
        "@type": "Thing",
        "name": "data discovery"
      },
      {
        "@type": "Thing",
        "name": "Data integration"
      },
      {
        "@type": "Thing",
        "name": "RDF"
      },
      {
        "@type": "Thing",
        "name": "semantic web"
      }
    ],
    "isPartOf": {
      "@id": "#periodical",
      "@type": [
        "PublicationVolume",
        "Periodical"
      ],
      "issn": "0360-0300",
      "PublicationVolume": "52"
    },
    "volumeNumber": "52",
    "pagination": "1-40",
    "issueNumber": "5"
  }
}