@Test public void testSetFurtherQuery() throws Exception { AlephXServer server = loadDefaultAlephXServer(); Criteria issnCriteria = server.fields.getCriteria("issn", "ISSNVALUE"); URI result = AlephXServer.setQuery(new URI("http: issnCriteria.toUrlParams(), false); assertEquals("http: System.out.println("URI: " + result.toASCIIString()); }
static URI setQuery(URI u, String newQuery, boolean add) throws MalformedURLException { String query = u.getQuery(); query = (query == null || !add) ? newQuery : query + '&' + newQuery; try { return new URI(u.getScheme(), u.getUserInfo(), u.getHost(), u.getPort(), u.getPath(), query, u.getFragment()); } catch (URISyntaxException ex) { MalformedURLException mex = new MalformedURLException(ex.getMessage()); mex.initCause(ex); throw mex; } }
AlephXServer implements BibliographicCatalog { static URI setQuery(URI u, String newQuery, boolean add) throws MalformedURLException { String query = u.getQuery(); query = (query == null || !add) ? newQuery : query + '&' + newQuery; try { return new URI(u.getScheme(), u.getUserInfo(), u.getHost(), u.getPort(), u.getPath(), query, u.getFragment()); } catch (URISyntaxException ex) { MalformedURLException mex = new MalformedURLException(ex.getMessage()); mex.initCause(ex); throw mex; } } }
AlephXServer implements BibliographicCatalog { static URI setQuery(URI u, String newQuery, boolean add) throws MalformedURLException { String query = u.getQuery(); query = (query == null || !add) ? newQuery : query + '&' + newQuery; try { return new URI(u.getScheme(), u.getUserInfo(), u.getHost(), u.getPort(), u.getPath(), query, u.getFragment()); } catch (URISyntaxException ex) { MalformedURLException mex = new MalformedURLException(ex.getMessage()); mex.initCause(ex); throw mex; } } AlephXServer(URI uri);  AlephXServer(String url); }
AlephXServer implements BibliographicCatalog { static URI setQuery(URI u, String newQuery, boolean add) throws MalformedURLException { String query = u.getQuery(); query = (query == null || !add) ? newQuery : query + '&' + newQuery; try { return new URI(u.getScheme(), u.getUserInfo(), u.getHost(), u.getPort(), u.getPath(), query, u.getFragment()); } catch (URISyntaxException ex) { MalformedURLException mex = new MalformedURLException(ex.getMessage()); mex.initCause(ex); throw mex; } } AlephXServer(URI uri);  AlephXServer(String url); static AlephXServer get(CatalogConfiguration c); List<MetadataItem> find(String fieldName, String value); @Override List<MetadataItem> find(String fieldName, String value, Locale locale); List<MetadataItem> createDetailResponse(InputStream is, Locale locale); void setLoadBarcodes(boolean loadBarcodes); }
AlephXServer implements BibliographicCatalog { static URI setQuery(URI u, String newQuery, boolean add) throws MalformedURLException { String query = u.getQuery(); query = (query == null || !add) ? newQuery : query + '&' + newQuery; try { return new URI(u.getScheme(), u.getUserInfo(), u.getHost(), u.getPort(), u.getPath(), query, u.getFragment()); } catch (URISyntaxException ex) { MalformedURLException mex = new MalformedURLException(ex.getMessage()); mex.initCause(ex); throw mex; } } AlephXServer(URI uri);  AlephXServer(String url); static AlephXServer get(CatalogConfiguration c); List<MetadataItem> find(String fieldName, String value); @Override List<MetadataItem> find(String fieldName, String value, Locale locale); List<MetadataItem> createDetailResponse(InputStream is, Locale locale); void setLoadBarcodes(boolean loadBarcodes); static final String TYPE; static final String PROPERTY_FIELD_QUERY; static final String PROPERTY_LOAD_BARCODES; }