@Test public void testRegArimaRequests() { long t0 = System.currentTimeMillis(); int N = 3; XmlRegArimaRequests requests = new XmlRegArimaRequests(); for (int i = 0; i < N; ++i) { XmlRegArimaAtomicRequest cur = new XmlRegArimaAtomicRequest(); cur.defaultSpecification = "RG5c"; cur.series = new XmlTs(); XmlTsData.MARSHALLER.marshal(Data.P, cur.series); requests.getItems().add(cur); } requests.getOutputFilter().add("likelihood.*"); X13XmlProcessor processor = new X13XmlProcessor(); XmlInformationSet rslt = processor.process(requests); long t1 = System.currentTimeMillis(); InformationSet all = rslt.create(); for (int i = 0; i < N; ++i) { assertTrue(null != all.search("series" + (i + 1) + ".likelihood.aic", Double.class)); } }
public XmlInformationSet process(XmlRegArimaRequest request) { RegArimaSpecification spec = specification(request); Ts s = XmlTs.TS_UNMARSHALLER.unmarshal(request.series); if (s == null) { return null; } if (s.hasData() == TsStatus.Undefined) { s.load(TsInformationType.Data); } if (spec == null || s.getTsData() == null) { return null; } ProcessingContext ctx = context(request.context); IProcessing<TsData, PreprocessingModel> processing = RegArimaProcessingFactory.instance.generateProcessing(spec, ctx); PreprocessingModel model = processing.process(s.getTsData()); TreeSet<String> set = new TreeSet<>(); List<String> items = request.getOutputFilter(); set.addAll(items); InformationSet info = InformationSetHelper.fromProcResults(model, set); XmlInformationSet xinfo = new XmlInformationSet(); if (request.getFlat()) { xinfo.flatCopy(info); } else { xinfo.copy(info); } return xinfo; }
X13XmlProcessor { public XmlInformationSet process(XmlRegArimaRequest request) { RegArimaSpecification spec = specification(request); Ts s = XmlTs.TS_UNMARSHALLER.unmarshal(request.series); if (s == null) { return null; } if (s.hasData() == TsStatus.Undefined) { s.load(TsInformationType.Data); } if (spec == null || s.getTsData() == null) { return null; } ProcessingContext ctx = context(request.context); IProcessing<TsData, PreprocessingModel> processing = RegArimaProcessingFactory.instance.generateProcessing(spec, ctx); PreprocessingModel model = processing.process(s.getTsData()); TreeSet<String> set = new TreeSet<>(); List<String> items = request.getOutputFilter(); set.addAll(items); InformationSet info = InformationSetHelper.fromProcResults(model, set); XmlInformationSet xinfo = new XmlInformationSet(); if (request.getFlat()) { xinfo.flatCopy(info); } else { xinfo.copy(info); } return xinfo; } }
X13XmlProcessor { public XmlInformationSet process(XmlRegArimaRequest request) { RegArimaSpecification spec = specification(request); Ts s = XmlTs.TS_UNMARSHALLER.unmarshal(request.series); if (s == null) { return null; } if (s.hasData() == TsStatus.Undefined) { s.load(TsInformationType.Data); } if (spec == null || s.getTsData() == null) { return null; } ProcessingContext ctx = context(request.context); IProcessing<TsData, PreprocessingModel> processing = RegArimaProcessingFactory.instance.generateProcessing(spec, ctx); PreprocessingModel model = processing.process(s.getTsData()); TreeSet<String> set = new TreeSet<>(); List<String> items = request.getOutputFilter(); set.addAll(items); InformationSet info = InformationSetHelper.fromProcResults(model, set); XmlInformationSet xinfo = new XmlInformationSet(); if (request.getFlat()) { xinfo.flatCopy(info); } else { xinfo.copy(info); } return xinfo; }  }
X13XmlProcessor { public XmlInformationSet process(XmlRegArimaRequest request) { RegArimaSpecification spec = specification(request); Ts s = XmlTs.TS_UNMARSHALLER.unmarshal(request.series); if (s == null) { return null; } if (s.hasData() == TsStatus.Undefined) { s.load(TsInformationType.Data); } if (spec == null || s.getTsData() == null) { return null; } ProcessingContext ctx = context(request.context); IProcessing<TsData, PreprocessingModel> processing = RegArimaProcessingFactory.instance.generateProcessing(spec, ctx); PreprocessingModel model = processing.process(s.getTsData()); TreeSet<String> set = new TreeSet<>(); List<String> items = request.getOutputFilter(); set.addAll(items); InformationSet info = InformationSetHelper.fromProcResults(model, set); XmlInformationSet xinfo = new XmlInformationSet(); if (request.getFlat()) { xinfo.flatCopy(info); } else { xinfo.copy(info); } return xinfo; }  XmlInformationSet process(XmlRegArimaRequest request); XmlInformationSet process(XmlX13Request request); XmlInformationSet process(final XmlRegArimaRequests request); XmlInformationSet process(XmlX13Requests request); static RegArimaSpecification specification(XmlRegArimaAtomicRequest request); static ProcessingContext context(XmlProcessingContext ctx); static X13Specification specification(XmlX13AtomicRequest request); }
X13XmlProcessor { public XmlInformationSet process(XmlRegArimaRequest request) { RegArimaSpecification spec = specification(request); Ts s = XmlTs.TS_UNMARSHALLER.unmarshal(request.series); if (s == null) { return null; } if (s.hasData() == TsStatus.Undefined) { s.load(TsInformationType.Data); } if (spec == null || s.getTsData() == null) { return null; } ProcessingContext ctx = context(request.context); IProcessing<TsData, PreprocessingModel> processing = RegArimaProcessingFactory.instance.generateProcessing(spec, ctx); PreprocessingModel model = processing.process(s.getTsData()); TreeSet<String> set = new TreeSet<>(); List<String> items = request.getOutputFilter(); set.addAll(items); InformationSet info = InformationSetHelper.fromProcResults(model, set); XmlInformationSet xinfo = new XmlInformationSet(); if (request.getFlat()) { xinfo.flatCopy(info); } else { xinfo.copy(info); } return xinfo; }  XmlInformationSet process(XmlRegArimaRequest request); XmlInformationSet process(XmlX13Request request); XmlInformationSet process(final XmlRegArimaRequests request); XmlInformationSet process(XmlX13Requests request); static RegArimaSpecification specification(XmlRegArimaAtomicRequest request); static ProcessingContext context(XmlProcessingContext ctx); static X13Specification specification(XmlX13AtomicRequest request);  }