[Z3-zemantic] Re: big zemantic storage / some changes

Tarek Ziadé tziade at nuxeo.com
Sat May 7 22:06:50 CEST 2005


David Pratt wrote:

> Hi Tarek.  The product I was referring to is called MailManager.  The 
> organization responsible is logicalware.  The fellow's name is Andrew 
> Veitch andrew at logicalprogression.net and this is his product and he 
> has done a very nice job of it.
>
> You can download the product from 
> http://mailmanager.sourceforge.net.   I am hoping to begin making some 
> good use of it in the next month or two and I know of others that are 
> pleased with its performance including Zettai.net that use it for 
> pretty much all their contact management.  Their is work ongoing to 
> make the backend storage in relational database in postgres is what I 
> understand.

oh ok thanks, I need to check it up

>
> Do you have the code and any instructions for Zope2 as a lib to get me 
> started?  Tres has just provided a starting point for Zope2 indexing 
> but am uncertain that this the same work that you and Michel has been 
> able to get working with Zope 2.  In any case, a couple of pointers to 
> help me get started would really be appreciated since I am keen on 
> this and learning more.  Hopefully I can help on some type of Zope2 
> implementation since I will be working in this space for a while to 
> come as much as I want to take time to learn zope3.

Well, this is how we did, (hopefully Michel or other Gurus will correct 
me if i'm wrong or out of date ;) ) :

xxxx Zope 2 code xxxxx
from rdflib.URIRef import URIRef
from rdflib.Literal import Literal

from zemantic.triplestore import TripleStore


class ZemanticMailCatalog(TripleStore):
    xxx custom code if needed xxx

InitializeClass(ZemanticMailCatalog)


class ZemanticMessageAdapter:
    """ adapts a message to provide triples """

    implements(IRDFThreeTuples)

    def threeTuples(self):
        """ provides a sequence of triples """"
       xxxx

xxxxxxxx Zope 2code xxxx

-> look in Zemantic unit tests, they provide a lot of examples on how to 
create triples (depending on relation kind)

-> I add entries in the catalog by creating ZemanticMessageAdapter 
instances and calling ZemanticMailCatalog.addTriples
with ZemanticMessageAdapter.threeTuples() result

Cheers

Tarek

-- 
Tarek ZIADE, Nuxeo SARL: Zope Service Provider.
Mail: tz at nuxeo.com - Tel: +33 (0)6 30 37 02 63
Nuxeo Collaborative Portal Server: http://www.nuxeo.com/cps
Gestion de contenu web / portail collaboratif / groupware / open source



More information about the Z3-zemantic mailing list