-
+ [URL]="canonicalUrl"
+ [searchActionRoute]="properties.searchLinkToResults">
+
+
diff --git a/sharedComponents/schema2jsonld/model/jsonld-document.ts b/sharedComponents/schema2jsonld/model/jsonld-document.ts
index 851c2c33..31e9eb80 100644
--- a/sharedComponents/schema2jsonld/model/jsonld-document.ts
+++ b/sharedComponents/schema2jsonld/model/jsonld-document.ts
@@ -17,7 +17,8 @@ export class Dataset extends JsonldDocument {
keyword: String[];
issn:String[];
headline:String[];
- alternativeHeadline:String[];
+ alternativeHeadline:String[];
+ isPartOf;
}
export interface Identifier {
diff --git a/sharedComponents/schema2jsonld/schema2jsonld.component.ts b/sharedComponents/schema2jsonld/schema2jsonld.component.ts
index 6729c522..d4090af3 100644
--- a/sharedComponents/schema2jsonld/schema2jsonld.component.ts
+++ b/sharedComponents/schema2jsonld/schema2jsonld.component.ts
@@ -59,7 +59,7 @@ export class Schema2jsonldComponent implements OnInit, OnChanges {
} else if (this.type == 'search') {
this.json = this.documentParser.createSearchPage(this.name, this.URL, this.logoURL, this.searchAction, this.description, this.searchActionRoute);
} else if (this.type == 'result') {
- docOvject = this.documentParser.convertResult(this.data, this.URL);
+ docOvject = this.documentParser.convertResult(this.data, this.URL, this.searchActionRoute);
this.json = this.documentSerializer.serializeDataset(docOvject);
} else {
this.json = this.documentParser.createSimplePage(this.name, this.URL, this.description);
diff --git a/sharedComponents/schema2jsonld/service/jsonld-document-serializer.service.ts b/sharedComponents/schema2jsonld/service/jsonld-document-serializer.service.ts
index 81f5c241..9e8ba621 100644
--- a/sharedComponents/schema2jsonld/service/jsonld-document-serializer.service.ts
+++ b/sharedComponents/schema2jsonld/service/jsonld-document-serializer.service.ts
@@ -88,7 +88,9 @@ export class JsonldDocumentSerializerService {
else if (doc.keyword && doc.keyword.length > 1) {
buffer["keywords"] = _.join(doc.keyword, ", ");
}
-
+ if(doc.isPartOf && doc.isPartOf.length > 0){
+ buffer["isPartOf"] = doc.isPartOf;
+ }
if (doc.citation && doc.citation.length == 1) {
buffer["citation"] = this.buildCitation(doc.citation[0]);
}
diff --git a/sharedComponents/schema2jsonld/service/open-aire-jsonld-converter.service.ts b/sharedComponents/schema2jsonld/service/open-aire-jsonld-converter.service.ts
index a91beae7..2f9dc612 100644
--- a/sharedComponents/schema2jsonld/service/open-aire-jsonld-converter.service.ts
+++ b/sharedComponents/schema2jsonld/service/open-aire-jsonld-converter.service.ts
@@ -92,7 +92,7 @@ export class OpenAireJsonldConverterService {
}
return buffer;
}
- convertResult(result: any, URL): Dataset {
+ convertResult(result: any, URL, searchActionRoute = null): Dataset {
const doc = new Dataset();
doc.title = this.getTitle(result);
@@ -111,6 +111,15 @@ export class OpenAireJsonldConverterService {
doc.citation = this.getCitation(result);
doc.license = this.getLicense(result);
doc.keyword = this.getKeyword(result);
+ doc.isPartOf = [];
+ let fosSubjects = this.getKeyword(result,"FOS");
+ let sdgSubjects = this.getKeyword(result,"SDG");
+ for(let fos of fosSubjects?fosSubjects:[]){
+ doc.isPartOf.push(URL.split('/search/')[0]+ searchActionRoute + "?fos=" + encodeURIComponent('"'+fos+'"'));
+ }
+ for(let sdg of sdgSubjects?sdgSubjects:[] ){
+ doc.isPartOf.push(URL.split('/search/')[0]+ searchActionRoute + "?sdg=" + encodeURIComponent('"'+sdg+'"'));
+ }
return doc;
}