Code example for URI

Methods: isAbsolute

0
    private void checkResourceURI(String resourceURI, String relName)
            throws SAXException { 
 
        URI uri;
        try { 
            uri = new URI(resourceURI);
        } catch (Exception e) {
            throw new SAXException("RelsExtValidator:"
                    + "Error in relationship '" + relName + "'."
                    + " The RDF 'resource' is not a valid URI."); 
        } 
 
        if (!uri.isAbsolute()) {
            throw new SAXException("RelsValidator:" + "Error in relationship '"
                    + relName + "'."
                    + " The specified RDF 'resource' is not an absolute URI."); 
        } 
    } 
 
    /** 
     * checkTypedValue: ensure that the datatype of a literal is one of the