manipulating urls in ibrouteur let you easily link to it, it is also the only way to lookup for images using multiple values for the tags and subjects (so that you can find all the images of me and you or some other edonist query oriented query)
- /ibrouteur/year2005 : images taken in 2005
- /ibrouteur/year : list of all the possible years
- /ibrouteur/year2005/SubjectMoi : list of all pictures of me taken in 2005
- /ibrouteur/subject/year2005 : will remove everything after the undecided subject and propose a list of them, the subjects.
- /ibrouteur/xxx : will show all images which have the value xxx in an index. Will work only if xxx is not an index name like subject, year, location or album or etc. we only use one index, so we go from the specific to the generic :
- is xxx a possible year? YES, is xxx in the year? YES, we print
- is xxx a possible year? YES, is xxx in the year? NO, can xxx be some other index? NO, we lookup xxx in the tags
regexp used in decision when presented with a value not preceded by an index :
- year is 20[10][0-9]$
- date is 20[10][0-9]-[01][0-9]-[0-3][0-9]$
- subject = author is [A-Z][A-Za-z\-\ ]*$ -> but we might have possible values in both? author is not going to be used and is therefore only accessible via the authorxxx combinaison
- album = location is letters* [\w\ \-]*$, same question of ambiguite but location will never be identical to album
- week is [1-52]$
- month is [1-12]$ or January-December or Janvier-Decembre (trim the accents if french is used...)
- the current order of preference is : year > subject > month > date > location > album > week
what will happen if :
- the value asked for an index does not exists?
- return empty set and let the use remove the indexes he choosed
- the combination of all index/values gives an empty set?
- return the page with no result and give the user the option of removing/changing the values of the indexes, this has to be done in BrowseLayout
- the user ask for Moi/Kai
- for multiple possible values like tag and subject then we get /subjectMoi/subjectKai (all the nice pictures with me and Kai together), if Kai is not in the subject then we get /subjectMoi/tagKai
- for unique possible values like location, /bruxelles/bruxelles for example, we get /locationbruxelles/tagbruxelles. If a unique index already has a value then we lookup all the other values which could be found in this index in the tags and only there