Class SubpropertyController
java.lang.Object
gov.niem.tools.api.db.subproperty.SubpropertyController
@RestController
@RequestMapping("stewards/{stewardKey}/models/{modelKey}/versions/{versionNumber}")
public class SubpropertyController
extends Object
REST controller for subproperties.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongcountNamespaceSubproperties(String stewardKey, String modelKey, String versionNumber, String prefix) Count all subproperties in a namespace with the given fields.longcountPropertySubproperties(String stewardKey, String modelKey, String versionNumber, String qname) Count all subproperty occurrences for a property with the given fields.longcountTypeSubproperties(String stewardKey, String modelKey, String versionNumber, String qname) Count all subproperties of a type with the given fields.longcountVersionSubproperties(String stewardKey, String modelKey, String versionNumber) Count all subproperties in a version with the given fields.getAllSubproperties(String stewardKey, String modelKey, String versionNumber) Gets all subproperties from the database in the version with the given fields.getCurrent(String stewardKey, String modelKey, String versionNumber, String typeQname, String propertyQname) Get the next current of the subproperty with the given fields.getHistory(String stewardKey, String modelKey, String versionNumber, String typeQname, String propertyQname, boolean includePreRelease) Get the history of the subproperty with the given fields.getNamespaceSubproperties(String stewardKey, String modelKey, String versionNumber, String prefix) Gets all subproperties from the database in the given namespace fields.getNext(String stewardKey, String modelKey, String versionNumber, String typeQname, String propertyQname, boolean includePreRelease) Get the next version of the subproperty with the given fields.getPrev(String stewardKey, String modelKey, String versionNumber, String typeQname, String propertyQname, boolean includePreRelease) Get the previous version of the subproperty with the given fields.getPropertySubproperties(String stewardKey, String modelKey, String versionNumber, String propertyQname) Gets all subproperties from the database with the property with the given fields.getSubproperty(String stewardKey, String modelKey, String versionNumber, String typeQname, String propertyQname) Gets a subproperty from the database with the type with the given type fields and the property with the given qualified name.getSubpropertyCmf(String stewardKey, String modelKey, String versionNumber, String typeQname, String propertyQname, Config.AppMediaType mediaType) Gets a subproperty from the database with the type with the given type fields and the property with the given qualified name, converted to CMF.getTypeSubproperties(String stewardKey, String modelKey, String versionNumber, String typeQname) Gets all subproperties from the database in the type with the give fields.getTypeSubpropertiesCmf(String stewardKey, String modelKey, String versionNumber, String typeQname, Config.AppMediaType mediaType) Gets all subproperties from the database in the type with the given fields, in CMF.
-
Constructor Details
-
SubpropertyController
public SubpropertyController()
-
-
Method Details
-
getSubproperty
@GetMapping("/types/{typeQname}/subproperties/{propertyQname}") public Subproperty getSubproperty(@PathVariable String stewardKey, @PathVariable String modelKey, @PathVariable String versionNumber, @PathVariable String typeQname, @PathVariable String propertyQname) throws Exception Gets a subproperty from the database with the type with the given type fields and the property with the given qualified name.- Throws:
Exception
-
getSubpropertyCmf
@GetMapping("/types/{typeQname}/subproperties/{propertyQname}/formats/cmf") public Object getSubpropertyCmf(@PathVariable String stewardKey, @PathVariable String modelKey, @PathVariable String versionNumber, @PathVariable String typeQname, @PathVariable String propertyQname, @RequestParam(required=false,defaultValue="json") Config.AppMediaType mediaType) throws Exception Gets a subproperty from the database with the type with the given type fields and the property with the given qualified name, converted to CMF.- Throws:
Exception
-
getAllSubproperties
@GetMapping("/subproperties") public Set<Subproperty> getAllSubproperties(@PathVariable String stewardKey, @PathVariable String modelKey, @PathVariable String versionNumber) throws Exception Gets all subproperties from the database in the version with the given fields.- Throws:
Exception
-
getTypeSubproperties
@GetMapping("/types/{typeQname}/subproperties") public Set<Subproperty> getTypeSubproperties(@PathVariable String stewardKey, @PathVariable String modelKey, @PathVariable String versionNumber, @PathVariable String typeQname) throws Exception Gets all subproperties from the database in the type with the give fields.- Throws:
Exception
-
getTypeSubpropertiesCmf
@GetMapping("/types/{typeQname}/subproperties/formats/cmf") public Object getTypeSubpropertiesCmf(@PathVariable String stewardKey, @PathVariable String modelKey, @PathVariable String versionNumber, @PathVariable String typeQname, @RequestParam(required=false,defaultValue="json") Config.AppMediaType mediaType) throws Exception Gets all subproperties from the database in the type with the given fields, in CMF.- Throws:
Exception
-
getPropertySubproperties
@GetMapping("/properties/{propertyQname}/subproperties") public Set<Subproperty> getPropertySubproperties(@PathVariable String stewardKey, @PathVariable String modelKey, @PathVariable String versionNumber, @PathVariable String propertyQname) throws Exception Gets all subproperties from the database with the property with the given fields.- Throws:
Exception
-
getNamespaceSubproperties
@GetMapping("/namespaces/{prefix}/subproperties") public Set<Subproperty> getNamespaceSubproperties(@PathVariable String stewardKey, @PathVariable String modelKey, @PathVariable String versionNumber, @PathVariable String prefix) throws Exception Gets all subproperties from the database in the given namespace fields.- Throws:
Exception
-
countVersionSubproperties
@GetMapping("/subproperties/count") public long countVersionSubproperties(@PathVariable String stewardKey, @PathVariable String modelKey, @PathVariable String versionNumber) throws Exception Count all subproperties in a version with the given fields.- Throws:
Exception
-
countNamespaceSubproperties
@GetMapping("/namespaces/{prefix}/subproperties/count") public long countNamespaceSubproperties(@PathVariable String stewardKey, @PathVariable String modelKey, @PathVariable String versionNumber, @PathVariable String prefix) throws Exception Count all subproperties in a namespace with the given fields.- Throws:
Exception
-
countPropertySubproperties
@GetMapping("/properties/{qname}/subproperties/count") public long countPropertySubproperties(@PathVariable String stewardKey, @PathVariable String modelKey, @PathVariable String versionNumber, @PathVariable String qname) throws Exception Count all subproperty occurrences for a property with the given fields.- Throws:
Exception
-
countTypeSubproperties
@GetMapping("/types/{qname}/subproperties/count") public long countTypeSubproperties(@PathVariable String stewardKey, @PathVariable String modelKey, @PathVariable String versionNumber, @PathVariable String qname) throws Exception Count all subproperties of a type with the given fields.- Throws:
Exception
-
getPrev
@GetMapping("/types/{typeQname}/subproperties/{propertyQname}/prev") @ResponseStatus(code=OK) public Subproperty getPrev(@PathVariable String stewardKey, @PathVariable String modelKey, @PathVariable String versionNumber, @PathVariable String typeQname, @PathVariable String propertyQname, @RequestParam(required=false,defaultValue="false") boolean includePreRelease) throws Exception Get the previous version of the subproperty with the given fields.- Parameters:
includePreRelease- - True to return a result from a pre-release if applicable; false to iterate until an official version is reached.- Throws:
Exception
-
getNext
@GetMapping("/types/{typeQname}/subproperties/{propertyQname}/next") @ResponseStatus(code=OK) public Subproperty getNext(@PathVariable String stewardKey, @PathVariable String modelKey, @PathVariable String versionNumber, @PathVariable String typeQname, @PathVariable String propertyQname, @RequestParam(required=false,defaultValue="false") boolean includePreRelease) throws Exception Get the next version of the subproperty with the given fields.- Parameters:
includePreRelease- - True to return a result from a pre-release if applicable; false to iterate until an official version is reached.- Throws:
Exception
-
getCurrent
@GetMapping("/types/{typeQname}/subproperties/{propertyQname}/current") @ResponseStatus(code=OK) public Subproperty getCurrent(@PathVariable String stewardKey, @PathVariable String modelKey, @PathVariable String versionNumber, @PathVariable String typeQname, @PathVariable String propertyQname) throws Exception Get the next current of the subproperty with the given fields.- Throws:
Exception
-
getHistory
@GetMapping("/types/{typeQname}/subproperties/{propertyQname}/history") @ResponseStatus(code=OK) public List<Subproperty> getHistory(@PathVariable String stewardKey, @PathVariable String modelKey, @PathVariable String versionNumber, @PathVariable String typeQname, @PathVariable String propertyQname, @RequestParam(required=false,defaultValue="false") boolean includePreRelease) throws Exception Get the history of the subproperty with the given fields.- Parameters:
includePreRelease- - True to return a result from a pre-release if applicable; false to iterate until an official version is reached.- Throws:
Exception
-