Changes between Version 2 and Version 3 of ResourceStorage


Ignore:
Timestamp:
05/10/06 16:16:17 (18 years ago)
Author:
sauermann
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ResourceStorage

    v2 v3  
    33Interface: [source:branches/gnowsis0.9/gnowsis-server/src/java/org/gnowsis/repository/ResourceStorage.java ResourceStorage.java] 
    44 
    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.  
     5stores 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 
     10Its 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 == 
     18From inside gnowsis (using Java code inside the gnowsis server), you go like this: 
     19 
     20{{{  
     21ResourceStorage s = Gnowsis.getResourceStorage(); 
     22Iterator<Tag> it = s.search("hello"); 
     23// iterate through uri/label/type returned inside the tags. 
     24}}} 
     25 
     26== Sparql, SERQL and RDQL querying == 
     27From 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{{{ 
     30ResourceStorage s = Gnowsis.getResourceStorage(); 
     31 
     32// Sesame querying: 
     33s.getRepository()..... 
     34 
     35// Jena querying 
     36public ResultSet doSelectQuery(String query, QueryLanguage querylanguage) 
     37public Model doConstructQuery(String query, QueryLanguage querylanguage) 
     38}}} 
     39 
     40== Adding resources using web-interface == 
     41At the moment you cannot add resources to the resource-storage from the outside. You can use the TaggingApi to do this, though. 
     42{{{ 
     43TaggingApi.ensureResourceIsInStore(String resourceUri, String label, String typeUri, String fulltext, String metadataXML)}}} 
     44 
     45== Browsing the contents == 
     46The 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 = 
    1154Named graphs are used to seperate single resources, each !ResourceManifestation? gets a named graph.