001: /*
002: * <Copyright>
003: * BBNT SOLUTIONS LLC PROPRIETARY
004: * Data contained in this document is proprietary to BBNT SOLUTIONS LLC
005: * (BBN) or others from whom BBN has acquired such data and shall not be
006: * copied, used or disclosed, in whole or in part, by Northrop Grumman
007: * Space & Mission Systems Corp. (Northrop Grumman) and The Boeing
008: * Company (Boeing) or any other non-US Government entity, for any
009: * purpose other than Boeing's performance of its obligations to the
010: * United States Government under Prime Contract No. DAAE07-03-9-F001
011: * without the prior express written permission of BBN.
012: *
013: * EXPORT CONTROL WARNING
014: * This document contains technical data whose export is restricted by
015: * the Arms Export Control Act (Title 22, U.S.C. Section 2751 et. seq.),
016: * and the International Traffic in Arms Regulations (ITAR) or Executive
017: * order 12470 of the United States of America. Violation of these export
018: * laws is subject to severe criminal penalties.
019: *
020: * GOVERNMENT PURPOSE RIGHTS (US Government Only)
021: * Contract No.: DAAE07-03-9-F001 (Boeing Prime Contract)
022: * Subcontract No.: 51300JAW3S (BBN subcontract under Northrop Grumman)
023: * Contractor Name: BBNT Solutions LLC under subcontract
024: * to Northrop Grumman Space & Mission Systems Corp.
025: * Contractor Address: 10 Moulton Street, Cambridge MA 02138 USA
026: * Expiration Date: None (Perpetual)
027: *
028: * The Government is granted Government Purpose Rights to this Data or
029: * Software. The Government rights to use, modify, reproduce, release,
030: * perform, display or disclose these technical data is subject to the
031: * restriction as stated in Agreement DAAE07-03-9-F001 between the Boeing
032: * Company and the Government. No restrictions apply after the
033: * expiration date shown above. Any reproduction of the technical data
034: * or portions thereof marked with this legend must also reproduce the
035: * markings.
036: *
037: * Copyright © BBNT Solutions LLC. All Rights Reserved
038: * </copyright>
039: */
040: package org.cougaar.logistics.ui.inventory.data;
041:
042: import org.cougaar.logistics.ui.inventory.data.InventoryData;
043: import org.cougaar.logistics.ui.inventory.data.InventoryScheduleElement;
044: import org.cougaar.logistics.ui.inventory.data.InventoryScheduleHeader;
045: import org.cougaar.logistics.ui.inventory.InventoryChartBaseCalendar;
046: import org.cougaar.logistics.plugin.inventory.TimeUtils;
047: import org.cougaar.logistics.plugin.inventory.LogisticsInventoryFormatter;
048: import org.cougaar.planning.ldm.plan.Schedule;
049:
050: import java.util.ArrayList;
051: import java.util.Collection;
052: import java.util.Iterator;
053: import java.text.ParseException;
054:
055: public class BlankInventoryData extends InventoryData {
056:
057: public static final long HOURLY = TimeUtils.MSEC_PER_HOUR;
058:
059: public BlankInventoryData(String assetName, String orgName) {
060: super (assetName, orgName, "", "", "", getFakeCTime(), "");
061: initialize();
062: }
063:
064: public void initialize() {
065: InventoryScheduleHeader newSchedule = new InventoryScheduleHeader(
066: LogisticsInventoryFormatter.COUNTED_PROJECTWITHDRAW_TASKS_TAG,
067: LogisticsInventoryFormatter.PROJ_TASKS_TYPE,
068: new ArrayList());
069: addSchedule(newSchedule);
070: newSchedule = new InventoryScheduleHeader(
071: LogisticsInventoryFormatter.COUNTED_PROJECTWITHDRAW_TASK_ARS_TAG,
072: LogisticsInventoryFormatter.PROJ_ARS_TYPE,
073: new ArrayList());
074: addSchedule(newSchedule);
075:
076: newSchedule = new InventoryScheduleHeader(
077: LogisticsInventoryFormatter.PROJECTWITHDRAW_TASKS_TAG,
078: LogisticsInventoryFormatter.PROJ_TASKS_TYPE,
079: new ArrayList());
080: addSchedule(newSchedule);
081: newSchedule = new InventoryScheduleHeader(
082: LogisticsInventoryFormatter.PROJECTWITHDRAW_TASK_ARS_TAG,
083: LogisticsInventoryFormatter.PROJ_ARS_TYPE,
084: new ArrayList());
085: addSchedule(newSchedule);
086: newSchedule = new InventoryScheduleHeader(
087: LogisticsInventoryFormatter.WITHDRAW_TASKS_TAG,
088: LogisticsInventoryFormatter.TASKS_TYPE, new ArrayList());
089: addSchedule(newSchedule);
090:
091: newSchedule = new InventoryScheduleHeader(
092: LogisticsInventoryFormatter.WITHDRAW_TASK_ARS_TAG,
093: LogisticsInventoryFormatter.ARS_TYPE, new ArrayList());
094: addSchedule(newSchedule);
095:
096: newSchedule = new InventoryScheduleHeader(
097: LogisticsInventoryFormatter.PROJECTSUPPLY_TASKS_TAG,
098: LogisticsInventoryFormatter.PROJ_TASKS_TYPE,
099: new ArrayList());
100: addSchedule(newSchedule);
101:
102: newSchedule = new InventoryScheduleHeader(
103: LogisticsInventoryFormatter.PROJECTSUPPLY_TASK_ARS_TAG,
104: LogisticsInventoryFormatter.PROJ_ARS_TYPE,
105: new ArrayList());
106: addSchedule(newSchedule);
107:
108: newSchedule = new InventoryScheduleHeader(
109: LogisticsInventoryFormatter.SUPPLY_TASKS_TAG,
110: LogisticsInventoryFormatter.TASKS_TYPE, new ArrayList());
111: addSchedule(newSchedule);
112:
113: newSchedule = new InventoryScheduleHeader(
114: LogisticsInventoryFormatter.SUPPLY_TASK_ARS_TAG,
115: LogisticsInventoryFormatter.ARS_TYPE, new ArrayList());
116: addSchedule(newSchedule);
117:
118: newSchedule = new InventoryScheduleHeader(
119: LogisticsInventoryFormatter.RESUPPLY_PROJECTSUPPLY_TASKS_TAG,
120: LogisticsInventoryFormatter.PROJ_TASKS_TYPE,
121: new ArrayList());
122: addSchedule(newSchedule);
123: newSchedule = new InventoryScheduleHeader(
124: LogisticsInventoryFormatter.RESUPPLY_PROJECTSUPPLY_TASK_ARS_TAG,
125: LogisticsInventoryFormatter.PROJ_ARS_TYPE,
126: new ArrayList());
127: addSchedule(newSchedule);
128: newSchedule = new InventoryScheduleHeader(
129: LogisticsInventoryFormatter.RESUPPLY_SUPPLY_TASKS_TAG,
130: LogisticsInventoryFormatter.TASKS_TYPE, new ArrayList());
131: addSchedule(newSchedule);
132: newSchedule = new InventoryScheduleHeader(
133: LogisticsInventoryFormatter.RESUPPLY_SUPPLY_TASK_ARS_TAG,
134: LogisticsInventoryFormatter.ARS_TYPE, new ArrayList());
135: addSchedule(newSchedule);
136:
137: newSchedule = new InventoryScheduleHeader(
138: LogisticsInventoryFormatter.INVENTORY_LEVELS_TAG,
139: LogisticsInventoryFormatter.LEVELS_TYPE,
140: new ArrayList());
141: addSchedule(newSchedule);
142:
143: }
144:
145: public long getBucketSize() {
146: return HOURLY;
147: }
148:
149: protected static long getFakeCTime() {
150: return InventoryChartBaseCalendar.getBaseTime();
151: }
152: }
|