--
You received this message because you are subscribed to the Google Groups "HyperGraphDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hypergraphdb...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hypergraphdb/d9838dc3-b8f8-42d9-bf18-5f3c454fb93f%40googlegroups.com.
Shivam,Here is an example that we use in a test classimport org.hypergraphdb.HyperGraph;
import org.hypergraphdb.event.HGAtomAddedEvent;
import org.hypergraphdb.event.HGEvent;
import org.hypergraphdb.event.HGListener;
public class AtomAddiedListener implements HGListener {
@Override
public Result handle(HyperGraph graph, HGEvent e) {
HGAtomAddedEvent event = (HGAtomAddedEvent)e;
System.out.println("Atom added: " + graph.get(event.getAtomHandle())); //$NON-NLS-1$
return Result.ok;
}
}and this is activated with:graph.getEventManager().addListener(HGAtomAddedEvent.class, new AtomAddedListener());You can look at the peer/StorageService for an example in the HG code base.HTH,Alain
On Fri, Sep 6, 2019 at 2:40 AM Shivam Poddar <shivampo...@gmail.com> wrote:
Hi--I need to implement triggers in my hypergraph but I'm not able to figure out how to do that.Can anyone just provide an example whi prints a simple message, say "hello" whenever a new atom is added.
You received this message because you are subscribed to the Google Groups "HyperGraphDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hyperg...@googlegroups.com.