我正在寻找一种独特的方式来以 REST 方式查询以下用例:-
假设存储库包含以下内容:-
a. green color ball image of 1cm radius
b. yellow color ball image of 1cm radius
c. blue color ball image of 1cm radius
d. green color ball image of 2cm radius
e. yellow color ball image of 2cm radius
f. blue color ball image of 2cm radius
g. computer monitor icon image of size 32x32 pixels in png format
h. computer monitor icon image of size 64x64 pixels in png format
i. computer monitor icon image of size 32x32 pixels in ico format
j. computer monitor icon image of size 64x64 pixels in ico format
k. HR travel policy
l. HR new hire policy
g. HR promotion policy
1. Find all documents published after a certain date?
2. Find all documents published before a certain date?
3. Find all documents published between a certain set of dates?
4. Find all balls which are 1cm in radius
5. Find all documents whose download format is "png"
6. Find all documents whose size is 32x32 pixels
7. Find all balls which are green in color.
我们的存储库可以基于 Google Storage、Amazon S3、Mongodb GridFS、Java 内容存储库 (JCR 2.0) 或简单的文件系统。
存储和检索上述数据的理想方式是什么。我希望 REST URL 尽可能具有表现力,以便我可以对上述任何用例 [1-6] 进行建模。感谢有关如何设计通用存储库的任何指示,以便我可以使用适当的命名约定来根据上述查询获取文档。