Ignore:
Timestamp:
2023-11-25T19:06:30+13:00 (7 months ago)
Author:
anupama
Message:
  1. For editing user comments with the document editor, I want to set metamode to override just once instead of for each docid (that is, for each docrecord). This didn't work before because the perl code didn't allow it as optional argument, although the actual set-metadata-array() perl subroutines were coded for it. 2. The Java code needs to allow an array of document records, without requiring that each docrecord contains a metatable field (a sub array of meta records). This is because the perl code set-metadata-array() subroutines allowed for this, but when set-metadata functionality started needing authentication/user editing powers (authentication goes through java, which then relays the command to perl), this pre-existing, optional way of setting metadata in the perl code wasn't opened up through java.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/cgiactions/modmetadataaction.pm

    r38395 r38431  
    8383    "set-metadata-array" => {
    8484        'compulsory-args' => [ "where", "json" ],
    85         'optional-args'   => [ ],
     85        'optional-args'   => [ "metamode" ],
    8686        'help-string' => [
    8787        'A simple example: metadata-server.pl?a=set-metadata-array&where=archives|index|import&c=demo&json=[{"docid":"HASHc5bce2d6d3e5b04e470ec9","metaname":"Title","metavalue":"Tralalala","metamode":"accumulate"},{"docid":"HASHbe483fa4df4e096335d1c8","metaname":"Title","metavalue":"Lala was here","metapos":0, "metamode":"override"}]',
     
    9797    "set-archives-metadata-array" => {
    9898        'compulsory-args' => [ "json" ],
    99         'optional-args'   => [ ] },
     99        'optional-args'   => [ "metamode" ] },
    100100       
    101101    "set-import-metadata-array" => {
    102102        'compulsory-args' => [ "json" ],
    103         'optional-args'   => [ ] },
     103        'optional-args'   => [ "metamode" ] },
    104104
    105105    "set-index-metadata-array" => {
    106106        'compulsory-args' => [ "json" ],
    107         'optional-args'   => [ ] },
     107        'optional-args'   => [ "metamode" ] },
    108108   
    109109    "set-live-metadata-array" => {
Note: See TracChangeset for help on using the changeset viewer.