Package gov.niem.tools.api.db.facet
Class FacetController
java.lang.Object
gov.niem.tools.api.db.facet.FacetController
@RestController
@RequestMapping("stewards/{stewardKey}/models/{modelKey}/versions/{versionNumber}")
public class FacetController
extends Object
REST controller for facet information.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFacet
(String stewardKey, String modelKey, String versionNumber, String qname, Facet.Category category, String value) Gets a facet with the given criteria.getFacetCmf
(String stewardKey, String modelKey, String versionNumber, String qname, Facet.Category category, String value, Config.AppMediaType mediaType) Gets a facet in CMF with the given criteria.Gets all facets from the type with the given criteria.getFacetsCmf
(String stewardKey, String modelKey, String versionNumber, String qname, Config.AppMediaType mediaType) Gets all facets in CMF from the type with the given criteria.
-
Constructor Details
-
FacetController
public FacetController()
-
-
Method Details
-
getFacet
@GetMapping("/types/{qname}/facets/{category}={value}") public Facet getFacet(@PathVariable String stewardKey, @PathVariable String modelKey, @PathVariable String versionNumber, @PathVariable String qname, @PathVariable Facet.Category category, @PathVariable String value) Gets a facet with the given criteria. -
getFacetCmf
@GetMapping("/types.cmf/{qname}/facets/{category}={value}") public Object getFacetCmf(@PathVariable String stewardKey, @PathVariable String modelKey, @PathVariable String versionNumber, @PathVariable String qname, @PathVariable Facet.Category category, @PathVariable String value, @RequestParam(required=false,defaultValue="json") Config.AppMediaType mediaType) throws Exception Gets a facet in CMF with the given criteria.- Throws:
Exception
-
getFacets
@GetMapping("/types/{qname}/facets") public Set<Facet> getFacets(@PathVariable String stewardKey, @PathVariable String modelKey, @PathVariable String versionNumber, @PathVariable String qname) Gets all facets from the type with the given criteria. -
getFacetsCmf
@GetMapping("/types.cmf/{qname}/facets") public Object getFacetsCmf(@PathVariable String stewardKey, @PathVariable String modelKey, @PathVariable String versionNumber, @PathVariable String qname, @RequestParam(required=false,defaultValue="json") Config.AppMediaType mediaType) throws Exception Gets all facets in CMF from the type with the given criteria.- Throws:
Exception
-