public String getType() { return delegate.getType(); }
/** * Returns the format for a coverage. * * <p>The format is inferred from {@link CoverageStoreInfo#getType()} * * @param info The coverage metadata. * @return The format, or null. */ @SuppressWarnings("deprecation") public AbstractGridFormat getGridCoverageFormat(CoverageStoreInfo info) { final int length = CoverageStoreUtils.formats.length; for (int i = 0; i < length; i++) { if (CoverageStoreUtils.formats[i].getName().equals(info.getType())) { return (AbstractGridFormat) CoverageStoreUtils.formats[i]; } } return null; }
throw new IOException("Could not find the raster plugin for format " + info.getType());
target.setEnabled(source.isEnabled()); target.setName(source.getName()); target.setType(source.getType()); target.setWorkspace(source.getWorkspace());
final File covFile = new File(covDir, filename); expect(cs.getURL()).andReturn(URLs.fileToUrl(covFile).toString()).anyTimes(); expect(cs.getType()) .andAnswer( new IAnswer<String>() {
@Override public boolean canHandle(Object item) { if (item instanceof CoverageStoreInfo && ((CoverageStoreInfo) item).getType().equals(COVERAGE_TYPE)) { return true; } return false; }
@Override public boolean canHandle(Object item) { if (item instanceof CoverageStoreInfo && ((CoverageStoreInfo) item).getType().equals(COVERAGE_TYPE)) { return true; } return false; }
throws IllegalArgumentException { if (null == info.getType()) { throw new IllegalArgumentException("Coverage type has not been set");
throws IllegalArgumentException { if (null == info.getType()) { throw new IllegalArgumentException("Coverage type has not been set");
@Override public void visit(CoverageStoreInfo coverageStore) { CoverageStoreInfo otherCoverageStore = otherCatalog.getCoverageStore(coverageStore.getId()); if (!(Objects.equals(coverageStore, otherCoverageStore) && Objects.equals(coverageStore.getType(), otherCoverageStore.getType()) && Objects.equals(coverageStore.getFormat(), otherCoverageStore.getFormat()) && Objects.equals(coverageStore.getURL(), otherCoverageStore.getURL()) && checkEquals(coverageStore.getMetadata(), otherCoverageStore.getMetadata()) && checkEquals( coverageStore.getConnectionParameters(), otherCoverageStore.getConnectionParameters()))) { differences.add(new InfoDiff(coverageStore, otherCoverageStore)); } }
protected void clone(final CoverageStoreInfo source, CoverageStoreInfo target) { target.setDescription(source.getDescription()); target.setEnabled(source.isEnabled()); target.setName(source.getName()); target.setType(source.getType()); target.setURL(source.getURL()); target.setWorkspace(source.getWorkspace()); }
@Test public void testStoreCreation() throws URISyntaxException { CoverageStoreInfo store = builder.createEoMosaicStore(ws, "EO-store", getUrl("EO_Airmass")); try { assertNotNull(store); assertEquals(ws, store.getWorkspace()); assertEquals("EO-store", store.getName()); assertEquals("ImageMosaic", store.getType()); store = catalog.getStoreByName("EO-store", CoverageStoreInfo.class); assertNotNull(store); assertEquals(ws, store.getWorkspace()); assertEquals("EO-store", store.getName()); assertEquals("ImageMosaic", store.getType()); } finally { catalog.remove(store); } }
@Test public void testPut2() throws Exception { Document dom = getAsDOM( RestBaseController.ROOT_PATH + "/workspaces/wcs/coveragestores/BlueMarble.xml"); assertXpathEvaluatesTo("GeoTIFF", "/coverageStore/type", dom); String xml = "<coverageStore>" + "<name>BlueMarble</name>" + "<type>WorldImage</type>" + "</coverageStore>"; MockHttpServletResponse response = putAsServletResponse( RestBaseController.ROOT_PATH + "/workspaces/wcs/coveragestores/BlueMarble", xml, "text/xml"); assertEquals(200, response.getStatus()); CoverageStoreInfo cs = catalog.getCoverageStoreByName("wcs", "BlueMarble"); assertEquals("WorldImage", cs.getType()); }