Commit 58198eae authored by Joerg-Holger Panzer's avatar Joerg-Holger Panzer
Browse files

Change PURL creation

PURL of Periodical (anchor set) and volume without logID
PURL of structure elements with logID
parent b6507ff3
Pipeline #299619 passed with stages
in 8 minutes and 8 seconds
......@@ -395,7 +395,8 @@ func GetESLogFromDmdsec(
product,
parentEsLog,
parentInfo,
redisClient)
redisClient,
first)
if err != nil {
log.Errorf("could not derive ESLog from Div's in %s, due to %s", workID, err.Error())
......@@ -1288,7 +1289,8 @@ func getESLogFromDiv(
product string,
parentESLog types.ESLog,
parentInfo *types.Parent,
redisClient *redis.Client) (types.ESLog, error) {
redisClient *redis.Client,
isFirst bool) (types.ESLog, error) {
esLog := types.ESLog{}
......@@ -1712,7 +1714,11 @@ func getESLogFromDiv(
if ccontext == "nlh" {
esLog.Purl = fmt.Sprintf(config.PurlURI, dmdsec.RecordInfo.Recordidentifier.Value)
} else {
esLog.Purl = fmt.Sprintf(config.PurlURI, esLog.ID)
if isFirst {
esLog.Purl = fmt.Sprintf(config.PurlURI, workID)
} else {
esLog.Purl = fmt.Sprintf(config.PurlURI, esLog.ID)
}
}
//-- Catalogue
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment