public static Resource parseResource(String nTriplesResource,ValueFactory valueFactory) throws IllegalArgumentException {
  if (nTriplesResource.startsWith("<")) {
    return parseURI(nTriplesResource,valueFactory);
  }
 else   if (nTriplesResource.startsWith("_:")) {
    return parseBNode(nTriplesResource,valueFactory);
  }
 else {
    throw new IllegalArgumentException("Not a legal N-Triples resource: " + nTriplesResource);
  }
}

public static Resource parseResource ( String nTriplesResource , ValueFactory valueFactory ) throws IllegalArgumentException { if ( nTriplesResource . startsWith ( "<" ) ) { return parseURI ( nTriplesResource , valueFactory ) ; } else if ( nTriplesResource . startsWith ( "_:" ) ) { return parseBNode ( nTriplesResource , valueFactory ) ; } else { throw new IllegalArgumentException ( "Not a legal N-Triples resource: " + nTriplesResource ) ; } }
parses an n - triples resource , creates an object for it using the supplied valuefactory and returns this object .
