public void addNamedModel(String uri, Model model) throws LabelExistsException { if (containsNamedModel(uri)) { throw new LabelExistsException(uri + " already exists."); } getNamedModel(uri).add(model); }
{ throw new CmdException(ex.getMessage()) ; } catch (JenaException ex) { throw ex ; }
protected void addGraphs(Dataset ds) { try { if ( dataURLs != null ) { for ( String url : dataURLs ) RDFDataMgr.read(ds, url) ; } if ( (graphURLs != null) || (namedGraphURLs != null) ) ds = DatasetUtils.addInGraphs(ds, graphURLs, namedGraphURLs, fileManager, null) ; } catch (LabelExistsException ex) { throw new CmdException(ex.getMessage()) ; } catch (JenaException ex) { throw ex ; } catch (Exception ex) { throw new CmdException("Error creating dataset", ex) ; } }