// This is a duplicate with TripleParserImpl - but it will stop being a duplicate when all the features of N3 are
// implemented (such as blank nodes, short hand for predicates, etc).
public Triple parseTriple(final CharSequence line) {
try {
final RegexMatcher regexMatcher = regexMatcherFactory.createMatcher(TRIPLE_REGEX, line);
if (regexMatcher.matches()) {
final RegexMatcher matcher1 = tripleParser.createMatcher(regexMatcher, SUBJECT_REGEX, SUBJECT_GROUP);
final RegexMatcher matcher2 = tripleParser.createMatcher(regexMatcher, PREDICATE_REGEX,
PREDICATE_GROUP);
final RegexMatcher matcher3 = tripleParser.createMatcher(regexMatcher, OBJECT_REGEX, OBJECT_GROUP);
return tripleParser.parseTripleLine(matcher1, matcher2, matcher3);
}
return null;
} catch (ParseException e) {
throw new RuntimeException(e);