• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java EPCISBodyType类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中org.fosstrak.epcis.model.EPCISBodyType的典型用法代码示例。如果您正苦于以下问题:Java EPCISBodyType类的具体用法?Java EPCISBodyType怎么用?Java EPCISBodyType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

EPCISBodyType类属于org.fosstrak.epcis.model包,在下文中一共展示了EPCISBodyType类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getDocument

点赞 3

import org.fosstrak.epcis.model.EPCISBodyType; //导入依赖的package包/类
/**
 * @return the assembled EPCIS document.
 */
public EPCISDocumentType getDocument() {
	// create the EPCISDocument
	EPCISDocumentType epcisDoc = new EPCISDocumentType();
	EPCISBodyType epcisBody = new EPCISBodyType();
	EventListType eventList = new EventListType();
	
	for (ObjectEventType objEvent : objectEvents) {
		eventList.getObjectEventOrAggregationEventOrQuantityEvent().
			add(objEvent);
	}
	epcisBody.setEventList(eventList);
	epcisDoc.setEPCISBody(epcisBody);
	epcisDoc.setSchemaVersion(new BigDecimal("1.0"));
	epcisDoc.setCreationDate(getNow());
	return epcisDoc;
}
 

开发者ID:Fosstrak,
项目名称:fosstrak-capturingapp,
代码行数:20,
代码来源:SimpleEPCISDocument.java

示例2: createEpcisDocument

点赞 2

import org.fosstrak.epcis.model.EPCISBodyType; //导入依赖的package包/类
/**
 * Creates a simple EPCIS object event using the API objects from the EPCIS
 * schema.
 */
private static EPCISDocumentType createEpcisDocument() {
	ObjectEventType objEvent = new ObjectEventType();

	// set the eventTime and eventTimeZoneOffset
	XMLGregorianCalendar eventTime = getCurrentDateTime();
	String timeZoneOffset = getTimeZoneOffset(eventTime);
	objEvent.setEventTime(eventTime);
	objEvent.setEventTimeZoneOffset(timeZoneOffset);

	// set the EPCs
	EPC epc = new EPC();
	epc.setValue("urn:epc:id:sgtin:0057000.123780.7788");
	EPCListType epcList = new EPCListType();
	epcList.getEpc().add(epc);
	objEvent.setEpcList(epcList);

	// set the action
	objEvent.setAction(ActionType.ADD);

	// set the bizStep
	objEvent.setBizStep("urn:fosstrak:demo:bizstep:fmcg:production");

	// set the disposition
	objEvent.setDisposition("urn:fosstrak:demo:disp:fmcg:pendingQA");

	// set the readPoint
	ReadPointType readPoint = new ReadPointType();
	readPoint.setId("urn:fosstrak:demo:fmcg:ssl:0037000.00729.210,432");
	objEvent.setReadPoint(readPoint);

	// set the bizLocation
	BusinessLocationType bizLocation = new BusinessLocationType();
	bizLocation.setId("urn:fosstrak:demo:fmcg:ssl:0037000.00729.210");
	objEvent.setBizLocation(bizLocation);

	// optionally add an event field extension
	addEventFieldExtension(objEvent);

	// create the EPCISDocument containing the ObjectEvent
	EPCISDocumentType epcisDoc = new EPCISDocumentType();
	EPCISBodyType epcisBody = new EPCISBodyType();
	EventListType eventList = new EventListType();
	eventList.getObjectEventOrAggregationEventOrQuantityEvent().add(objEvent);
	epcisBody.setEventList(eventList);
	epcisDoc.setEPCISBody(epcisBody);
	epcisDoc.setSchemaVersion(new BigDecimal("1.0"));
	epcisDoc.setCreationDate(eventTime);
	return epcisDoc;
}
 

开发者ID:Fosstrak,
项目名称:fosstrak-epcis,
代码行数:54,
代码来源:SimpleCaptureDemo.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)