ucd-library / vessel

Vivo schema + fusEki + elaStic Search; rEsearch profiLes
MIT License
0 stars 0 forks source link

Delete Citation - Indexing issues #43

Open qjhart opened 2 years ago

qjhart commented 2 years ago

We need a method to quickly delete a single citation. In Fuseki, citations can be removed with this command:

#construct { ?s ?p ?o. }
delete { ?g {?s ?p ?o. }
WHERE {
graph ?g {
  ?authorship a ucdrp:authorship;
              vivo:relates work:1472133;
              .
  bind(concat('^',str(work:1472133),'(#.*)?') as ?regex)
  bind(concat('^',str(?authorship),'(#.*)?') as ?aregex)
  ?s ?p ?o.
  filter(regex(str(?s),?regex) || regex(str(?o),?regex) || regex(str(?s),?aregex) || regex(str(?o),?aregex))
  }
}

resulting in the deletion of

<http://experts.ucdavis.edu/authorship/1472133-2#vcard>
        a              vcard:Individual ;
        vcard:hasName  <http://experts.ucdavis.edu/authorship/1472133-2#vcard-name> .

<http://experts.ucdavis.edu/venue/issn:0003-6072>
        vivo:publicationVenueFor  work:1472133 .

<http://experts.ucdavis.edu/authorship/1472133-4#vcard>
        a              vcard:Individual ;
        vcard:hasName  <http://experts.ucdavis.edu/authorship/1472133-4#vcard-name> .

work:1472133  a                     bibo:AcademicArticle , ucdrp:work ;
        rdfs:label                  "RETRACTED ARTICLE: The effects of each beta-glucosidase gene deletion on cellulase gene regulation in Neurospora crassa (online publication: DOI 10.1007/s10482-013- 9972-7)" ;
        ucdrp:best_source           "dimensions" ;
        ucdrp:insertionDateTime     "2021-11-11T03:12:09.069+00:00"^^xsd:dateTime ;
        ucdrp:lastModifiedDateTime  "2021-11-07T17:22:49.293-08:00"^^xsd:dateTime ;
        bibo:doi                    "10.1007/s10482-013-9972-7" ;
        bibo:issue                  "1" ;
        bibo:journal                "Antonie van Leeuwenhoek" ;
        bibo:status                 bibo:published , bibo:accepted ;
        bibo:volume                 "105" ;
        vivo:dateTimeValue          <http://experts.ucdavis.edu/work/1472133#date> ;
        vivo:hasPublicationVenue    <http://experts.ucdavis.edu/venue/issn:0003-6072> ;
        vivo:hasSubjectArea         FoR:0605 , FoR:1108 , <http://experts.ucdavis.edu/concept/free/674e103f71e3b5c25fdca983a816c50e> ;
        vivo:relatedBy              authorship:1472133-1 , authorship:1472133-4 , authorship:1472133-3 , authorship:1472133-2 .

person:577b493513cb20c03137f8fab2192c80
        vivo:relatedBy  authorship:1472133-4 .

<http://experts.ucdavis.edu/authorship/1472133-1#vcard>
        a              vcard:Individual ;
        vcard:hasName  <http://experts.ucdavis.edu/authorship/1472133-1#vcard-name> .

authorship:1472133-4  a  ucdrp:authorship , vivo:Authorship ;
        vivo:favorite  "false" ;
        vivo:rank      4 ;
        vivo:relates   <http://experts.ucdavis.edu/authorship/1472133-4#vcard> , work:1472133 , person:577b493513cb20c03137f8fab2192c80 .

<http://experts.ucdavis.edu/authorship/1472133-3#vcard>
        a              vcard:Individual ;
        vcard:hasName  <http://experts.ucdavis.edu/authorship/1472133-3#vcard-name> .

<http://experts.ucdavis.edu/authorship/1472133-1#vcard-name>
        a                 vcard:Name ;
        vcard:familyName  "Wu" ;
        vcard:givenName   "Weihua" .

authorship:1472133-3  a  ucdrp:authorship , vivo:Authorship ;
        vivo:rank     3 ;
        vivo:relates  <http://experts.ucdavis.edu/authorship/1472133-3#vcard> , work:1472133 .

<http://experts.ucdavis.edu/authorship/1472133-4#vcard-name>
        a                 vcard:Name ;
        vcard:familyName  "Fan" ;
        vcard:givenName   "Zhiliang" .

FoR:1108  vivo:subjectAreaOf  work:1472133 .

<http://experts.ucdavis.edu/authorship/1472133-3#vcard-name>
        a                 vcard:Name ;
        vcard:familyName  "Nguyen" ;
        vcard:givenName   "Lynn" .

authorship:1472133-2  a  ucdrp:authorship , vivo:Authorship ;
        vivo:rank     2 ;
        vivo:relates  <http://experts.ucdavis.edu/authorship/1472133-2#vcard> , work:1472133 .

FoR:0605  vivo:subjectAreaOf  work:1472133 .

<http://experts.ucdavis.edu/work/1472133#date>
        a                       vivo:DateTimeValue ;
        vivo:dateTime           "2013-09-03T00:00:00"^^xsd:dateTime ;
        vivo:dateTimePrecision  vivo:yearMonthDayPrecision .

<http://experts.ucdavis.edu/authorship/1472133-2#vcard-name>
        a                 vcard:Name ;
        vcard:familyName  "Kasuga" ;
        vcard:givenName   "Takao" .

<http://experts.ucdavis.edu/concept/free/674e103f71e3b5c25fdca983a816c50e>
        vivo:subjectAreaOf  work:1472133 .

authorship:1472133-1  a  ucdrp:authorship , vivo:Authorship ;
        vivo:rank     1 ;
        vivo:relates  <http://experts.ucdavis.edu/authorship/1472133-1#vcard> , work:1472133 .

Sending this to the system has the debouncer identify these items, the ones marked indicate those which should spawn an index command (and a delete?)

The current debouncer doesn't seem to spawn any indexing items.

jrmerz commented 2 years ago

The indexer doesn't handle deletes yet :(