test_class.declarator: geoServer
test_class.modifier: @Mock
test_class.original_string: @Mock
      GeoServer geoServer;
test_class.type: GeoServer
test_class.var_name: geoServer
test_class.declarator: ctrl
test_class.modifier: @InjectMocks
test_class.original_string: @InjectMocks
      FormatController ctrl;
test_class.type: FormatController
test_class.var_name: ctrl
test_class.file: geoserver/webapp/api-composer/src/test/java/com/boundlessgeo/geoserver/api/controllers/FormatControllerTest.java
test_class.identifier: FormatControllerTest
test_case.body: @Test
      public void testGet() {
          ctrl = new FormatController(geoServer);
  
          JSONObj obj = ctrl.get("shapefile");
          assertEquals("shapefile", obj.get("name"));
          assertEquals("vector", obj.get("kind"));
          assertEquals("file", obj.get("type"));
  
          obj = ctrl.get("h2");
          assertEquals("h2", obj.get("name"));
          assertEquals("vector", obj.get("kind"));
          assertEquals("database", obj.get("type"));
  
          obj = ctrl.get("geotiff");
          assertEquals("geotiff", obj.get("name"));
          assertEquals("raster", obj.get("kind"));
          assertEquals("file", obj.get("type"));
  
          obj = ctrl.get("wms");
          assertEquals("wms", obj.get("name"));
          assertEquals("service", obj.get("kind"));
  
          try {
              ctrl.get("foo");
              fail();
          }
          catch(NotFoundException e) {
          }
      }
test_case.class_method_signature: FormatControllerTest.testGet()
test_case.full_signature: @Test public void testGet()
test_case.identifier: testGet
test_case.invocations: get assertEquals get assertEquals get assertEquals get get assertEquals get assertEquals get assertEquals get get assertEquals get assertEquals get assertEquals get get assertEquals get assertEquals get get fail
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGet()
focal_class.declarator: LOG = Logging.getLogger(FormatController.class)
focal_class.modifier: static
focal_class.original_string: static Logger LOG = Logging.getLogger(FormatController.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.file: geoserver/webapp/api-composer/src/main/java/com/boundlessgeo/geoserver/api/controllers/FormatController.java
focal_class.identifier: FormatController
focal_class.class_method_signature: FormatController.FormatController(GeoServer geoServer)
focal_class.full_signature: @Autowired public  FormatController(GeoServer geoServer)
focal_class.identifier: FormatController
focal_class.modifiers: @Autowired public
focal_class.parameters: (GeoServer geoServer)
focal_class.signature:  FormatController(GeoServer geoServer)
focal_class.class_method_signature: FormatController.list()
focal_class.full_signature: @RequestMapping(method = RequestMethod.GET) public @ResponseBody JSONArr list()
focal_class.identifier: list
focal_class.modifiers: @RequestMapping(method = RequestMethod.GET) public @ResponseBody
focal_class.parameters: ()
focal_class.return: JSONArr
focal_class.signature: JSONArr list()
focal_class.class_method_signature: FormatController.get(@PathVariable String name)
focal_class.full_signature: @RequestMapping(value = "/{name}", method = RequestMethod.GET) public @ResponseBody JSONObj get(@PathVariable String name)
focal_class.identifier: get
focal_class.modifiers: @RequestMapping(value = "/{name}", method = RequestMethod.GET) public @ResponseBody
focal_class.parameters: (@PathVariable String name)
focal_class.return: JSONObj
focal_class.signature: JSONObj get(@PathVariable String name)
focal_class.class_method_signature: FormatController.encode(JSONObj obj, DataFormat<?> format)
focal_class.full_signature:  JSONObj encode(JSONObj obj, DataFormat<?> format)
focal_class.identifier: encode
focal_class.parameters: (JSONObj obj, DataFormat<?> format)
focal_class.return: JSONObj
focal_class.signature: JSONObj encode(JSONObj obj, DataFormat<?> format)
focal_class.class_method_signature: FormatController.findRasterFormat(String name)
focal_class.full_signature: private DataFormat<Format> findRasterFormat(String name)
focal_class.identifier: findRasterFormat
focal_class.modifiers: private
focal_class.parameters: (String name)
focal_class.return: DataFormat<Format>
focal_class.signature: DataFormat<Format> findRasterFormat(String name)
focal_class.class_method_signature: FormatController.findVectorFormat(String name)
focal_class.full_signature: private DataFormat<DataAccessFactory> findVectorFormat(String name)
focal_class.identifier: findVectorFormat
focal_class.modifiers: private
focal_class.parameters: (String name)
focal_class.return: DataFormat<DataAccessFactory>
focal_class.signature: DataFormat<DataAccessFactory> findVectorFormat(String name)
focal_class.class_method_signature: FormatController.findServiceFormat(String name)
focal_class.full_signature: private DataFormat<Class<?>> findServiceFormat(String name)
focal_class.identifier: findServiceFormat
focal_class.modifiers: private
focal_class.parameters: (String name)
focal_class.return: DataFormat<Class<?>>
focal_class.signature: DataFormat<Class<?>> findServiceFormat(String name)
focal_class.class_method_signature: FormatController.formatName(String displayName)
focal_class.full_signature: static String formatName(String displayName)
focal_class.identifier: formatName
focal_class.modifiers: static
focal_class.parameters: (String displayName)
focal_class.return: String
focal_class.signature: String formatName(String displayName)
focal_class.class_method_signature: FormatController.formats()
focal_class.full_signature:  Iterable<DataFormat> formats()
focal_class.identifier: formats
focal_class.parameters: ()
focal_class.return: Iterable<DataFormat>
focal_class.signature: Iterable<DataFormat> formats()
focal_class.class_method_signature: FormatController.vectorFormats()
focal_class.full_signature:  Iterable<DataFormat> vectorFormats()
focal_class.identifier: vectorFormats
focal_class.parameters: ()
focal_class.return: Iterable<DataFormat>
focal_class.signature: Iterable<DataFormat> vectorFormats()
focal_class.class_method_signature: FormatController.rasterFormats()
focal_class.full_signature:  Iterable<DataFormat> rasterFormats()
focal_class.identifier: rasterFormats
focal_class.parameters: ()
focal_class.return: Iterable<DataFormat>
focal_class.signature: Iterable<DataFormat> rasterFormats()
focal_class.class_method_signature: FormatController.serviceFormats()
focal_class.full_signature:  Iterable<DataFormat<Class<?>>> serviceFormats()
focal_class.identifier: serviceFormats
focal_class.parameters: ()
focal_class.return: Iterable<DataFormat<Class<?>>>
focal_class.signature: Iterable<DataFormat<Class<?>>> serviceFormats()
focal_class.class_method_signature: FormatController.format(DataAccessFactory f)
focal_class.full_signature:  DataFormat<DataAccessFactory> format(DataAccessFactory f)
focal_class.identifier: format
focal_class.parameters: (DataAccessFactory f)
focal_class.return: DataFormat<DataAccessFactory>
focal_class.signature: DataFormat<DataAccessFactory> format(DataAccessFactory f)
focal_class.class_method_signature: FormatController.format(Format g)
focal_class.full_signature:  DataFormat<Format> format(Format g)
focal_class.identifier: format
focal_class.parameters: (Format g)
focal_class.return: DataFormat<Format>
focal_class.signature: DataFormat<Format> format(Format g)
focal_class.class_method_signature: FormatController.format(Class<WebMapServer> clazz)
focal_class.full_signature:  DataFormat<Class<?>> format(Class<WebMapServer> clazz)
focal_class.identifier: format
focal_class.parameters: (Class<WebMapServer> clazz)
focal_class.return: DataFormat<Class<?>>
focal_class.signature: DataFormat<Class<?>> format(Class<WebMapServer> clazz)
focal_class.superclass: extends ApiController
focal_method.body: @RequestMapping(value = "/{name}", method = RequestMethod.GET)
      public @ResponseBody
      JSONObj get(@PathVariable String name) {
          DataFormat<DataAccessFactory> f = findVectorFormat(name);
          if( f != null ){
              JSONObj obj = encode(new JSONObj(), f);
              JSONObj params = obj.putObject("params");
              for(Param p : f.real.getParametersInfo()){
                  IO.param(params, p);
              }
              return obj;
          }
  
          DataFormat<Format> g = findRasterFormat(name);
          if( g != null ){
              JSONObj obj = encode(new JSONObj(), g);
  
              obj.put("vendor", g.real.getVendor())
                 .put("version", g.real.getVersion());
  
              JSONArr connection = obj.putArray("params");
              IO.param(connection.addObject(), g.real);
  
              return obj;
          }
  
          DataFormat<Class<?>> s = findServiceFormat(name);
          if ( s != null) {
              JSONObj obj = encode(new JSONObj(), s);
  
              obj.putArray("params").addObject()
                  .put("name","wms")
                  .put("title","URL")
                  .put("description","GetCapabilities URL for WMS Service")
                  .put("type",URL.class.getSimpleName())
                  .put("default",null)
                  .put("level","user")
                  .put("required",true);
              return obj;
          }
  
          throw new NotFoundException("Unrecognized format: " + name);
      }
focal_method.class_method_signature: FormatController.get(@PathVariable String name)
focal_method.full_signature: @RequestMapping(value = "/{name}", method = RequestMethod.GET) public @ResponseBody JSONObj get(@PathVariable String name)
focal_method.identifier: get
focal_method.invocations: findVectorFormat encode putObject getParametersInfo param findRasterFormat encode put put getVendor getVersion putArray param addObject findServiceFormat encode put put put put put put put addObject putArray getSimpleName
focal_method.modifiers: @RequestMapping(value = "/{name}", method = RequestMethod.GET) public @ResponseBody
focal_method.parameters: (@PathVariable String name)
focal_method.return: JSONObj
focal_method.signature: JSONObj get(@PathVariable String name)