Java Doc for XMLDataHelper.java in  » Science » Cougaar12_4 » org » cougaar » lib » vishnu » client » custom » 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.lib.vishnu.client.custom 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.cougaar.lib.vishnu.client.custom.XMLDataHelper

XMLDataHelper
public class XMLDataHelper implements DataHelper(Code)
Fills in DOM document nodes given Cougaar Objects.


Field Summary
protected  Documentdoc
    
protected  DateendOfWorld
    
 Loggerlogger
    

Constructor Summary
public  XMLDataHelper(Logger logger)
    

Method Summary
public  voidaddListValue(Object parent, String fieldName, String type, Object toAppend)
    
public  voidcreateAvailableScheduleListField(Object object, String name, Asset asset)
     Translates Asset available schedule into equivalent Vishnu XML.
public  voidcreateBooleanField(Object parent, String name, boolean value)
    
public  voidcreateDateField(Object parent, String name, Date date)
     shortcut to create a date field on parent

Translates date into string.

public  ObjectcreateField(Object parent, String parentType, String name)
    
public  voidcreateField(Object parent, String parentType, String name, String value)
    
protected  ObjectcreateFieldPair(String name, String value)
    
public  voidcreateFloatField(Object parent, String name, float value)
    
public  voidcreateGeoloc(Object parent, String parentFieldName, NamedPosition loc)
     Translate a Cougaar GeolocLocation into the equivalent DOM structure.
public  voidcreateLatLon(Object parent, String parentFieldName, LatLonPoint loc)
    
public  ObjectcreateObject(Object parent, String type)
    
public  voidcreateRoleScheduleListField(Object object, String name, Asset asset)
     Translates Asset role schedule into equivalent Vishnu XML.
protected  voidcreateScheduleFields(Collection schedule, Element list, boolean isRole)
     Walk the schedule and append interval elements to the list element for each TimeSpan in the schedule.
public  voidsetDoc(Document doc)
    
public  ObjectstartList(Object object, String name)
    

Field Detail
doc
protected Document doc(Code)



endOfWorld
protected Date endOfWorld(Code)



logger
Logger logger(Code)




Constructor Detail
XMLDataHelper
public XMLDataHelper(Logger logger)(Code)
Sets up endOfWorld variable -- used in createRoleScheduleListField
See Also:   XMLDataHelper.createRoleScheduleListField




Method Detail
addListValue
public void addListValue(Object parent, String fieldName, String type, Object toAppend)(Code)



createAvailableScheduleListField
public void createAvailableScheduleListField(Object object, String name, Asset asset)(Code)
Translates Asset available schedule into equivalent Vishnu XML.

TimeSpans(PlanElements) in the available schedule get translated into Vishnu intervals.

Calls getScheduleFields to do real work.
Parameters:
  object - - the DOM Element to add the name list field to
Parameters:
  name - - the name of the list field
Parameters:
  asset - - the asset with the role schedule
See Also:   XMLDataHelper.createScheduleFields




createBooleanField
public void createBooleanField(Object parent, String name, boolean value)(Code)
shortcut to create a boolean field on parent



createDateField
public void createDateField(Object parent, String name, Date date)(Code)
shortcut to create a date field on parent

Translates date into string.




createField
public Object createField(Object parent, String parentType, String name)(Code)
add a field on parent
Parameters:
  parentType - - ignored, important in DirectDataHelper



createField
public void createField(Object parent, String parentType, String name, String value)(Code)
Generic field creation

adds a field as name-value pair to parent
See Also:   XMLDataHelper.createFieldPair
Parameters:
  parent - SchObject object to add the field to
Parameters:
  parentType - - ignored, important in DirectDataHelper
Parameters:
  name - field name
Parameters:
  value - field's value




createFieldPair
protected Object createFieldPair(String name, String value)(Code)
create field as name-value pair



createFloatField
public void createFloatField(Object parent, String name, float value)(Code)
shortcut to create a float field on parent



createGeoloc
public void createGeoloc(Object parent, String parentFieldName, NamedPosition loc)(Code)
Translate a Cougaar GeolocLocation into the equivalent DOM structure.

Adds a latlong object to the parent object, and adds the geoloc to the parent.
Parameters:
  parent - - the Element to add the parentFieldName geoloc field to
Parameters:
  parentFieldName - - the base name of the geoloc field
Parameters:
  loc - - the Cougaar GeolocLocation to translate into a DOM structure




createLatLon
public void createLatLon(Object parent, String parentFieldName, LatLonPoint loc)(Code)



createObject
public Object createObject(Object parent, String type)(Code)
create a DOM Element of type type
Parameters:
  parent - - Element to attach this new Element to
Parameters:
  type - - type of the new OBJECT Element



createRoleScheduleListField
public void createRoleScheduleListField(Object object, String name, Asset asset)(Code)
Translates Asset role schedule into equivalent Vishnu XML.

TimeSpans(PlanElements) in the role schedule get translated into Vishnu intervals.

Calls getScheduleFields to do real work.
Parameters:
  object - - the DOM Element to add the name list field to
Parameters:
  name - - the name of the list field
Parameters:
  asset - - the asset with the role schedule
See Also:   XMLDataHelper.createScheduleFields
See Also:   org.cougaar.planning.ldm.plan.RoleSchedule




createScheduleFields
protected void createScheduleFields(Collection schedule, Element list, boolean isRole)(Code)
Walk the schedule and append interval elements to the list element for each TimeSpan in the schedule.
Parameters:
  schedule - TimeSpan Collection from the role schedule or available schedule
Parameters:
  list - elem to add interval elements to
Parameters:
  isRole - if true, sets the interval label1 to the Verb of the Task of the TimeSpan/PlanElement
See Also:   org.cougaar.util.TimeSpan
See Also:   org.cougaar.planning.ldm.plan.PlanElement



setDoc
public void setDoc(Document doc)(Code)
set the document that is being created



startList
public Object startList(Object object, String name)(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.