Codota Logo
NCNameResourceCodec.getLayers
Code IndexAdd Codota to your IDE (free)

How to use
getLayers
method
in
org.geoserver.wcs2_0.util.NCNameResourceCodec

Best Java code snippets using org.geoserver.wcs2_0.util.NCNameResourceCodec.getLayers (Showing top 2 results out of 315)

origin: org.geoserver/gs-wcs2_0

public static LayerInfo getCoverage(Catalog catalog, String encodedCoverageId)
    throws WCS20Exception {
  List<LayerInfo> layers = NCNameResourceCodec.getLayers(catalog, encodedCoverageId);
  if (layers == null) return null;
  LayerInfo ret = null;
  for (LayerInfo layer : layers) {
    if (layer != null && layer.getType() == PublishedType.RASTER) {
      if (ret == null) {
        ret = layer;
      } else {
        LOGGER.warning(
            "Multiple coverages found for NSName '"
                + encodedCoverageId
                + "': "
                + ret.prefixedName()
                + " is selected, "
                + layer.prefixedName()
                + " will be ignored");
      }
    }
  }
  return ret;
}
origin: org.geoserver/gs-wcs2_0

@Test
public void testBasicKVP() throws Exception {
    List<LayerInfo> list0 = NCNameResourceCodec.getLayers(getCatalog(), "pippo_topo");
    assertNotNull(list0);
    assertEquals(0, list0.size());
    List<LayerInfo> list1 = NCNameResourceCodec.getLayers(getCatalog(), "pippo__topo");
    assertNotNull(list1);
    assertEquals(0, list1.size());
    List<LayerInfo> list = NCNameResourceCodec.getLayers(getCatalog(), "wcs__BlueMarble");
    assertNotNull(list);
    assertEquals(1, list.size());
    WorkspaceInfo oldWs = LocalWorkspace.get();
    LocalWorkspace.set(ws);
    List<LayerInfo> list = NCNameResourceCodec.getLayers(getCatalog(), "BlueMarble");
    assertNotNull(list);
    assertEquals(1, list.size());
    List<LayerInfo> list = NCNameResourceCodec.getLayers(getCatalog(), "BlueMarble");
    assertNotNull(list);
    assertEquals(1, list.size());
org.geoserver.wcs2_0.utilNCNameResourceCodecgetLayers

Javadoc

Search in the catalog the Layers matching the encoded id.

Popular methods of NCNameResourceCodec

  • getCoverage
  • encode
  • decode

Popular in Java

  • Running tasks concurrently on multiple threads
  • getApplicationContext (Context)
  • addToBackStack (FragmentTransaction)
  • startActivity (Activity)
  • BigInteger (java.math)
    Immutable arbitrary-precision integers. All operations behave as if BigIntegers were represented in
  • Socket (java.net)
    Provides a client-side TCP socket.
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • JOptionPane (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now