Search in sources :

Example 6 with NeedEvent

use of won.matcher.service.common.event.NeedEvent in project webofneeds by researchstudio-sat.

the class SolrTest method main.

public static void main(String[] args) throws IOException, InterruptedException {
    // init basic Akka
    AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(MatcherSolrAppConfiguration.class);
    ActorSystem system = ctx.getBean(ActorSystem.class);
    ActorRef solrMatcherActor = system.actorOf(SpringExtension.SpringExtProvider.get(system).props(SolrMatcherActor.class), "SolrMatcherActor");
    NeedEvent ne1 = createNeedEvent("/needmodel/need1.trig");
    NeedEvent ne2 = createNeedEvent("/needmodel/need2.trig");
    solrMatcherActor.tell(ne1, null);
    Thread.sleep(5000);
    solrMatcherActor.tell(ne2, null);
}
Also used : ActorSystem(akka.actor.ActorSystem) AnnotationConfigApplicationContext(org.springframework.context.annotation.AnnotationConfigApplicationContext) SolrMatcherActor(won.matcher.solr.actor.SolrMatcherActor) ActorRef(akka.actor.ActorRef) NeedEvent(won.matcher.service.common.event.NeedEvent)

Aggregations

NeedEvent (won.matcher.service.common.event.NeedEvent)6 Dataset (org.apache.jena.query.Dataset)3 DistributedPubSubMediator (akka.cluster.pubsub.DistributedPubSubMediator)2 ResourceCrawlUriMessage (won.matcher.service.crawler.msg.ResourceCrawlUriMessage)2 ActorRef (akka.actor.ActorRef)1 ActorSystem (akka.actor.ActorSystem)1 CamelMessage (akka.camel.CamelMessage)1 IOException (java.io.IOException)1 InputStream (java.io.InputStream)1 StringWriter (java.io.StringWriter)1 Lock (org.apache.jena.shared.Lock)1 AnnotationConfigApplicationContext (org.springframework.context.annotation.AnnotationConfigApplicationContext)1 HttpHeaders (org.springframework.http.HttpHeaders)1 RestClientException (org.springframework.web.client.RestClientException)1 BulkNeedEvent (won.matcher.service.common.event.BulkNeedEvent)1 CrawlWrapperException (won.matcher.service.crawler.exception.CrawlWrapperException)1 CrawlUriMessage (won.matcher.service.crawler.msg.CrawlUriMessage)1 SolrMatcherActor (won.matcher.solr.actor.SolrMatcherActor)1 IncorrectPropertyCountException (won.protocol.exception.IncorrectPropertyCountException)1 NeedState (won.protocol.model.NeedState)1