def load(self, source):
     " or is load() an option on a store/kb?    Hrmph. "
     parser = hotswap.get(pluggable.Parser)
     #  parser should ask host.pluginManager for "store"
     #store = hotswap.get(pluggable.Store)
     #parser.setSink(store)
     stream = self.open(source)
     parser.parse(stream, host=self)
Exemplo n.º 2
0
 def load(self, source):
     " or is load() an option on a store/kb?    Hrmph. "
     parser = hotswap.get(pluggable.Parser)
     #  parser should ask host.pluginManager for "store"
     #store = hotswap.get(pluggable.Store)
     #parser.setSink(store)
     stream = self.open(source)
     parser.parse(stream, host=self)
        host=host,
        program="plwm",
        version="$Id: plwm.py,v 1.7 2003-08-01 15:42:51 sandro Exp $",
        uri="http://www.w3.org/2000/10/swap/doc/cwm")

    hotswap.prepend("wrap_n3")
    hotswap.prepend("wrap_llyn")
    try:
        a.run()
    except hotswap.NoMatchFound, e:
        print e
        print "Try  --help preplug  for more information\n"
        sys.exit(1)

    # who should do this, really?
    store = hotswap.get(pluggable.Store)
    ser = hotswap.get(pluggable.Serializer, initargs=[sys.stdout, ""])
    pump = hotswap.get(pluggable.Pump)
    # which pump?   let that be up to hotswap of course
    pump.pump(store, ser)

# $Log: plwm.py,v $
# Revision 1.7  2003-08-01 15:42:51  sandro
# ?
#
# Revision 1.6  2003/04/28 19:17:52  sandro
# testing cvs!
#
# Revision 1.5  2003/04/25 19:55:53  sandro
# moved interface class defns out of plwm into pluggable
# implemented wrappers around llyn and notation3
Exemplo n.º 4
0
    a = MyArgHandler(host=host,
                     program="plwm",
                     version="$Id: plwm.py,v 1.7 2003-08-01 15:42:51 sandro Exp $",
                     uri="http://www.w3.org/2000/10/swap/doc/cwm")

    hotswap.prepend("wrap_n3")
    hotswap.prepend("wrap_llyn")
    try:
        a.run()
    except hotswap.NoMatchFound, e:
        print e
        print "Try  --help preplug  for more information\n"
        sys.exit(1)

    # who should do this, really?
    store = hotswap.get(pluggable.Store)
    ser = hotswap.get(pluggable.Serializer, initargs=[sys.stdout, ""])
    pump = hotswap.get(pluggable.Pump)
    # which pump?   let that be up to hotswap of course
    pump.pump(store, ser)
    
# $Log: plwm.py,v $
# Revision 1.7  2003-08-01 15:42:51  sandro
# ?
#
# Revision 1.6  2003/04/28 19:17:52  sandro
# testing cvs!
#
# Revision 1.5  2003/04/25 19:55:53  sandro
# moved interface class defns out of plwm into pluggable
# implemented wrappers around llyn and notation3