Class NamespaceController

java.lang.Object
gov.niem.tools.api.db.namespace.NamespaceController

@Validated @RestController @RequestMapping("/stewards/{stewardKey}/models/{modelKey}/versions/{versionNumber}") public class NamespaceController extends Object
REST controller for namespaces.
  • Constructor Details

    • NamespaceController

      public NamespaceController()
  • Method Details

    • getNamespace

      @GetMapping("/namespaces/{prefix}") @ResponseStatus(code=OK) public Namespace getNamespace(@PathVariable String stewardKey, @PathVariable String modelKey, @PathVariable String versionNumber, @PathVariable String prefix) throws Exception
      Get a namespace with the given fields.
      Throws:
      Exception
      Example:
      http://tools.niem.gov/api/v2/stewards/niem/models/model/versions/5.2/namespaces/nc
    • getNamespaceCmf

      @GetMapping("/namespaces.cmf/{prefix}") @ResponseStatus(code=OK) public Object getNamespaceCmf(@PathVariable String stewardKey, @PathVariable String modelKey, @PathVariable String versionNumber, @PathVariable String prefix, @RequestParam(required=false,defaultValue="json") Config.AppMediaType mediaType) throws Exception
      Get a namespace in CMF with the given fields.
      Throws:
      Exception
      Example:
      http://tools.niem.gov/api/v2/stewards/niem/models/model/versions/5.2/namespaces.cmf/nc
    • getVersionNamespaces

      @GetMapping("/namespaces") @ResponseStatus(code=OK) public List<Namespace> getVersionNamespaces(@PathVariable String stewardKey, @PathVariable String modelKey, @PathVariable String versionNumber) throws Exception
      Get all namespaces from a version of a model.
      Throws:
      Exception
      Example:
      http://tools.niem.gov/api/v2/stewards/niem/models/model/versions/5.2/namespaces
    • getVersionNamespacesCmf

      @GetMapping("/namespaces.cmf") @ResponseStatus(code=OK) public Object getVersionNamespacesCmf(@PathVariable String stewardKey, @PathVariable String modelKey, @PathVariable String versionNumber, @RequestParam(required=false,defaultValue="json") Config.AppMediaType mediaType) throws Exception
      Get all namespaces as CMF from a version of a model.
      Throws:
      Exception
      Example:
      http://tools.niem.gov/api/v2/stewards/niem/models/model/versions/5.2/namespaces.cmf
    • getNamespaceTypes

      @GetMapping("/namespaces/{prefix}/types") @ResponseStatus(code=OK) public List<Type> getNamespaceTypes(@PathVariable String stewardKey, @PathVariable String modelKey, @PathVariable String versionNumber, @PathVariable String prefix) throws Exception
      Gets all types from a namespace.
      Throws:
      Exception
    • getNamespaceTypesCmf

      @GetMapping("/namespaces.cmf/{prefix}/types") @ResponseStatus(code=OK) public Object getNamespaceTypesCmf(@PathVariable String stewardKey, @PathVariable String modelKey, @PathVariable String versionNumber, @PathVariable String prefix, @RequestParam(required=false,defaultValue="json") Config.AppMediaType mediaType) throws Exception
      Gets all types in CMF from a namespace.
      Throws:
      Exception
    • getNamespaceProperties

      @GetMapping("/namespaces/{prefix}/properties") @ResponseStatus(code=OK) public List<Property> getNamespaceProperties(@PathVariable String stewardKey, @PathVariable String modelKey, @PathVariable String versionNumber, @PathVariable String prefix) throws Exception
      Gets all properties from a namespace.
      Throws:
      Exception
    • getNamespacePropertiesCmf

      @GetMapping("/namespaces.cmf/{prefix}/properties") @ResponseStatus(code=OK) public Object getNamespacePropertiesCmf(@PathVariable String stewardKey, @PathVariable String modelKey, @PathVariable String versionNumber, @PathVariable String prefix, @RequestParam(required=false,defaultValue="json") Config.AppMediaType mediaType) throws Exception
      Gets all properties from a namespace in CMF.
      Throws:
      Exception