= ResourceStorage = Interface: [source:branches/gnowsis0.9/gnowsis-server/src/java/org/gnowsis/repository/ResourceStorage.java ResourceStorage.java] stores all resources of the user, these are typically data extracted from the filesystem, address-books or e-mails: * files * addresses * e-mails, etc. 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. = Features = * mass inserts using the {{{addResource()}}} and {{{removeResource()}}} methods. * fulltext search * similarity search (at the moment using lucene, switching to catwiesel soon) == Fulltext-querying == From inside gnowsis (using Java code inside the gnowsis server), you go like this: {{{ ResourceStorage s = Gnowsis.getResourceStorage(); Iterator it = s.search("hello"); // iterate through uri/label/type returned inside the tags. }}} == Sparql, SERQL and RDQL querying == 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: {{{ ResourceStorage s = Gnowsis.getResourceStorage(); // Sesame querying: s.getRepository()..... // Jena querying public ResultSet doSelectQuery(String query, QueryLanguage querylanguage) public Model doConstructQuery(String query, QueryLanguage querylanguage) }}} == Adding resources using web-interface == At the moment you cannot add resources to the resource-storage from the outside. You can use the TaggingApi to do this, though. {{{ TaggingApi.ensureResourceIsInStore(String resourceUri, String label, String typeUri, String fulltext, String metadataXML)}}} == Browsing the contents == The best way to see what is in the resource-storage is to use the local sesame web interface. * go to http://localhost:9993/sesame1 * login * select the '''resource''' repository * press explore = Implementation decisions = Named graphs are used to seperate single resources, each !ResourceManifestation? gets a named graph.