public void addSchema ( String schemaURL ) { try { schemaURL = URLDecoder . decode ( schemaURL , "UTF-8" ) ; } catch ( final UnsupportedEncodingException e ) { e . printStackTrace ( ) ; System . exit ( - 1 ) ; } assert ( m_schemas . contains ( schemaURL ) == false ) ; final File schemaFile = new File ( schemaURL ) ; assert ( schemaFile != null ) ; assert ( schemaFile . isDirectory ( ) == false ) ; // this check below fails in some valid cases (like when the file is in a jar) //assert schemaFile.canRead() // : "can't read file: " + schemaPath; m_schemas . add ( schemaURL ) ; }
Add a schema based on a URL .