5 | | stores all resources (pimo:!ResourceManifestation?) of the user. |
6 | | Its filled by Aperture and sometimes by the applications that want to add a |
7 | | few resources before they are annotated (using pimo:occurrence). |
8 | | No other parts of pimo go there, especially no pimo:occurrence links. |
9 | | Needs fulltext indexing using LuceneSail(configured by Aperture ontology and |
10 | | PIMO-!ResourceManifestation?) OR Catwiesel. |
| 5 | stores all resources of the user, these are typically data extracted from the filesystem, address-books or e-mails: |
| 6 | * files |
| 7 | * addresses |
| 8 | * e-mails, etc. |
| 9 | |
| 10 | Its filled by Aperture and the ApertureSynchroniser. Sometimes applications add a resource here before they are tagged using the TaggingApi, so also the TaggingApi will store here. |
| 11 | |
| 12 | = Features = |
| 13 | * mass inserts using the {{{addResource()}}} and {{{removeResource()}}} methods. |
| 14 | * fulltext search |
| 15 | * similarity search (at the moment using lucene, switching to catwiesel soon) |
| 16 | |
| 17 | == Fulltext-querying == |
| 18 | From inside gnowsis (using Java code inside the gnowsis server), you go like this: |
| 19 | |
| 20 | {{{ |
| 21 | ResourceStorage s = Gnowsis.getResourceStorage(); |
| 22 | Iterator<Tag> it = s.search("hello"); |
| 23 | // iterate through uri/label/type returned inside the tags. |
| 24 | }}} |
| 25 | |
| 26 | == Sparql, SERQL and RDQL querying == |
| 27 | From inside gnowsis, you can access the Sesame repository directly using the {{{ResourceStorage.getRepository()}}} method. '''All Sesame2 querying works''' on that. If you feel unhappy with Sesame, use our Jena wrappers for querying: |
| 28 | |
| 29 | {{{ |
| 30 | ResourceStorage s = Gnowsis.getResourceStorage(); |
| 31 | |
| 32 | // Sesame querying: |
| 33 | s.getRepository()..... |
| 34 | |
| 35 | // Jena querying |
| 36 | public ResultSet doSelectQuery(String query, QueryLanguage querylanguage) |
| 37 | public Model doConstructQuery(String query, QueryLanguage querylanguage) |
| 38 | }}} |
| 39 | |
| 40 | == Adding resources using web-interface == |
| 41 | At the moment you cannot add resources to the resource-storage from the outside. You can use the TaggingApi to do this, though. |
| 42 | {{{ |
| 43 | TaggingApi.ensureResourceIsInStore(String resourceUri, String label, String typeUri, String fulltext, String metadataXML)}}} |
| 44 | |
| 45 | == Browsing the contents == |
| 46 | The best way to see what is in the resource-storage is to use the local sesame web interface. |
| 47 | * go to http://localhost:9993/sesame1 |
| 48 | * login |
| 49 | * select the '''resource''' repository |
| 50 | * press explore |
| 51 | |
| 52 | |
| 53 | = Implementation decisions = |