Changeset 726


Ignore:
Timestamp:
05/02/11 23:00:12 (8 years ago)
Author:
philsmart
Message:
 
Location:
raptor-mua/trunk/src/main
Files:
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • raptor-mua/trunk/src/main/config/users.xml

    r632 r726  
    2525        http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"> 
    2626 
     27    <!-- NOT USED AT PRESENT --> 
    2728 
    2829        <bean id="raptorUsers" class=" uk.ac.cardiff.raptormua.model.Users"> 
  • raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/engine/MUAEngine.java

    r710 r726  
    1919package uk.ac.cardiff.raptormua.engine; 
    2020 
     21import java.io.BufferedReader; 
     22import java.io.ByteArrayInputStream; 
     23import java.io.DataInputStream; 
     24import java.io.InputStreamReader; 
    2125import java.util.ArrayList; 
    2226import java.util.List; 
     
    3337import uk.ac.cardiff.model.wsmodel.Capabilities; 
    3438import uk.ac.cardiff.model.wsmodel.EventPushMessage; 
     39import uk.ac.cardiff.model.wsmodel.LogFileUpload; 
    3540import uk.ac.cardiff.model.wsmodel.StatisticalUnitInformation; 
    3641import uk.ac.cardiff.model.wsmodel.SuggestionValues; 
     
    5358public class MUAEngine { 
    5459 
    55         /** Class logger*/ 
     60        /** Class logger */ 
    5661        private final Logger log = LoggerFactory.getLogger(MUAEngine.class); 
    5762 
     
    204209    } 
    205210 
     211    /** Use the configured raptor parsing library to store the incomming <code>uploadFiles</code> 
     212     *  
     213     * @param uploadFiles the files to parse and store 
     214     */ 
     215        public void batchParse(List<LogFileUpload> uploadFiles) { 
     216                BufferedReader bf = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(uploadFiles.get(0).getData()))); 
     217                 
     218        } 
     219 
    206220} 
  • raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/service/MUAProcess.java

    r710 r726  
    1919package uk.ac.cardiff.raptormua.service; 
    2020 
     21import java.util.List; 
     22 
    2123import org.apache.cxf.binding.soap.SoapFault; 
    2224 
     
    2628import uk.ac.cardiff.model.wsmodel.Capabilities; 
    2729import uk.ac.cardiff.model.wsmodel.EventPushMessage; 
     30import uk.ac.cardiff.model.wsmodel.LogFileUpload; 
    2831import uk.ac.cardiff.model.wsmodel.StatisticalUnitInformation; 
    2932 
     
    6568         */ 
    6669        public AggregatorGraphModel updateAndInvokeStatisticalUnit(StatisticalUnitInformation statisticalUnitInformation) throws SoapFault; 
     70 
     71        public boolean batchUpload(List<LogFileUpload> uploadFiles) throws SoapFault; 
    6772} 
  • raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/service/impl/MUAProcessImpl.java

    r710 r726  
    1919package uk.ac.cardiff.raptormua.service.impl; 
    2020 
     21import java.util.List; 
    2122import java.util.concurrent.locks.Lock; 
    2223import java.util.concurrent.locks.ReentrantLock; 
     
    3334import uk.ac.cardiff.model.wsmodel.Capabilities; 
    3435import uk.ac.cardiff.model.wsmodel.EventPushMessage; 
     36import uk.ac.cardiff.model.wsmodel.LogFileUpload; 
    3537import uk.ac.cardiff.model.wsmodel.StatisticalUnitInformation; 
    3638import uk.ac.cardiff.raptormua.engine.MUAEngine; 
     
    178180                                return engine.performStatistic(statisticalUnitInformation.getStatisticParameters().getUnitName()); 
    179181                        } catch (Exception e) { 
    180                                 // TODO either throw as service output, or deal with here 
    181182                                log.error(e.getMessage()); 
    182183                                e.printStackTrace(); 
     
    190191        } 
    191192 
     193        /** 
     194         * Batch upload does not employ a lock on the MUA 
     195         */ 
     196        @Override 
     197        public boolean batchUpload(List<LogFileUpload> uploadFiles) throws SoapFault { 
     198                log.info("Webservice call to parse {} batch log file(s)",uploadFiles.size()); 
     199                for (LogFileUpload logfile : uploadFiles){ 
     200                        log.debug("Log File details: name [{}], MIME type [{}], Length [{}]",new Object[]{logfile.getName(),logfile.getMime(),logfile.getData().length}); 
     201                } 
     202                engine.batchParse(uploadFiles); 
     203                return true; 
     204 
     205        } 
     206 
    192207} 
  • raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/wsinterface/impl/MultiUnitAggregatorImpl.java

    r625 r726  
    1919package uk.ac.cardiff.raptormua.wsinterface.impl; 
    2020 
     21import java.util.List; 
     22 
    2123import javax.jws.WebService; 
    2224 
     
    2931import uk.ac.cardiff.model.wsmodel.Capabilities; 
    3032import uk.ac.cardiff.model.wsmodel.EventPushMessage; 
     33import uk.ac.cardiff.model.wsmodel.LogFileUpload; 
    3134import uk.ac.cardiff.model.wsmodel.StatisticalUnitInformation; 
    3235import uk.ac.cardiff.raptor.remoting.server.sei.MultiUnitAggregator; 
     
    4346        private MUAProcess processService; 
    4447 
    45         /* (non-Javadoc) 
    46          * @see uk.ac.cardiff.raptormua.wsinterface.MultiUnitAggregator#getVersion() 
    47          */ 
    4848        public String getVersion() { 
    4949                return "Alpha"; 
     
    5858        } 
    5959 
    60         /* (non-Javadoc) 
    61          * @see uk.ac.cardiff.sei.MultiUnitAggregator#getCapabilities() 
    62          */ 
    6360        public Capabilities getCapabilities() { 
    6461                // TODO Auto-generated method stub 
     
    6663        } 
    6764 
    68         /* (non-Javadoc) 
    69          * @see uk.ac.cardiff.sei.MultiUnitAggregator#invokeStatisticalUnit(java.lang.String) 
    70          */ 
     65 
    7166        public AggregatorGraphModel invokeStatisticalUnit(String statisticName) throws SoapFault { 
    7267                return processService.performStatistic(statisticName); 
     
    7469 
    7570 
    76         /* (non-Javadoc) 
    77          * @see uk.ac.cardiff.sei.MultiUnitAggregator#setStatisticalUnit(uk.ac.cardiff.model.wsmodel.StatisticalUnitInformation) 
    78          */ 
    7971        @Override 
    8072        public void updateStatisticalUnit(StatisticalUnitInformation statisticalUnitInformation) throws SoapFault { 
     
    8375        } 
    8476 
    85         /* (non-Javadoc) 
    86          * @see uk.ac.cardiff.sei.MultiUnitAggregator#performAdministrativeFunction(uk.ac.cardiff.model.AdministrativeFunction.AdministrativeFunctionType) 
    87          */ 
     77 
    8878        @Override 
    8979        public boolean performAdministrativeFunction(AdministrativeFunction function) throws SoapFault { 
     
    9181        } 
    9282 
    93         /* (non-Javadoc) 
    94          * @see uk.ac.cardiff.sei.MultiUnitAggregator#addAuthentications(uk.ac.cardiff.model.wsmodel.UAEntryPush) 
    95          */ 
     83 
    9684        @Override 
    9785        public void addAuthentications(EventPushMessage pushed) throws SoapFault{ 
     
    10593        } 
    10694 
     95        public boolean batchUpload(List<LogFileUpload> uploadFiles) { 
     96                return processService.batchUpload(uploadFiles); 
     97        } 
     98 
    10799} 
Note: See TracChangeset for help on using the changeset viewer.