Package org.atomojo.app.client

Examples of org.atomojo.app.client.FeedDestination


         getContext().getLogger().info("Loading configuration for " + serverConf.getAddress() + ":" + serverConf.getPort() + " from " + link.getLink());

         changes = false;
         final Map<String, Boolean> found = new TreeMap<String, Boolean>();
         try {
            client.get(new FeedDestination() {

               public void onFeed(Document feedDoc) {
               }

               public void onEntry(Document entryDoc) {
View Full Code Here


            boolean changes = false;
            final List<Entry> hostsToDo = new ArrayList<Entry>();
            final List<Entry> dbToDo = new ArrayList<Entry>();
            final Map<String,Boolean> currentAuthList = new TreeMap<String,Boolean>();
            final Map<String,Boolean> changedAuth = new TreeMap<String,Boolean>();
            client.get(new FeedDestination() {
               public void onFeed(Document feedDoc) {
               }
               public void onEntry(Document entryDoc) {
                  Entry entry = new Entry(entryDoc);
                  entry.index();
View Full Code Here

    public void testParse() throws Exception
    {
       setLogLevel(Level.FINER);
       FeedClient feedClient = new FeedClient(FeedClientTest.class.getResource("feed.atom").toURI());
       Response response = feedClient.get(new FeedDestination() {
          public void onFeed(Document doc) {
             System.out.println("Feed:");
             try {
                StringWriter w = new StringWriter();
                XMLWriter.writeDocument(doc,w);
View Full Code Here

               assertTrue(status.isSuccess());
            } else {

               log.info("Checking feed "+i);
               final AtomicReference<Entry> theEntry = new AtomicReference<Entry>();
               feedClient.get(new FeedDestination() {
                  public void onEntry(Document entryDoc) {
                     Entry entry = new Entry(entryDoc);
                     entry.index();
                     theEntry.set(entry);
                  }
View Full Code Here

            feedClient.setIdentity("admin","admin");

            log.info("Checking feed "+j+","+i);
            Entry entry = null;
            final AtomicReference<Entry> theEntry = new AtomicReference<Entry>();
            Status status = feedClient.get(new FeedDestination() {
               public void onEntry(Document entryDoc) {
                  Entry entry = new Entry(entryDoc);
                  entry.index();
                  theEntry.set(entry);
               }
View Full Code Here

            }
         }
        
         final Map<String,Entry> entries = new HashMap<String,Entry>();
         try {
            feedClient.get(new FeedDestination() {
               public void onFeed(Document feedDoc) {}
               public void onEntry(Document entryDoc) {
                  Entry entry = new Entry(entryDoc);
                  Entry.Media media = entry.getMediaContent();
                  if (media!=null) {
View Full Code Here

     
      final FeedClient targetClient = new FeedClient(target.getLink());
      targetClient.setIdentity(target.getIdentity());
     
      try {
         Response response = sourceClient.get(new FeedDestination() {
            Set<UUID> entries = additive ? null : new TreeSet<UUID>();
            boolean ok = true;
            public void onFeed(Document feedDoc) {
               URI baseURI = feedDoc.getBaseURI();
               // Make sure to remove the xml:base on the feed element for storage;
View Full Code Here

                  } else {
                     feedClient.setIdentity(auth.getName(),auth.getPassword());
                  }
               }
               try {
                  Response response = feedClient.get(new FeedDestination() {
                     Set<UUID> entries = additive ? null : new TreeSet<UUID>();
                     Feed feed = null;
                     public void onFeed(Document feedDoc) {
                        URI baseURI = feedDoc.getBaseURI();
                        // Make sure to remove the xml:base on the feed element for storage;
View Full Code Here

         getContext().getLogger().info("Loading configuration for " + iface.getAddress() + ":" + iface.getPort() + " from " + link.getLink());

         changes = false;
         final Map<String, Boolean> found = new TreeMap<String, Boolean>();
         try {
            client.get(new FeedDestination() {

               public void onFeed(Document feedDoc) {
               }

               public void onEntry(Document entryDoc) {
View Full Code Here

      if (metadata.getUsername()!=null) {
         metadataClient.setIdentity(metadata.getUsername(),metadata.getPassword());
      }
      final Set<Term> updateSet = termSet.terms;
      try {
         Response response = metadataClient.get(new FeedDestination() {
            public void onFeed(Document feedDoc)
               throws XMLException
            {
               Feed feed = new Feed(feedDoc);
               feed.index();
View Full Code Here

TOP

Related Classes of org.atomojo.app.client.FeedDestination

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.