Package org.apache.tuscany.sca.demos.aggregator.types

Examples of org.apache.tuscany.sca.demos.aggregator.types.AlertType


        // Aggregate entries from feed1 and feed2
        try {       
            AlertsType alerts = this.alerts.getAllNewAlerts("");
           
            for( Object alertObject : alerts.getAlert() ){        
                AlertType alert = ((AlertType)alertObject);
                Entry entry = factory.newEntry();
                entry.setTitle(alert.getTitle());
                //entry.(alert.getSummary());                   
                entry.addLink(alert.getAddress());
                entry.setPublished(dateFormatter.parse(alert.getDate()));
                       
                feed.addEntry(entry);
            }
        } catch(Exception ex) {
            System.err.println("Exception " + ex.toString());
View Full Code Here


        // Aggregate entries from feed1 and feed2
        try {       
            AlertsType alerts = this.alerts.getAllNewAlerts("");
           
            for( Object alertObject : alerts.getAlert() ){        
                AlertType alert = ((AlertType)alertObject);
                Entry entry = factory.newEntry();
                entry.setTitle(alert.getTitle());
                //entry.(alert.getSummary());                   
                entry.addLink(alert.getAddress());
                entry.setPublished(dateFormatter.parse(alert.getDate()));
                       
                feed.addEntry(entry);
            }
        } catch(Exception ex) {
            System.err.println("Exception " + ex.toString());
View Full Code Here

            List entries = feed.getEntries();
            for(Object entry: entries){
                SyndEntry syndEntry = (SyndEntry)entry;            
               
                if (syndEntry.getPublishedDate().after(timestamp)){
                    AlertType newAlert = factory.createAlertType();
                   
                    newAlert.setTitle(syndEntry.getTitle());
                 //   newAlert.setSummary("<![CDATA[" +
                //                        syndEntry.getDescription().getValue() +
                //                        "]]>");
                    newAlert.setSummary("");                   
                    newAlert.setAddress(syndEntry.getLink());
                    newAlert.setDate(dateFormatter.format(syndEntry.getPublishedDate()));
                    newAlert.setId(rssaddress);
                    newAlert.setUnread(true);
                   
                    returnAlertList.add(newAlert);
                }
            }
           
View Full Code Here

        // Aggregate entries from feed1 and feed2
        try {       
            AlertsType alerts = this.alerts.getAllNewAlerts("");
           
            for( Object alertObject : alerts.getAlert() ){        
                AlertType alert = ((AlertType)alertObject);
                Entry entry = factory.newEntry();
                entry.setTitle(alert.getTitle());
                //entry.(alert.getSummary());                   
                entry.addLink(alert.getAddress());
                entry.setPublished(dateFormatter.parse(alert.getDate()));
                       
                feed.addEntry(entry);
            }
        } catch(Exception ex) {
            System.err.println("Exception " + ex.toString());
View Full Code Here

                    ((AlertType)alert).setSourceId(sourceType.getId());
                   
                    // convert from SDO to POJO so that the
                    // JSONRPC binding will work. It can't currently
                    // handle SDOs
                    AlertType newAlert = new AlertTypeNonSDOImpl();
   
                    newAlert.setSourceId(((AlertType)alert).getSourceId());
                    newAlert.setTitle(((AlertType)alert).getTitle());
                    newAlert.setSummary(((AlertType)alert).getSummary());                   
                    newAlert.setAddress(((AlertType)alert).getAddress());
                    newAlert.setDate(((AlertType)alert).getDate());
                    newAlert.setId(((AlertType)alert).getId());
                    newAlert.setUnread(((AlertType)alert).isUnread());               
                   
                    returnAlertList.add(newAlert);
                }
               
                // update the time last checked for this source
View Full Code Here

       
        try {       
            AlertsType alerts = this.alerts.getAllNewAlerts("");
           
            for( Object alertObject : alerts.getAlert() ){        
                AlertType alert = ((AlertType)alertObject);
                SyndEntry entry = new SyndEntryImpl();
                entry.setTitle(alert.getTitle());
                //entry.(alert.getSummary());                   
                entry.setLink(alert.getAddress());
                entry.setPublishedDate(dateFormatter.parse(alert.getDate()));
                       
                entries.add(entry);
            }
        } catch(Exception ex) {
            System.err.println("Exception " + ex.toString());
View Full Code Here

                    ((AlertType)alert).setSourceId(sourceType.getId());
                   
                    // convert from SDO to POJO so that the
                    // JSONRPC binding will work. It can't currently
                    // handle SDOs
                    AlertType newAlert = new AlertTypeNonSDOImpl();
   
                    newAlert.setSourceId(((AlertType)alert).getSourceId());
                    newAlert.setTitle(((AlertType)alert).getTitle());
                    newAlert.setSummary(((AlertType)alert).getSummary());                   
                    newAlert.setAddress(((AlertType)alert).getAddress());
                    newAlert.setDate(((AlertType)alert).getDate());
                    newAlert.setId(((AlertType)alert).getId());
                    newAlert.setUnread(((AlertType)alert).isUnread());               
                   
                    returnAlertList.add(newAlert);
                }
               
                // update the time last checked for this source
View Full Code Here

       
        try {       
            AlertsType alerts = this.alerts.getAllNewAlerts("");
           
            for( Object alertObject : alerts.getAlert() ){        
                AlertType alert = ((AlertType)alertObject);
                SyndEntry entry = new SyndEntryImpl();
                entry.setTitle(alert.getTitle());
                //entry.(alert.getSummary());                   
                entry.setLink(alert.getAddress());
                entry.setPublishedDate(dateFormatter.parse(alert.getDate()));
                       
                entries.add(entry);
            }
        } catch(Exception ex) {
            System.err.println("Exception " + ex.toString());
View Full Code Here

            for(Object entry: entries){
                SyndEntry syndEntry = (SyndEntry)entry;            
               
                // System.err.println( "Entry pubdate=" + syndEntry.getPublishedDate() );
                if (syndEntry.getPublishedDate().after(timestamp)){
                    AlertType newAlert = factory.createAlertType();
                   
                    newAlert.setTitle(syndEntry.getTitle());
                 //   newAlert.setSummary("<![CDATA[" +
                //                        syndEntry.getDescription().getValue() +
                //                        "]]>");
                    newAlert.setSummary("");                   
                    newAlert.setAddress(syndEntry.getLink());
                    newAlert.setDate(feedDateFormatter.format(syndEntry.getPublishedDate()));
                    newAlert.setId(rssaddress);
                    newAlert.setUnread(true);
                   
                    returnAlertList.add(newAlert);
                }
            }
           
View Full Code Here

                    ((AlertType)alert).setSourceId(sourceType.getId());
                   
                    // convert from SDO to POJO so that the
                    // JSONRPC binding will work. It can't currently
                    // handle SDOs
                    AlertType newAlert = new AlertTypeNonSDOImpl();
   
                    newAlert.setSourceId(((AlertType)alert).getSourceId());
                    newAlert.setTitle(((AlertType)alert).getTitle());
                    newAlert.setSummary(((AlertType)alert).getSummary());                   
                    newAlert.setAddress(((AlertType)alert).getAddress());
                    newAlert.setDate(((AlertType)alert).getDate());
                    newAlert.setId(((AlertType)alert).getId());
                    newAlert.setUnread(((AlertType)alert).isUnread());               
                   
                    returnAlertList.add(newAlert);
                }
               
                // update the time last checked for this source
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.demos.aggregator.types.AlertType

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.