* URI.
*/
public static void process(ASTQueryContainer qc, String externalBaseURI)
throws MalformedQueryException
{
ParsedURI parsedBaseURI = null;
// Use the query model's own base URI, if available
ASTBaseDecl baseDecl = qc.getBaseDecl();
if (baseDecl != null) {
parsedBaseURI = new ParsedURI(baseDecl.getIRI());
if (!parsedBaseURI.isAbsolute()) {
throw new MalformedQueryException("BASE IRI is not an absolute IRI: " + externalBaseURI);
}
}
else if (externalBaseURI != null) {
// Use external base URI if the query doesn't contain one itself
parsedBaseURI = new ParsedURI(externalBaseURI);
if (!parsedBaseURI.isAbsolute()) {
throw new IllegalArgumentException("Supplied base URI is not an absolute IRI: " + externalBaseURI);
}
}
else {
// FIXME: use the "Default Base URI"?