Search in sources :

Example 1 with AtomModelWrapper

use of won.protocol.util.AtomModelWrapper in project webofneeds by researchstudio-sat.

the class AbstractCreateAtomAction method createWonMessage.

/**
 * @deprecated wonNodeUri parameter is obsolete, flags should be set within
 * atomDataset
 */
@Deprecated
protected WonMessage createWonMessage(URI atomURI, URI wonNodeURI, Dataset atomDataset, final boolean usedForTesting, final boolean doNotMatch) throws WonMessageBuilderException {
    AtomModelWrapper atomModelWrapper = new AtomModelWrapper(atomDataset);
    if (doNotMatch) {
        atomModelWrapper.addFlag(WONMATCH.NoHintForMe);
        atomModelWrapper.addFlag(WONMATCH.NoHintForCounterpart);
    }
    if (usedForTesting) {
        atomModelWrapper.addFlag(WONMATCH.UsedForTesting);
    }
    RdfUtils.replaceBaseURI(atomDataset, atomURI.toString(), true);
    return WonMessageBuilder.createAtom().atom(atomURI).content().dataset(atomModelWrapper.copyDatasetWithoutSysinfo()).build();
}
Also used : AtomModelWrapper(won.protocol.util.AtomModelWrapper)

Example 2 with AtomModelWrapper

use of won.protocol.util.AtomModelWrapper in project webofneeds by researchstudio-sat.

the class CreateAtomAction method doRun.

@Override
protected void doRun(Event event, EventListener executingListener) throws Exception {
    EventListenerContext ctx = getEventListenerContext();
    BotContextWrapper botContextWrapper = ctx.getBotContextWrapper();
    if (ctx.getAtomProducer().isExhausted()) {
        logger.info("the bot's atom producer is exhausted.");
        ctx.getEventBus().publish(new AtomProducerExhaustedEvent());
        return;
    }
    final Dataset atomDataset = ctx.getAtomProducer().create();
    if (atomDataset == null) {
        logger.warn("atomproducer failed to produce an atom model, aborting atom creation");
        return;
    }
    URI atomUriFromProducer = null;
    Resource atomResource = WonRdfUtils.AtomUtils.getAtomResource(atomDataset);
    if (atomResource.isURIResource()) {
        atomUriFromProducer = URI.create(atomResource.getURI());
        RdfUtils.replaceBaseURI(atomDataset, atomResource.getURI(), true);
    } else {
        RdfUtils.replaceBaseResource(atomDataset, atomResource, true);
    }
    final URI atomUriBeforeCreation = atomUriFromProducer;
    AtomModelWrapper atomModelWrapper = new AtomModelWrapper(atomDataset);
    final Dataset atomDatasetWithSockets = atomModelWrapper.copyDatasetWithoutSysinfo();
    final URI wonNodeUri = ctx.getNodeURISource().getNodeURI();
    logger.debug("creating atom on won node {} with content {} ", wonNodeUri, StringUtils.abbreviate(RdfUtils.toString(Prefixer.setPrefixes(atomDatasetWithSockets)), 150));
    WonNodeInformationService wonNodeInformationService = ctx.getWonNodeInformationService();
    final URI atomURI = wonNodeInformationService.generateAtomURI(wonNodeUri);
    WonMessage createAtomMessage = createWonMessage(atomURI, atomDatasetWithSockets);
    createAtomMessage = ctx.getWonMessageSender().prepareMessage(createAtomMessage);
    // remember the atom URI so we can react to success/failure responses
    botContextWrapper.rememberAtomUri(atomURI);
    EventListener successCallback = event12 -> {
        logger.debug("atom creation successful, new atom URI is {}", atomURI);
        ctx.getEventBus().publish(new AtomCreatedEvent(atomURI, wonNodeUri, atomDatasetWithSockets, null, atomUriBeforeCreation));
    };
    EventListener failureCallback = event1 -> {
        String textMessage = WonRdfUtils.MessageUtils.getTextMessage(((FailureResponseEvent) event1).getFailureMessage());
        logger.debug("atom creation failed for atom URI {}, original message URI {}: {}", new Object[] { atomURI, ((FailureResponseEvent) event1).getOriginalMessageURI(), textMessage });
        botContextWrapper.removeAtomUri(atomURI);
        ctx.getEventBus().publish(new AtomCreationFailedEvent(wonNodeUri, atomUriBeforeCreation));
    };
    EventBotActionUtils.makeAndSubscribeResponseListener(createAtomMessage, successCallback, failureCallback, ctx);
    logger.debug("registered listeners for response to message URI {}", createAtomMessage.getMessageURI());
    ctx.getWonMessageSender().sendMessage(createAtomMessage);
    logger.debug("atom creation message sent with message URI {}", createAtomMessage.getMessageURI());
}
Also used : WonNodeInformationService(won.protocol.service.WonNodeInformationService) AtomCreationFailedEvent(won.bot.framework.eventbot.event.AtomCreationFailedEvent) AtomCreatedEvent(won.bot.framework.eventbot.event.impl.atomlifecycle.AtomCreatedEvent) Logger(org.slf4j.Logger) AtomProducerExhaustedEvent(won.bot.framework.eventbot.event.impl.atomlifecycle.AtomProducerExhaustedEvent) Prefixer(won.protocol.util.Prefixer) BotContextWrapper(won.bot.framework.bot.context.BotContextWrapper) MethodHandles(java.lang.invoke.MethodHandles) LoggerFactory(org.slf4j.LoggerFactory) EventBotActionUtils(won.bot.framework.eventbot.action.EventBotActionUtils) StringUtils(org.apache.commons.lang3.StringUtils) FailureResponseEvent(won.bot.framework.eventbot.event.impl.wonmessage.FailureResponseEvent) WonMessage(won.protocol.message.WonMessage) WonRdfUtils(won.protocol.util.WonRdfUtils) AtomModelWrapper(won.protocol.util.AtomModelWrapper) Event(won.bot.framework.eventbot.event.Event) RdfUtils(won.protocol.util.RdfUtils) Resource(org.apache.jena.rdf.model.Resource) EventListener(won.bot.framework.eventbot.listener.EventListener) URI(java.net.URI) Dataset(org.apache.jena.query.Dataset) EventListenerContext(won.bot.framework.eventbot.EventListenerContext) EventListenerContext(won.bot.framework.eventbot.EventListenerContext) AtomProducerExhaustedEvent(won.bot.framework.eventbot.event.impl.atomlifecycle.AtomProducerExhaustedEvent) Dataset(org.apache.jena.query.Dataset) Resource(org.apache.jena.rdf.model.Resource) WonNodeInformationService(won.protocol.service.WonNodeInformationService) URI(java.net.URI) AtomCreatedEvent(won.bot.framework.eventbot.event.impl.atomlifecycle.AtomCreatedEvent) WonMessage(won.protocol.message.WonMessage) AtomModelWrapper(won.protocol.util.AtomModelWrapper) BotContextWrapper(won.bot.framework.bot.context.BotContextWrapper) EventListener(won.bot.framework.eventbot.listener.EventListener) AtomCreationFailedEvent(won.bot.framework.eventbot.event.AtomCreationFailedEvent) FailureResponseEvent(won.bot.framework.eventbot.event.impl.wonmessage.FailureResponseEvent)

Example 3 with AtomModelWrapper

use of won.protocol.util.AtomModelWrapper in project webofneeds by researchstudio-sat.

the class CreateAtomWithSocketsAction method doRun.

@Override
protected void doRun(Event event, EventListener executingListener) throws Exception {
    EventListenerContext ctx = getEventListenerContext();
    if (ctx.getAtomProducer().isExhausted()) {
        logger.info("the bot's atom producer is exhausted.");
        ctx.getEventBus().publish(new AtomProducerExhaustedEvent());
        return;
    }
    final Dataset atomDataset = ctx.getAtomProducer().create();
    if (atomDataset == null) {
        logger.warn("atomproducer failed to produce an atom model, aborting atom creation");
        return;
    }
    URI atomUriFromProducer = null;
    Resource atomResource = WonRdfUtils.AtomUtils.getAtomResource(atomDataset);
    if (atomResource.isURIResource()) {
        atomUriFromProducer = URI.create(atomResource.getURI());
        RdfUtils.replaceBaseURI(atomDataset, atomResource.getURI(), true);
    } else {
        RdfUtils.replaceBaseResource(atomDataset, atomResource, true);
    }
    final URI atomUriBeforeCreation = atomUriFromProducer;
    AtomModelWrapper atomModelWrapper = new AtomModelWrapper(atomDataset);
    int i = 1;
    for (URI socket : sockets) {
        atomModelWrapper.addSocket(atomUriBeforeCreation.toString() + "#socket" + i, socket.toString());
        i++;
    }
    final Dataset atomDatasetWithSockets = atomModelWrapper.copyDatasetWithoutSysinfo();
    final URI wonNodeUri = ctx.getNodeURISource().getNodeURI();
    logger.debug("creating atom on won node {} with content {} ", wonNodeUri, StringUtils.abbreviate(RdfUtils.toString(Prefixer.setPrefixes(atomDatasetWithSockets)), 150));
    WonNodeInformationService wonNodeInformationService = ctx.getWonNodeInformationService();
    final URI atomURI = wonNodeInformationService.generateAtomURI(wonNodeUri);
    WonMessage createAtomMessage = createWonMessage(atomURI, wonNodeUri, atomDatasetWithSockets);
    createAtomMessage = ctx.getWonMessageSender().prepareMessage(createAtomMessage);
    // remember the atom URI so we can react to success/failure responses
    ctx.getBotContextWrapper().rememberAtomUri(atomURI);
    EventListener successCallback = event12 -> {
        logger.debug("atom creation successful, new atom URI is {}", atomURI);
        ctx.getEventBus().publish(new AtomCreatedEvent(atomURI, wonNodeUri, atomDatasetWithSockets, null, atomUriBeforeCreation));
    };
    EventListener failureCallback = event1 -> {
        String textMessage = WonRdfUtils.MessageUtils.getTextMessage(((FailureResponseEvent) event1).getFailureMessage());
        logger.debug("atom creation failed for atom URI {}, original message URI {}: {}", new Object[] { atomURI, ((FailureResponseEvent) event1).getOriginalMessageURI(), textMessage });
        ctx.getBotContextWrapper().removeAtomUri(atomURI);
        ctx.getEventBus().publish(new AtomCreationFailedEvent(wonNodeUri, atomUriBeforeCreation));
    };
    EventBotActionUtils.makeAndSubscribeResponseListener(createAtomMessage, successCallback, failureCallback, ctx);
    logger.debug("registered listeners for response to message URI {}", createAtomMessage.getMessageURI());
    ctx.getWonMessageSender().sendMessage(createAtomMessage);
    logger.debug("atom creation message sent with message URI {}", createAtomMessage.getMessageURI());
}
Also used : WonNodeInformationService(won.protocol.service.WonNodeInformationService) AtomCreationFailedEvent(won.bot.framework.eventbot.event.AtomCreationFailedEvent) AtomCreatedEvent(won.bot.framework.eventbot.event.impl.atomlifecycle.AtomCreatedEvent) Logger(org.slf4j.Logger) AtomProducerExhaustedEvent(won.bot.framework.eventbot.event.impl.atomlifecycle.AtomProducerExhaustedEvent) Prefixer(won.protocol.util.Prefixer) MethodHandles(java.lang.invoke.MethodHandles) LoggerFactory(org.slf4j.LoggerFactory) EventBotActionUtils(won.bot.framework.eventbot.action.EventBotActionUtils) StringUtils(org.apache.commons.lang3.StringUtils) FailureResponseEvent(won.bot.framework.eventbot.event.impl.wonmessage.FailureResponseEvent) WonMessage(won.protocol.message.WonMessage) WonRdfUtils(won.protocol.util.WonRdfUtils) AtomModelWrapper(won.protocol.util.AtomModelWrapper) Event(won.bot.framework.eventbot.event.Event) RdfUtils(won.protocol.util.RdfUtils) Resource(org.apache.jena.rdf.model.Resource) EventListener(won.bot.framework.eventbot.listener.EventListener) URI(java.net.URI) Dataset(org.apache.jena.query.Dataset) EventListenerContext(won.bot.framework.eventbot.EventListenerContext) EventListenerContext(won.bot.framework.eventbot.EventListenerContext) AtomProducerExhaustedEvent(won.bot.framework.eventbot.event.impl.atomlifecycle.AtomProducerExhaustedEvent) Dataset(org.apache.jena.query.Dataset) Resource(org.apache.jena.rdf.model.Resource) WonNodeInformationService(won.protocol.service.WonNodeInformationService) URI(java.net.URI) AtomCreatedEvent(won.bot.framework.eventbot.event.impl.atomlifecycle.AtomCreatedEvent) WonMessage(won.protocol.message.WonMessage) AtomModelWrapper(won.protocol.util.AtomModelWrapper) EventListener(won.bot.framework.eventbot.listener.EventListener) AtomCreationFailedEvent(won.bot.framework.eventbot.event.AtomCreationFailedEvent) FailureResponseEvent(won.bot.framework.eventbot.event.impl.wonmessage.FailureResponseEvent)

Example 4 with AtomModelWrapper

use of won.protocol.util.AtomModelWrapper in project webofneeds by researchstudio-sat.

the class TrigFileAtomProducer method readAtomFromFile.

@Override
public synchronized Dataset readAtomFromFile(final File file) throws IOException {
    logger.debug("processing as turtle file: {} ", file);
    try (FileInputStream fis = new FileInputStream(file)) {
        Dataset dataset = DatasetFactory.createGeneral();
        RDFDataMgr.read(dataset, fis, RDFFormat.TRIG.getLang());
        AtomModelWrapper atomModelWrapper = new AtomModelWrapper(dataset);
        return atomModelWrapper.copyDatasetWithoutSysinfo();
    } catch (Exception e) {
        logger.error("could not parse trig from file {} ", file, e);
        throw e;
    }
}
Also used : Dataset(org.apache.jena.query.Dataset) AtomModelWrapper(won.protocol.util.AtomModelWrapper) FileInputStream(java.io.FileInputStream) IOException(java.io.IOException)

Example 5 with AtomModelWrapper

use of won.protocol.util.AtomModelWrapper in project webofneeds by researchstudio-sat.

the class SolrMatcherActor method processActiveAtomEvent.

protected void processActiveAtomEvent(AtomEvent atomEvent) throws IOException, SolrServerException, JsonLdError {
    log.info("Start processing active atom event {}", atomEvent);
    // check if the atom has doNotMatch flag, then do not use it for querying or
    // indexing
    Dataset dataset = atomEvent.deserializeAtomDataset();
    AtomModelWrapper atomModelWrapper = new AtomModelWrapper(dataset);
    if (atomModelWrapper.flag(WONMATCH.NoHintForMe) && atomModelWrapper.flag(WONMATCH.NoHintForCounterpart)) {
        log.info("Discarding received atom due to flags match:NoHintForMe and match:NoHintForCounterpart: {}", atomEvent);
        return;
    }
    // check if atom has a sparql query attached
    if (atomModelWrapper.sparqlQuery()) {
        log.debug("Atom {} has a sparql query, omitting this atom in Solr matcher", atomModelWrapper.getAtomUri());
        return;
    }
    // check if atom is usedForTesting only
    boolean usedForTesting = atomModelWrapper.flag(WONMATCH.UsedForTesting);
    SolrMatcherQueryExecutor queryExecutor = (usedForTesting ? testQueryExecuter : defaultQueryExecuter);
    // create another query depending if the current atom is "WhatsAround" or a
    // default atom
    String queryString = null;
    if (atomModelWrapper.flag(WONMATCH.WhatsAround)) {
        // WhatsAround doesnt match on terms only other atoms in close location are
        // boosted
        WhatsAroundQueryFactory qf = new WhatsAroundQueryFactory(dataset);
        queryString = qf.createQuery();
    } else if (atomModelWrapper.flag(WONMATCH.WhatsNew)) {
        WhatsNewQueryFactory qf = new WhatsNewQueryFactory(dataset);
        queryString = qf.createQuery();
    } else {
        // default query matches content terms (of fields title, description and tags)
        // with different weights
        // and gives an additional multiplicative boost for geographically closer atoms
        DefaultAtomQueryFactory qf = new DefaultAtomQueryFactory(dataset);
        queryString = qf.createQuery();
    }
    // add filters to the query: default filters are
    // - atom status active
    // - creation date overlap 1 month
    // - OR-filtering for matching contexts if any were specified
    // now create three slightly different queries for different lists of atoms:
    // 1) atoms without NoHintForCounterpart => hints for current atom
    // 2) atoms without NoHintForSelf, excluding WhatsAround atoms => hints for
    // atoms in index that are not WhatsAround
    // 3) atoms without NoHintForSelf that are only WhatsAround atoms => hints for
    // atoms in index that are WhatsAround
    // to achieve this use a different filters for these queries
    // case 1) atoms without NoHintForCounterpart => hints for current atom
    List<String> filterQueries = new LinkedList<>();
    filterQueries.add(new AtomStateQueryFactory(dataset).createQuery());
    filterQueries.add(new CreationDateQueryFactory(dataset, 1, ChronoUnit.MONTHS).createQuery());
    filterQueries.add(new BooleanQueryFactory(BooleanQueryFactory.BooleanOperator.NOT, new HasFlagQueryFactory(HasFlagQueryFactory.FLAGS.NO_HINT_FOR_COUNTERPART)).createQuery());
    if (atomModelWrapper.getMatchingContexts() != null && atomModelWrapper.getMatchingContexts().size() > 0) {
        filterQueries.add(new MatchingContextQueryFactory(atomModelWrapper.getMatchingContexts()).createQuery());
    }
    if (!atomModelWrapper.flag(WONMATCH.NoHintForMe)) {
        // execute the query
        log.info("query Solr endpoint {} for atom {} and atom list 1 (without NoHintForCounterpart)", config.getSolrEndpointUri(usedForTesting), atomEvent.getUri());
        SolrDocumentList docs = queryExecutor.executeAtomQuery(queryString, config.getMaxHints(), null, filterQueries.toArray(new String[filterQueries.size()]));
        if (docs != null) {
            // perform knee detection depending on current atom is WhatsAround/WhatsNew or
            // not)
            boolean kneeDetection = atomModelWrapper.flag(WONMATCH.WhatsNew) || atomModelWrapper.flag(WONMATCH.WhatsAround) ? false : true;
            // generate hints for current atom (only generate hints for current atom,
            // suppress hints for matched atoms,
            BulkHintEvent events = hintBuilder.generateHintsFromSearchResult(docs, atomEvent, atomModelWrapper, false, true, kneeDetection);
            log.info("Create {} hints for atom {} and atom list 1 (without NoHintForCounterpart)", events.getHintEvents().size(), atomEvent);
            // publish hints to current atom
            if (events.getHintEvents().size() != 0) {
                getSender().tell(events, getSelf());
            }
        } else {
            log.warning("No results found for atom list 1 (without NoHintForCounterpart) query of atom ", atomEvent);
        }
    }
    // case 2) atoms without NoHintForSelf, excluding WhatsAround atoms => hints for
    // atoms in index that are not WhatsAround
    filterQueries = new LinkedList<>();
    filterQueries.add(new AtomStateQueryFactory(dataset).createQuery());
    filterQueries.add(new CreationDateQueryFactory(dataset, 1, ChronoUnit.MONTHS).createQuery());
    filterQueries.add(new BooleanQueryFactory(BooleanQueryFactory.BooleanOperator.NOT, new HasFlagQueryFactory(HasFlagQueryFactory.FLAGS.NO_HINT_FOR_ME)).createQuery());
    filterQueries.add(new BooleanQueryFactory(BooleanQueryFactory.BooleanOperator.NOT, new HasFlagQueryFactory(HasFlagQueryFactory.FLAGS.WHATS_AROUND)).createQuery());
    filterQueries.add(new BooleanQueryFactory(BooleanQueryFactory.BooleanOperator.NOT, new HasFlagQueryFactory(HasFlagQueryFactory.FLAGS.WHATS_NEW)).createQuery());
    if (atomModelWrapper.getMatchingContexts() != null && atomModelWrapper.getMatchingContexts().size() > 0) {
        filterQueries.add(new MatchingContextQueryFactory(atomModelWrapper.getMatchingContexts()).createQuery());
    }
    if (!atomModelWrapper.flag(WONMATCH.NoHintForCounterpart)) {
        // execute the query
        log.info("query Solr endpoint {} for atom {} and atom list 2 (without NoHintForSelf, excluding WhatsAround atoms)", config.getSolrEndpointUri(usedForTesting), atomEvent.getUri());
        SolrDocumentList docs = queryExecutor.executeAtomQuery(queryString, config.getMaxHintsForCounterparts(), null, filterQueries.toArray(new String[filterQueries.size()]));
        if (docs != null) {
            // generate hints for matched atoms (suppress hints for current atom, only
            // generate hints for matched atoms, perform knee detection)
            BulkHintEvent events = hintBuilder.generateHintsFromSearchResult(docs, atomEvent, atomModelWrapper, true, false, true);
            log.info("Create {} hints for atom {} and atom list 2 (without NoHintForSelf, excluding WhatsAround atoms)", events.getHintEvents().size(), atomEvent);
            // publish hints to current atom
            if (events.getHintEvents().size() != 0) {
                getSender().tell(events, getSelf());
            }
        } else {
            log.warning("No results found for atom list 2 (without NoHintForSelf, excluding WhatsAround atoms) query of atom ", atomEvent);
        }
    }
    // case 3) atoms without NoHintForSelf that are only WhatsAround atoms => hints
    // for atoms in index that are WhatsAround
    filterQueries = new LinkedList<>();
    filterQueries.add(new AtomStateQueryFactory(dataset).createQuery());
    filterQueries.add(new CreationDateQueryFactory(dataset, 1, ChronoUnit.MONTHS).createQuery());
    filterQueries.add(new BooleanQueryFactory(BooleanQueryFactory.BooleanOperator.NOT, new HasFlagQueryFactory(HasFlagQueryFactory.FLAGS.NO_HINT_FOR_ME)).createQuery());
    filterQueries.add(new BooleanQueryFactory(BooleanQueryFactory.BooleanOperator.OR, new HasFlagQueryFactory(HasFlagQueryFactory.FLAGS.WHATS_AROUND), new HasFlagQueryFactory(HasFlagQueryFactory.FLAGS.WHATS_NEW)).createQuery());
    if (atomModelWrapper.getMatchingContexts() != null && atomModelWrapper.getMatchingContexts().size() > 0) {
        filterQueries.add(new MatchingContextQueryFactory(atomModelWrapper.getMatchingContexts()).createQuery());
    }
    if (!atomModelWrapper.flag(WONMATCH.NoHintForCounterpart)) {
        // hints for WhatsAround Atoms should not have the keywords from title,
        // description, tags etc.
        // this can prevent to actually find WhatsAround atoms.
        // Instead create a WhatsAround query (query without keywords, just location) to
        // find other WhatsAround atoms
        queryString = (new WhatsAroundQueryFactory(dataset)).createQuery();
        // execute the query
        log.info("query Solr endpoint {} for atom {} and atom list 3 (without NoHintForSelf that are only WhatsAround atoms)", config.getSolrEndpointUri(usedForTesting), atomEvent.getUri());
        SolrDocumentList docs = queryExecutor.executeAtomQuery(queryString, config.getMaxHintsForCounterparts(), null, filterQueries.toArray(new String[filterQueries.size()]));
        if (docs != null) {
            // generate hints for matched atoms (suppress hints for current atom, only
            // generate hints for matched atoms, do not perform knee detection)
            BulkHintEvent events = hintBuilder.generateHintsFromSearchResult(docs, atomEvent, atomModelWrapper, true, false, false);
            log.info("Create {} hints for atom {} and atom list 3 (without NoHintForSelf that are only WhatsAround atoms)", events.getHintEvents().size(), atomEvent);
            // publish hints to current atom
            if (events.getHintEvents().size() != 0) {
                getSender().tell(events, getSelf());
            }
        } else {
            log.warning("No results found for atom list 3 (without NoHintForSelf that are only WhatsAround atoms) query of atom ", atomEvent);
        }
    }
    // index atom
    log.info("Add atom event content {} to solr index", atomEvent);
    atomIndexer.index(dataset);
}
Also used : BulkHintEvent(won.matcher.service.common.event.BulkHintEvent) Dataset(org.apache.jena.query.Dataset) WhatsAroundQueryFactory(won.matcher.solr.query.factory.WhatsAroundQueryFactory) AtomStateQueryFactory(won.matcher.solr.query.factory.AtomStateQueryFactory) DefaultAtomQueryFactory(won.matcher.solr.query.factory.DefaultAtomQueryFactory) SolrDocumentList(org.apache.solr.common.SolrDocumentList) BooleanQueryFactory(won.matcher.solr.query.factory.BooleanQueryFactory) LinkedList(java.util.LinkedList) CreationDateQueryFactory(won.matcher.solr.query.factory.CreationDateQueryFactory) WhatsNewQueryFactory(won.matcher.solr.query.factory.WhatsNewQueryFactory) MatchingContextQueryFactory(won.matcher.solr.query.factory.MatchingContextQueryFactory) AtomModelWrapper(won.protocol.util.AtomModelWrapper) SolrMatcherQueryExecutor(won.matcher.solr.query.SolrMatcherQueryExecutor) HasFlagQueryFactory(won.matcher.solr.query.factory.HasFlagQueryFactory)

Aggregations

AtomModelWrapper (won.protocol.util.AtomModelWrapper)37 Dataset (org.apache.jena.query.Dataset)19 Resource (org.apache.jena.rdf.model.Resource)15 URI (java.net.URI)9 Model (org.apache.jena.rdf.model.Model)8 WonMessage (won.protocol.message.WonMessage)6 RdfUtils (won.protocol.util.RdfUtils)6 IOException (java.io.IOException)5 MethodHandles (java.lang.invoke.MethodHandles)5 LinkedList (java.util.LinkedList)5 Test (org.junit.Test)5 Logger (org.slf4j.Logger)5 LoggerFactory (org.slf4j.LoggerFactory)5 GoalInstantiationProducer (won.utils.goals.GoalInstantiationProducer)5 GoalInstantiationResult (won.utils.goals.GoalInstantiationResult)5 DistributedPubSubMediator (akka.cluster.pubsub.DistributedPubSubMediator)4 java.util (java.util)4 Collectors (java.util.stream.Collectors)4 StringUtils (org.apache.commons.lang3.StringUtils)4 ActorRef (akka.actor.ActorRef)3