Skip to main content
Skip table of contents

Feste Schlagwörter


Datenbankstruktur (wird beim neustart von alfresco angelegt) edu-sharing.server.conf:

CODE
repository.database.scripts.custom:["factualterm.sql.properties"]


Initialer Import:

  1. download der datei authorities-sachbegriff_dnbmarc_20201013.mrc.xml (https://data.dnb.de/GND/)
  2. über die edu-sharing admin gui im Jobs(Aufgaben Bereich) einspielen: Job ImportFactualTermMarc21

Metadatenset widget definieren (mds_override.xml):

CODE
<widget>
<id>ccm:classification_keyword</id>
<type>multivalueFixedBadges</type>
<caption>Feste Schlagwörter</caption>
<placeholder>Wichtige Begriffe zum Material...</placeholder>
<suggestionSource>Sql</suggestionSource>
<suggestionQuery>select CASE WHEN factual_term_synonyms IS NULL THEN factual_term_value WHEN array_length(factual_term_synonyms,1) = 1 THEN format('%s (%s)',factual_term_value, factual_term_synonyms[1])  ELSE format('%s (%s, %s)',factual_term_value, factual_term_synonyms[1], factual_term_synonyms[2]) END from edu_factual_term where (lower(factual_term_value) like ? OR lower(factual_term_synonyms[0]) like ? OR lower(factual_term_synonyms[1]) like ?) order by char_length(factual_term_value) limit 100</suggestionQuery>
<textEscapingPolicy>all</textEscapingPolicy>
</widget>



ggf. regelmäßige aktualisierung der schlagwörter (edu-sharing.server.conf):

CODE
jobs.entries += {
      name: "Import Factual Term Marc 21",
      class: "org.edu_sharing.repository.server.jobs.quartz.ImporterJob",
      trigger: "Cron[0 0 22 * * ?]",
      params: {
        "oai_base_url": "https://services.dnb.de/oai/repository",
        "oai_metadata_prefix": "MARC21-xml",
        "sets": "authorities:sachbegriff",
        "record_handler": "org.edu_sharing.repository.server.importer.RecordHandlerKeywordsDNBMarc",
        "persistent_handler": "org.edu_sharing.repository.server.importer.PersistenHandlerKeywordsDNBMarc",
        "importer_class":"org.edu_sharing.repository.server.importer.OAIPMHLOMImporter",
        "period_in_days":"14",
        "username":"admin"
      }
}

Migration alte version der festen schlagwörter nach key/value

  1.  in admin gui folgenden Job starten:
    CODE
    org.edu_sharing.repository.server.jobs.quartz.MigrateFactualTermsToKeyValue
    {
    "test": "false"
    }
  2. Datenbank mit dnb Daten aktualisieren
    CODE
    org.edu_sharing.repository.server.jobs.quartz.ImportFactualTermMarc21
    {
    "fileUri": "file://localhost/authorities-sachbegriff_dnbmarc_20201013.mrc.xml"
    }
  3. Keywords an den Nodes mit den neuen Werten der DB aktualisieren
    CODE
    org.edu_sharing.repository.server.importer.FactualTermDisplayUpdaterJob
    {
    }
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.