Greetings,
I’ve implemented an Omeka-S schema to organize Documents that are related to Places. We currently have about 14,000 places and 75,000 documents. This hierarchy has advantages, since the map interface only has to have one marker for each place. Clicking on a Place marker populates a panel showing the properties of the Place and a listing the documents related to that place. To see this in action, see cdash.cambridgema.gov
Our semi-automated workflow for sorting, digesting and bulk uploading items assigns a marker location to each document that corresponds with the location of the parent place. Documents have other properties that are place-dependent: Document titles incorporate the Name of the parent place and the Type of the document; Documents also are tagged by neighborhood and a have a StreetSort key that allows items to be sorted by the street address of the parent place ordered by StreetName, then HouseNumber)
So far, so good! Now an opportunity / challenge arises as we transition from the automated bulk loading process to ad-hoc corrections and item creation. When it becomes necessary to adjust the marker location for a place. I’ve created a somewhat hackish procedure that syncs the place marker locations of documents using a PHP script that uses SQL to updates the Mapping_Marker table for all documents, syncing them with their places. I realize that it is probably not a great practice to hack the MySQL schema in this way, but it is fairly simple owing to the one-to-one relationship of items to markers.
Now, I am looking at ways of updating other properties of documents – like the Titles, Neighborhood and StreetSort key. I gather from the architecture of Omeka-S that the right way to do this would be to create a new module that uses Doctrine ORM to create a extended Item class for Places which would have have Document children. Updates to a place properties would propagate to the child Documents. Hopefully there would also be a behavior so that creating a new Document item and linking it to a place, would also trigger automatic population of properties that are dependent on the Place.
I currently have simulated this inheritance behavior by hacking item show pages, but it does not deal with the street-sort key and the changes have no effect on our street sort function or on search filters. This cosmetic approach would also be problematic if we ever wanted to bulk-export Documents with their place-dependent properties.
I would be interested in advice from folks who have thought about this sort of data model, which could have other applications for ontologies such as biographical information. Is anyone aware of similar modules that create new item classes with relations and triggers like this? Or maybe I am on the wrong track and missing something simple. Doctrine is completely new to me, but I am pretty handy with SQL. Would it be OK, to approach this with a module that adds SQL triggers to the MySQL database instead?
Thanks