use of org.apache.jena.atlas.lib.NotImplemented in project jena by apache.
the class IteratorStreamRDFText method line2row.
private StreamRowRDF line2row(List<Token> line) {
if (line.size() != 3 && line.size() != 4)
throw new RiotException("Input line is not 3 or 4 items long");
Node[] tuple = new Node[line.size()];
int idx = 0;
for (Token token : line) {
Node n = null;
if ((token.isWord() && token.getImage().equals("R"))) //|| ( token.isCtlCode() && token.getCntrlCode() == -1 ) // *
{
if (previousTuple == null)
throw new RiotException("Repeat without previous data row");
if (idx >= previousTuple.length)
throw new RiotException("Repeat position beyond previous data row");
n = previousTuple[idx];
} else if (token.isNode()) {
n = asNode(token);
}
if (n == null)
throw new RiotException("Unrecognized token : " + token);
tuple[idx] = n;
idx++;
}
previousTuple = tuple;
// Needs rethink.
throw new NotImplemented();
// if ( line.size() == 3 )
// return new StreamRowRDFBase(Triple.create(tuple[0], tuple[1], tuple[2])) ;
// else
// return new StreamRowRDFBase(Quad.create(tuple[0], tuple[1], tuple[2], tuple[3])) ;
// return new StreamRowRDFBase(Tuple.create(tuple)) ;
}
Aggregations