Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fpriyatna committed Sep 17, 2019
1 parent dc56341 commit 9709a7c
Showing 1 changed file with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,22 @@ abstract class MorphBaseAlphaGenerator(md:MorphBaseMappingDocument,unfolder:Morp
if(!processableTriplePattern) { None }
else {
val alphaTP = new MorphAlphaResultUnion();
for(pm <- pms) {
val tpPredicateURI = pm.getMappedPredicateName(0);
val alphaPredicateObjectAux : Option[MorphAlphaResultPredicateObject] = calculateAlphaPredicateObject(
tp, cm, tpPredicateURI, alphaSubject);
val alphaPredicateObjects:List[MorphAlphaResultPredicateObject] = if(alphaPredicateObjectAux.isEmpty) { Nil }
else {alphaPredicateObjectAux.toList};

val alphaResult = new MorphAlphaResult(alphaSubject, alphaPredicateObjects);
if(pms == null || pms.size == 0) {
val alphaResult = new MorphAlphaResult(alphaSubject, Nil);
alphaTP.add(alphaResult);
} else {
for(pm <- pms) {
val tpPredicateURI = pm.getMappedPredicateName(0);
val alphaPredicateObjectAux : Option[MorphAlphaResultPredicateObject] = calculateAlphaPredicateObject(
tp, cm, tpPredicateURI, alphaSubject);
val alphaPredicateObjects:List[MorphAlphaResultPredicateObject] = if(alphaPredicateObjectAux.isEmpty) { Nil }
else {alphaPredicateObjectAux.toList};

val alphaResult = new MorphAlphaResult(alphaSubject, alphaPredicateObjects);
alphaTP.add(alphaResult);
}
}

Some(alphaTP)
}
});
Expand Down

0 comments on commit 9709a7c

Please sign in to comment.