@Test public void stringToStatementPattern() { final String patternString = "x:::" + prependConstant("http: prependConstant("http: final StatementPattern statementPattern = FluoStringConverter.toStatementPattern(patternString); final Var subject = new Var("x"); final Var predicate = new Var(prependConstant("http: predicate.setConstant(true); final Var object = new Var(prependConstant("http: object.setConstant(true); final StatementPattern expected = new StatementPattern(subject, predicate, object); assertEquals(expected, statementPattern); }
public static StatementPattern toStatementPattern(final String patternString) { checkNotNull(patternString); final String[] parts = patternString.split(DELIM); final String subjectPart = parts[0]; final String predicatePart = parts[1]; final String objectPart = parts[2]; final Var subject = toVar(subjectPart); final Var predicate = toVar(predicatePart); final Var object = toVar(objectPart); return new StatementPattern(subject, predicate, object); }
FluoStringConverter { public static StatementPattern toStatementPattern(final String patternString) { checkNotNull(patternString); final String[] parts = patternString.split(DELIM); final String subjectPart = parts[0]; final String predicatePart = parts[1]; final String objectPart = parts[2]; final Var subject = toVar(subjectPart); final Var predicate = toVar(predicatePart); final Var object = toVar(objectPart); return new StatementPattern(subject, predicate, object); } }
FluoStringConverter { public static StatementPattern toStatementPattern(final String patternString) { checkNotNull(patternString); final String[] parts = patternString.split(DELIM); final String subjectPart = parts[0]; final String predicatePart = parts[1]; final String objectPart = parts[2]; final Var subject = toVar(subjectPart); final Var predicate = toVar(predicatePart); final Var object = toVar(objectPart); return new StatementPattern(subject, predicate, object); }  }
FluoStringConverter { public static StatementPattern toStatementPattern(final String patternString) { checkNotNull(patternString); final String[] parts = patternString.split(DELIM); final String subjectPart = parts[0]; final String predicatePart = parts[1]; final String objectPart = parts[2]; final Var subject = toVar(subjectPart); final Var predicate = toVar(predicatePart); final Var object = toVar(objectPart); return new StatementPattern(subject, predicate, object); }  static String[] toBindingStrings(final String bindingSetString); static StatementPattern toStatementPattern(final String patternString); static Var toVar(final String varString); static String toStatementPatternString(final StatementPattern sp); }
FluoStringConverter { public static StatementPattern toStatementPattern(final String patternString) { checkNotNull(patternString); final String[] parts = patternString.split(DELIM); final String subjectPart = parts[0]; final String predicatePart = parts[1]; final String objectPart = parts[2]; final Var subject = toVar(subjectPart); final Var predicate = toVar(predicatePart); final Var object = toVar(objectPart); return new StatementPattern(subject, predicate, object); }  static String[] toBindingStrings(final String bindingSetString); static StatementPattern toStatementPattern(final String patternString); static Var toVar(final String varString); static String toStatementPatternString(final StatementPattern sp);  }