@@ -104,7 +104,7 @@ func (config *TransformationsConfigData) updateCatalog() {
104104 reader := strings .NewReader (catalogBase )
105105 quads , errChan := rdfgo .Parse (reader , rdfgo.ParserOptions {
106106 Format : "turtle" ,
107- BaseIRI : fmt . Sprintf ( "http://%s/config/transformations#" , model .ExternalHost ) ,
107+ BaseIRI : model . ExternalURL () + model .TransformationCatalog + "#" ,
108108 })
109109
110110 go func () {
@@ -118,11 +118,11 @@ func (config *TransformationsConfigData) updateCatalog() {
118118 config .store .Import (quads )
119119
120120 // Insert transformations
121- for _ , t := range config .transformations {
122- reader := strings .NewReader (t .FNO )
121+ for _ , tf := range config .transformations {
122+ reader := strings .NewReader (tf .FNO )
123123 quads , errChan := rdfgo .Parse (reader , rdfgo.ParserOptions {
124124 Format : "turtle" ,
125- BaseIRI : fmt . Sprintf ( "http://%s/config/transformations#" , model .ExternalHost ) ,
125+ BaseIRI : model . ExternalURL () + model .TransformationCatalog + "#" ,
126126 })
127127
128128 go func () {
@@ -137,9 +137,9 @@ func (config *TransformationsConfigData) updateCatalog() {
137137
138138 // Link transformation to catalog
139139 config .store .AddQuadFromTerms (
140- rdfgo .NewNamedNode (fmt . Sprintf ( "http://%s/config/transformations #transformation-catalog", model . ExternalHost ) ),
140+ rdfgo .NewNamedNode (model . ExternalURL () + model . TransformationCatalog + " #transformation-catalog" ),
141141 rdfgo .NewNamedNode ("https://spec.knows.idlab.ugent.be/aggregator-protocol/latest/#hasTransformation" ),
142- rdfgo .NewNamedNode (fmt . Sprintf ( "http://%s/config/transformations#%s" , model . ExternalHost , t . ID ) ),
142+ rdfgo .NewNamedNode (model . ExternalURL () + model . TransformationCatalog + "#" + tf . ID ),
143143 nil ,
144144 )
145145 }
0 commit comments