if ( fieldName.equals(HttpNames.paramGraph) )
{
graphName = value ;
if ( graphName != null && ! graphName.equals(HttpNames.valueDefault) )
{
IRI iri = IRIResolver.parseIRI(value) ;
if ( iri.hasViolation(false) )
errorBadRequest("Bad IRI: "+graphName) ;
if ( iri.getScheme() == null )
errorBadRequest("Bad IRI: no IRI scheme name: "+graphName) ;
if ( iri.getScheme().equalsIgnoreCase("http") || iri.getScheme().equalsIgnoreCase("https"))
{
// Redundant??
if ( iri.getRawHost() == null )
errorBadRequest("Bad IRI: no host name: "+graphName) ;
if ( iri.getRawPath() == null || iri.getRawPath().length() == 0 )
errorBadRequest("Bad IRI: no path: "+graphName) ;
if ( iri.getRawPath().charAt(0) != '/' )
errorBadRequest("Bad IRI: Path does not start '/': "+graphName) ;
}
gn = Node.createURI(graphName) ;
}
}