Move tag handling out into graph.Tagger
This commit is contained in:
parent
0238332ca3
commit
1604dca737
28 changed files with 315 additions and 159 deletions
|
|
@ -135,7 +135,7 @@ func buildInOutIterator(obj *otto.Object, ts graph.TripleStore, base graph.Itera
|
|||
tags = makeListOfStringsFromArrayValue(one.Object())
|
||||
}
|
||||
for _, tag := range tags {
|
||||
predicateNodeIterator.AddTag(tag)
|
||||
predicateNodeIterator.Tagger().Add(tag)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -179,7 +179,7 @@ func buildIteratorTreeHelper(obj *otto.Object, ts graph.TripleStore, base graph.
|
|||
case "tag":
|
||||
it = subIt
|
||||
for _, tag := range stringArgs {
|
||||
it.AddTag(tag)
|
||||
it.Tagger().Add(tag)
|
||||
}
|
||||
case "save":
|
||||
all := ts.NodesAllIterator()
|
||||
|
|
@ -187,9 +187,9 @@ func buildIteratorTreeHelper(obj *otto.Object, ts graph.TripleStore, base graph.
|
|||
return iterator.NewNull()
|
||||
}
|
||||
if len(stringArgs) == 2 {
|
||||
all.AddTag(stringArgs[1])
|
||||
all.Tagger().Add(stringArgs[1])
|
||||
} else {
|
||||
all.AddTag(stringArgs[0])
|
||||
all.Tagger().Add(stringArgs[0])
|
||||
}
|
||||
predFixed := ts.FixedIterator()
|
||||
predFixed.Add(ts.ValueOf(stringArgs[0]))
|
||||
|
|
@ -207,9 +207,9 @@ func buildIteratorTreeHelper(obj *otto.Object, ts graph.TripleStore, base graph.
|
|||
return iterator.NewNull()
|
||||
}
|
||||
if len(stringArgs) == 2 {
|
||||
all.AddTag(stringArgs[1])
|
||||
all.Tagger().Add(stringArgs[1])
|
||||
} else {
|
||||
all.AddTag(stringArgs[0])
|
||||
all.Tagger().Add(stringArgs[0])
|
||||
}
|
||||
predFixed := ts.FixedIterator()
|
||||
predFixed.Add(ts.ValueOf(stringArgs[0]))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue