Package net.fortytwo.rdfagents.data

Examples of net.fortytwo.rdfagents.data.DatasetFactory


        System.out.println("For more information, please see:\n"
                + "  <URL:http://wiki.github.com/joshsh/twitlogic/configuring-and-running-twitlogic>.");
    }

    private void runDemo(final TypedProperties config) throws Exception {
        final DatasetFactory datasetFactory = new DatasetFactory(new ValueFactoryImpl());
        for (RDFContentLanguage l : RDFContentLanguage.values()) {
            datasetFactory.addLanguage(l);
        }

        TypedProperties p = TwitLogic.getConfiguration();
        String platformName = p.getString(TwitLogic.RDFAGENTS_PLATFORM_NAME);
        int port = p.getInt(TwitLogic.RDFAGENTS_PLATFORM_PORT);
View Full Code Here


        System.out.println("For more information, please see:\n"
                + "  <URL:http://wiki.github.com/joshsh/twitlogic/configuring-and-running-twitlogic>.");
    }

    private void runDemo(final Properties config) throws Exception {
        final DatasetFactory datasetFactory = new DatasetFactory(new ValueFactoryImpl());
        for (RDFContentLanguage l : RDFContentLanguage.values()) {
            datasetFactory.addLanguage(l);
        }

        RDFAgentsPlatform p = new RDFAgentsPlatformImpl("twitlogic.fortytwo.net", 8889, config);


        RDFAgent twitlogic = new TwitLogicAgent(config, p,
                new AgentId("urn:x-agent:twitlogic@twitlogic.fortytwo.net", "xmpp://patabot.2@jabber.org"));
        RDFAgent consumer = new RDFAgentImpl(p,
                new AgentId("urn:x-agent:agent1@twitlogic.fortytwo.net", "xmpp://patabot.2@jabber.org"));

        QueryConsumer<Value, Dataset> client = new QueryConsumerImpl(consumer);
        PubsubConsumer<Value, Dataset> subscriber = new PubsubConsumerImpl(consumer);

        ConsumerCallback<Dataset> callback = new ConsumerCallback<Dataset>() {
            public void success(final Dataset answer) {
                System.out.println("received a query result or subscription update.  Answer follows:");
                try {
                    datasetFactory.write(System.out, answer, RDFContentLanguage.RDF_TRIG);
                } catch (LocalFailure e) {
                    e.printStackTrace(System.err);
                }
            }
View Full Code Here

TOP

Related Classes of net.fortytwo.rdfagents.data.DatasetFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.