Source Code Cross Referenced for FuelConsumerPGImpl.java in  » Science » Cougaar12_4 » org » cougaar » logistics » ldm » asset » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Science » Cougaar12_4 » org.cougaar.logistics.ldm.asset 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * <copyright>
003:         *  
004:         *  Copyright 1997-2004 BBNT Solutions, LLC
005:         *  under sponsorship of the Defense Advanced Research Projects
006:         *  Agency (DARPA).
007:         * 
008:         *  You can redistribute this software and/or modify it under the
009:         *  terms of the Cougaar Open Source License as published on the
010:         *  Cougaar Open Source Website (www.cougaar.org).
011:         * 
012:         *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
013:         *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
014:         *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
015:         *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
016:         *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
017:         *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
018:         *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
019:         *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
020:         *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
021:         *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
022:         *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
023:         *  
024:         * </copyright>
025:         */
026:
027:        /* @generated Thu Sep 27 15:26:05 EDT 2007 from /u01/builds/cougaar/B12_4/B12_4/070927151721/src/albbn/src/org/cougaar/logistics/ldm/asset/consumerprops.def - DO NOT HAND EDIT */
028:        /** Implementation of FuelConsumerPG.
029:         *  @see FuelConsumerPG
030:         *  @see NewFuelConsumerPG
031:         **/package org.cougaar.logistics.ldm.asset;
032:
033:        import org.cougaar.planning.ldm.measure.*;
034:        import org.cougaar.planning.ldm.asset.*;
035:        import org.cougaar.planning.ldm.plan.*;
036:        import java.util.*;
037:
038:        import org.cougaar.logistics.ldm.MEIPrototypeProvider;
039:        import org.cougaar.logistics.ldm.ClassIConsumerPrototypeProvider;
040:        import org.cougaar.util.TimeSpan;
041:
042:        import java.io.ObjectOutputStream;
043:        import java.io.ObjectInputStream;
044:        import java.io.IOException;
045:        import java.beans.PropertyDescriptor;
046:        import java.beans.IndexedPropertyDescriptor;
047:
048:        public class FuelConsumerPGImpl extends java.beans.SimpleBeanInfo
049:                implements  NewFuelConsumerPG, Cloneable {
050:            public FuelConsumerPGImpl() {
051:            }
052:
053:            // Slots
054:
055:            private Asset theMei;
056:
057:            public Asset getMei() {
058:                return theMei;
059:            }
060:
061:            public void setMei(Asset mei) {
062:                theMei = mei;
063:            }
064:
065:            private String theService;
066:
067:            public String getService() {
068:                return theService;
069:            }
070:
071:            public void setService(String service) {
072:                theService = service;
073:            }
074:
075:            private String theTheater;
076:
077:            public String getTheater() {
078:                return theTheater;
079:            }
080:
081:            public void setTheater(String theater) {
082:                theTheater = theater;
083:            }
084:
085:            private FuelConsumerBG fuelBG = null;
086:
087:            public FuelConsumerBG getFuelBG() {
088:                return fuelBG;
089:            }
090:
091:            public void setFuelBG(FuelConsumerBG _fuelBG) {
092:                if (fuelBG != null)
093:                    throw new IllegalArgumentException("fuelBG already set");
094:                fuelBG = _fuelBG;
095:            }
096:
097:            public void initialize(MEIPrototypeProvider parentPlugin) {
098:                fuelBG.initialize(parentPlugin);
099:            }
100:
101:            public List getPredicates() {
102:                return fuelBG.getPredicates();
103:            }
104:
105:            public Schedule getParameterSchedule(Collection col, TimeSpan span) {
106:                return fuelBG.getParameterSchedule(col, span);
107:            }
108:
109:            public Rate getRate(Asset asset, List params) {
110:                return fuelBG.getRate(asset, params);
111:            }
112:
113:            public Collection getConsumed() {
114:                return fuelBG.getConsumed();
115:            }
116:
117:            public PGDelegate copy(PropertyGroup del) {
118:                return fuelBG.copy(del);
119:            }
120:
121:            public FuelConsumerPGImpl(FuelConsumerPG original) {
122:                theMei = original.getMei();
123:                theService = original.getService();
124:                theTheater = original.getTheater();
125:            }
126:
127:            public boolean equals(Object other) {
128:
129:                if (!(other instanceof  FuelConsumerPG)) {
130:                    return false;
131:                }
132:
133:                FuelConsumerPG otherFuelConsumerPG = (FuelConsumerPG) other;
134:
135:                if (getMei() == null) {
136:                    if (otherFuelConsumerPG.getMei() != null) {
137:                        return false;
138:                    }
139:                } else if (!(getMei().equals(otherFuelConsumerPG.getMei()))) {
140:                    return false;
141:                }
142:
143:                if (getService() == null) {
144:                    if (otherFuelConsumerPG.getService() != null) {
145:                        return false;
146:                    }
147:                } else if (!(getService().equals(otherFuelConsumerPG
148:                        .getService()))) {
149:                    return false;
150:                }
151:
152:                if (getTheater() == null) {
153:                    if (otherFuelConsumerPG.getTheater() != null) {
154:                        return false;
155:                    }
156:                } else if (!(getTheater().equals(otherFuelConsumerPG
157:                        .getTheater()))) {
158:                    return false;
159:                }
160:
161:                if (other instanceof  FuelConsumerPGImpl) {
162:                    if (getFuelBG() == null) {
163:                        if (((FuelConsumerPGImpl) otherFuelConsumerPG)
164:                                .getFuelBG() != null) {
165:                            return false;
166:                        }
167:                    } else if (!(getFuelBG()
168:                            .equals(((FuelConsumerPGImpl) otherFuelConsumerPG)
169:                                    .getFuelBG()))) {
170:                        return false;
171:                    }
172:
173:                }
174:                return true;
175:            }
176:
177:            public boolean hasDataQuality() {
178:                return false;
179:            }
180:
181:            public org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
182:                return null;
183:            }
184:
185:            // static inner extension class for real DataQuality Support
186:            public final static class DQ extends FuelConsumerPGImpl implements 
187:                    org.cougaar.planning.ldm.dq.NewHasDataQuality {
188:                public DQ() {
189:                    super ();
190:                }
191:
192:                public DQ(FuelConsumerPG original) {
193:                    super (original);
194:                }
195:
196:                public Object clone() {
197:                    return new DQ(this );
198:                }
199:
200:                private transient org.cougaar.planning.ldm.dq.DataQuality _dq = null;
201:
202:                public boolean hasDataQuality() {
203:                    return (_dq != null);
204:                }
205:
206:                public org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
207:                    return _dq;
208:                }
209:
210:                public void setDataQuality(
211:                        org.cougaar.planning.ldm.dq.DataQuality dq) {
212:                    _dq = dq;
213:                }
214:
215:                private void writeObject(ObjectOutputStream out)
216:                        throws IOException {
217:                    out.defaultWriteObject();
218:                    if (out instanceof  org.cougaar.core.persist.PersistenceOutputStream)
219:                        out.writeObject(_dq);
220:                }
221:
222:                private void readObject(ObjectInputStream in)
223:                        throws ClassNotFoundException, IOException {
224:                    in.defaultReadObject();
225:                    if (in instanceof  org.cougaar.core.persist.PersistenceInputStream)
226:                        _dq = (org.cougaar.planning.ldm.dq.DataQuality) in
227:                                .readObject();
228:                }
229:
230:                private final static PropertyDescriptor properties[] = new PropertyDescriptor[1];
231:                static {
232:                    try {
233:                        properties[0] = new PropertyDescriptor("dataQuality",
234:                                DQ.class, "getDataQuality", null);
235:                    } catch (Exception e) {
236:                        e.printStackTrace();
237:                    }
238:                }
239:
240:                public PropertyDescriptor[] getPropertyDescriptors() {
241:                    PropertyDescriptor[] pds = super .properties;
242:                    PropertyDescriptor[] ps = new PropertyDescriptor[pds.length
243:                            + properties.length];
244:                    System.arraycopy(pds, 0, ps, 0, pds.length);
245:                    System.arraycopy(properties, 0, ps, pds.length,
246:                            properties.length);
247:                    return ps;
248:                }
249:            }
250:
251:            private transient FuelConsumerPG _locked = null;
252:
253:            public PropertyGroup lock(Object key) {
254:                if (_locked == null)
255:                    _locked = new _Locked(key);
256:                return _locked;
257:            }
258:
259:            public PropertyGroup lock() {
260:                return lock(null);
261:            }
262:
263:            public NewPropertyGroup unlock(Object key) {
264:                return this ;
265:            }
266:
267:            public Object clone() throws CloneNotSupportedException {
268:                FuelConsumerPGImpl _tmp = new FuelConsumerPGImpl(this );
269:                if (fuelBG != null) {
270:                    _tmp.fuelBG = (FuelConsumerBG) fuelBG.copy(_tmp);
271:                }
272:                return _tmp;
273:            }
274:
275:            public PropertyGroup copy() {
276:                try {
277:                    return (PropertyGroup) clone();
278:                } catch (CloneNotSupportedException cnse) {
279:                    return null;
280:                }
281:            }
282:
283:            public Class getPrimaryClass() {
284:                return primaryClass;
285:            }
286:
287:            public String getAssetGetMethod() {
288:                return assetGetter;
289:            }
290:
291:            public String getAssetSetMethod() {
292:                return assetSetter;
293:            }
294:
295:            private final static PropertyDescriptor properties[] = new PropertyDescriptor[3];
296:            static {
297:                try {
298:                    properties[0] = new PropertyDescriptor("mei",
299:                            FuelConsumerPG.class, "getMei", null);
300:                    properties[1] = new PropertyDescriptor("service",
301:                            FuelConsumerPG.class, "getService", null);
302:                    properties[2] = new PropertyDescriptor("theater",
303:                            FuelConsumerPG.class, "getTheater", null);
304:                } catch (Exception e) {
305:                    org.cougaar.util.log.Logging
306:                            .getLogger(FuelConsumerPG.class).error(
307:                                    "Caught exception", e);
308:                }
309:            }
310:
311:            public PropertyDescriptor[] getPropertyDescriptors() {
312:                return properties;
313:            }
314:
315:            private final class _Locked extends java.beans.SimpleBeanInfo
316:                    implements  FuelConsumerPG, Cloneable, LockedPG {
317:                private transient Object theKey = null;
318:
319:                _Locked(Object key) {
320:                    if (this .theKey == null)
321:                        this .theKey = key;
322:                }
323:
324:                public _Locked() {
325:                }
326:
327:                public PropertyGroup lock() {
328:                    return this ;
329:                }
330:
331:                public PropertyGroup lock(Object o) {
332:                    return this ;
333:                }
334:
335:                public NewPropertyGroup unlock(Object key)
336:                        throws IllegalAccessException {
337:                    if (theKey.equals(key)) {
338:                        return FuelConsumerPGImpl.this ;
339:                    } else {
340:                        throw new IllegalAccessException(
341:                                "unlock: mismatched internal and provided keys!");
342:                    }
343:                }
344:
345:                public PropertyGroup copy() {
346:                    try {
347:                        return (PropertyGroup) clone();
348:                    } catch (CloneNotSupportedException cnse) {
349:                        return null;
350:                    }
351:                }
352:
353:                public Object clone() throws CloneNotSupportedException {
354:                    FuelConsumerPGImpl _tmp = new FuelConsumerPGImpl(this );
355:                    if (fuelBG != null) {
356:                        _tmp.fuelBG = (FuelConsumerBG) fuelBG.copy(_tmp);
357:                    }
358:                    return _tmp;
359:                }
360:
361:                public boolean equals(Object object) {
362:                    return FuelConsumerPGImpl.this .equals(object);
363:                }
364:
365:                public Asset getMei() {
366:                    return FuelConsumerPGImpl.this .getMei();
367:                }
368:
369:                public String getService() {
370:                    return FuelConsumerPGImpl.this .getService();
371:                }
372:
373:                public String getTheater() {
374:                    return FuelConsumerPGImpl.this .getTheater();
375:                }
376:
377:                public void initialize(MEIPrototypeProvider parentPlugin) {
378:                    FuelConsumerPGImpl.this .initialize(parentPlugin);
379:                }
380:
381:                public List getPredicates() {
382:                    return FuelConsumerPGImpl.this .getPredicates();
383:                }
384:
385:                public Schedule getParameterSchedule(Collection col,
386:                        TimeSpan span) {
387:                    return FuelConsumerPGImpl.this .getParameterSchedule(col,
388:                            span);
389:                }
390:
391:                public Rate getRate(Asset asset, List params) {
392:                    return FuelConsumerPGImpl.this .getRate(asset, params);
393:                }
394:
395:                public Collection getConsumed() {
396:                    return FuelConsumerPGImpl.this .getConsumed();
397:                }
398:
399:                public PGDelegate copy(PropertyGroup del) {
400:                    return FuelConsumerPGImpl.this .copy(del);
401:                }
402:
403:                public final boolean hasDataQuality() {
404:                    return FuelConsumerPGImpl.this .hasDataQuality();
405:                }
406:
407:                public final org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
408:                    return FuelConsumerPGImpl.this .getDataQuality();
409:                }
410:
411:                public Class getPrimaryClass() {
412:                    return primaryClass;
413:                }
414:
415:                public String getAssetGetMethod() {
416:                    return assetGetter;
417:                }
418:
419:                public String getAssetSetMethod() {
420:                    return assetSetter;
421:                }
422:
423:                public PropertyDescriptor[] getPropertyDescriptors() {
424:                    return properties;
425:                }
426:
427:                public Class getIntrospectionClass() {
428:                    return FuelConsumerPGImpl.class;
429:                }
430:
431:            }
432:
433:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.