Ejemplo n.º 1
0
 /**
  * Gets all the EPCIS events matching the given filters from a given ECPIS repository.
  *
  * @param filters the EPC code
  * @param EPCISAddress the URL of the EPCIS repository
  * @return a list of EPCIS events
  * @throws RemoteException
  */
 public List<EPCISEventType> queryEPCIS(Map<String, String> filters, String EPCISAddress)
     throws IoTaException {
   QueryEPCISRequest in = new QueryEPCISRequest();
   in.setFilters(createQueryParams(filters));
   in.setEPCISAddress(EPCISAddress);
   in.setIdentity(identity);
   QueryEPCISResponse out = port.queryEPCIS(in);
   return EPCISEventTypeHelper.listFromEventList(out.getEventList());
 }
Ejemplo n.º 2
0
 /**
  * Gets all the EPCIS events concerning a given EPC code.
  *
  * @param EPC the EPC code
  * @return a list of EPCIS events
  * @throws RemoteException
  */
 public List<EPCISEventType> traceEPC(String epc) throws IoTaException {
   TraceEPCRequest in = new TraceEPCRequest();
   EPC tepc = new EPC();
   tepc.setValue(epc);
   in.setEpc(tepc);
   in.setIdentity(identity);
   TraceEPCResponse out = port.traceEPC(in);
   return EPCISEventTypeHelper.listFromEventList(out.getEventList());
 }
Ejemplo n.º 3
0
 /**
  * Gets all the EPCIS events concerning a given EPC code from a given ECPIS repository.
  *
  * @param EPC the EPC code
  * @param EPCISAddress the URL of the EPCIS repository
  * @return a list of EPCIS events
  * @throws RemoteException
  */
 public List<EPCISEventType> queryEPCIS(String epc, String EPCISAddress) throws IoTaException {
   QueryEPCISRequest in = new QueryEPCISRequest();
   EPC tepc = new EPC();
   tepc.setValue(epc);
   in.setEpc(tepc);
   in.setEPCISAddress(EPCISAddress);
   in.setIdentity(identity);
   QueryEPCISResponse out = port.queryEPCIS(in);
   return EPCISEventTypeHelper.listFromEventList(out.getEventList());
 }
Ejemplo n.º 4
0
 /**
  * Gets all the EPCIS events sorted by EPCIS concerning a given EPC code.
  *
  * @param EPC the EPC code
  * @return a list of EPCIS events by EPCIS
  * @throws RemoteException
  */
 public Map<String, List<EPCISEventType>> traceEPCByEPCIS(String epc) throws IoTaException {
   TraceEPCByEPCISRequest in = new TraceEPCByEPCISRequest();
   EPC tepc = new EPC();
   tepc.setValue(epc);
   in.setEpc(tepc);
   in.setIdentity(identity);
   TraceEPCByEPCISResponse out = port.traceEPCByEPCIS(in);
   Map<String, List<EPCISEventType>> results = new HashMap<String, List<EPCISEventType>>();
   for (EventsByEPCIS eventsByEPCIS : out.getEventsByEPCIS()) {
     List<EPCISEventType> eventList =
         EPCISEventTypeHelper.listFromEventList(eventsByEPCIS.getEventList());
     results.put(eventsByEPCIS.getEpcisAddress(), eventList);
   }
   return results;
 }