protected int parsePredicate(int c) throws IOException, RDFParseException { StringBuilder sb = new StringBuilder(100); // predicate must be an uriref (<foo://bar>) if (c == '<') { // predicate is an uriref c = parseUriRef(c, sb); predicate = createURI(sb.toString()); } else if (c == -1) { throwEOFException(); } else { throw new RDFParseException("Expected '<', found: " + new String(Character.toChars(c)), lineNo, c); } return c; }
protected int parsePredicate(int c) throws IOException, RDFParseException { StringBuilder sb = new StringBuilder(100); // predicate must be an uriref (<foo://bar>) if (c == '<') { // predicate is an uriref c = parseUriRef(c, sb); predicate = createURI(sb.toString()); } else if (c == -1) { throwEOFException(); } else { throw new RDFParseException("Expected '<', found: " + new String(Character.toChars(c)), lineNo, c); } return c; }
protected int parseSubject(int c) throws IOException, RDFParseException { StringBuilder sb = new StringBuilder(100); // subject is either an uriref (<foo://bar>) or a nodeID (_:node1) if (c == '<') { // subject is an uriref c = parseUriRef(c, sb); subject = createURI(sb.toString()); } else if (c == '_') { // subject is a bNode c = parseNodeID(c, sb); subject = createNode(sb.toString()); } else if (c == -1) { throwEOFException(); } else { throw new RDFParseException("Expected '<' or '_', found: " + new String(Character.toChars(c)), lineNo, c); } return c; }
protected int parseSubject(int c) throws IOException, RDFParseException { StringBuilder sb = new StringBuilder(100); // subject is either an uriref (<foo://bar>) or a nodeID (_:node1) if (c == '<') { // subject is an uriref c = parseUriRef(c, sb); subject = createURI(sb.toString()); } else if (c == '_') { // subject is a bNode c = parseNodeID(c, sb); subject = createNode(sb.toString()); } else if (c == -1) { throwEOFException(); } else { throw new RDFParseException("Expected '<' or '_', found: " + new String(Character.toChars(c)), lineNo, c); } return c; }
while (c != '>') { if (c == -1) { throwEOFException(); throwEOFException();
while (c != '>') { if (c == -1) { throwEOFException(); throwEOFException();
while (c != '"') { if (c == -1) { throwEOFException(); throwEOFException(); throwEOFException(); throwEOFException();
while (c != '"') { if (c == -1) { throwEOFException(); throwEOFException(); throwEOFException(); throwEOFException();