5 | | Interface: [source:branches/gnowsis0.9/gnowsis-server/src/java/org/gnowsis/repository/PimoStorage.java PimoStorage.java] |
| 5 | '''more about: PimOntology ''' |
| 6 | |
| 7 | Java Interface: [source:branches/gnowsis0.9/gnowsis-server/src/java/org/gnowsis/repository/PimoStorage.java PimoStorage.java] |
| 8 | |
| 9 | Usage example: |
| 10 | {{{ |
| 11 | // I write a triple to the pimo |
| 12 | Repository r = Gnowsis.getPimoStorage().getRepository(); |
| 13 | Transation t = r.startTransaction(); |
| 14 | // add something |
| 15 | t.add(new StatementImpl(s, p, o)); |
| 16 | t.commit(); |
| 17 | |
| 18 | // do fulltext search on pimo, using lucene query language |
| 19 | Iterator<Tag> tagI = Gnowsis.getPimoStorage().search("Hello*"); |
| 20 | while (tagI.hasNext()) |
| 21 | { |
| 22 | Tag t = tagI.next(); |
| 23 | System.out.println("found thing: "+t.getUri()+ " with name "+t.getName()); |
| 24 | } |
| 25 | }}} |
| 26 | |
| 27 | |