Project Info Table - easily solved
When I left off last week, I was struggling with trying to display the Project metadata in a table on the Project Info Page. Well, that was a case of getting frustrated and not thinking clearly and deciding I would tackle it during the next week. I had a little free time to get on the computer Monday night, so I thought I would give it a shot, and was able to get the table display working within a few minutes. Solving the problem was a matter of taking a break.
It's not the best implementation at the moment, since I need to add a new table row to the html template for each new attribute I add to the Project object (and it must match the attribute key):
|
"ProjectStatus" attribute added to the Project object |
It is relatively simple on the Java side, and requires no code changes to display the new attribute value. It simply iterates through the MetadataMap and creates the wicket Label objects to display.
I would like to simplify this further but this works for now. In the future, I would like to have the whole table generated in code, not having to add anything to the html page.
GeoServer Catalog Reloading
As I was working on the MetadataMap table display, I created a couple of new Projects and noticed that those did not immediately display on the PorjectList page. It would require restarting Tomcat to see any new projects on the ProjectList page, while I could see the new Project on the Workspace list page. I figured there must be a way to refresh the cache of loaded project, so I dug through the code. This is what I found:
That may not be the best implementation, and it may get moved (it's in the ProjectHelper class) but it works for now.
Stores
Since I made some good progress on Project objects this week, and I feel like I'm at a good point to move on, I decided to start working on the GDQS Store object. Just like the Project is an extension of the GeoServer Workspace, the Store will also be a GeoServer object with GDQS specific metadata. I'm leaving off this week creating Info and New pages for the object.