@@ -6,14 +6,14 @@ import io.circe.syntax._
6
6
import org .apache .jena .query .QuerySolution
7
7
import org .apache .jena .rdf .model .Resource
8
8
import org .phenoscape .sparql .SPARQLInterpolation ._
9
- import org .renci .cam .Biolink .{BiolinkData , biolinkData }
9
+ import org .renci .cam .Biolink .{biolinkData , BiolinkData }
10
10
import org .renci .cam .HttpClient .HttpClient
11
11
import org .renci .cam .SPARQLQueryExecutor .SPARQLCache
12
12
import org .renci .cam .Util .IterableSPARQLOps
13
13
import org .renci .cam .domain .PredicateMappings .{getBiolinkQualifiedPredicates , mapQueryEdgePredicates }
14
14
import org .renci .cam .domain ._
15
- import zio .config .{ZConfig , getConfig }
16
- import zio .{Has , RIO , Task , UIO , ZIO , config => _ }
15
+ import zio .config .{getConfig , ZConfig }
16
+ import zio .{config => _ , Has , RIO , Task , UIO , ZIO }
17
17
18
18
import java .math .BigInteger
19
19
import java .nio .charset .StandardCharsets
@@ -200,8 +200,8 @@ object QueryService extends LazyLogging {
200
200
201
201
// Generate the attributes we will need to produce the edge output.
202
202
originalKS <- ZIO
203
- .fromOption(biolinkData.predicates.find(p => p.shorthand == " original_knowledge_source " ))
204
- .orElseFail(new Exception (" could not get biolink:original_knowledge_source " ))
203
+ .fromOption(biolinkData.predicates.find(p => p.shorthand == " primary_knowledge_source " ))
204
+ .orElseFail(new Exception (" could not get biolink:primary_knowledge_source " ))
205
205
aggregatorKS <- ZIO
206
206
.fromOption(biolinkData.predicates.find(p => p.shorthand == " aggregator_knowledge_source" ))
207
207
.orElseFail(new Exception (" could not get biolink:aggregator_knowledge_source" ))
@@ -674,9 +674,9 @@ object QueryService extends LazyLogging {
674
674
predicate = querySolution.getResource(queryEdgeID).getURI
675
675
predicateIRI = IRI (predicate)
676
676
tripleString = TripleString (source, predicate, target)
677
- originalKS <- ZIO
678
- .fromOption(biolinkData.predicates.find(p => p.shorthand == " original_knowledge_source " ))
679
- .orElseFail(new Exception (" could not get biolink:original_knowledge_source " ))
677
+ primaryKS <- ZIO
678
+ .fromOption(biolinkData.predicates.find(p => p.shorthand == " primary_knowledge_source " ))
679
+ .orElseFail(new Exception (" could not get biolink:primary_knowledge_source " ))
680
680
aggregatorKS <- ZIO
681
681
.fromOption(biolinkData.predicates.find(p => p.shorthand == " aggregator_knowledge_source" ))
682
682
.orElseFail(new Exception (" could not get biolink:aggregator_knowledge_source" ))
@@ -693,19 +693,19 @@ object QueryService extends LazyLogging {
693
693
Some (appConfig.location),
694
694
None ,
695
695
None )
696
- originalKSstr = provValue match {
696
+ primaryKSstr = provValue match {
697
697
case ctd if provValue.contains(" ctdbase.org" ) => " infores:ctd"
698
698
case _ => " infores:go-cam"
699
699
}
700
- originalKSAttribute = TRAPIAttribute (Some (" infores:cam-kp" ),
701
- originalKS .iri,
702
- None ,
703
- List (originalKSstr ),
704
- Some (infoResBiolinkClass.iri),
705
- Some (provValue),
706
- None ,
707
- None )
708
- attributes = List (aggregatorKSAttribute, originalKSAttribute )
700
+ primaryKSAttribute = TRAPIAttribute (Some (" infores:cam-kp" ),
701
+ primaryKS .iri,
702
+ None ,
703
+ List (primaryKSstr ),
704
+ Some (infoResBiolinkClass.iri),
705
+ Some (provValue),
706
+ None ,
707
+ None )
708
+ attributes = List (aggregatorKSAttribute, primaryKSAttribute )
709
709
relationLabelAndBiolinkPredicate <- ZIO
710
710
.fromOption(relationsMap.get(predicateIRI))
711
711
.orElseFail(new Exception (" Unexpected edge relation" ))
0 commit comments