Java Doc for LDMSQLPlugin.java in  » Science » Cougaar12_4 » org » cougaar » mlm » plugin » ldm » 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.mlm.plugin.ldm 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.cougaar.mlm.plugin.ldm.LDMEssentialPlugin
   org.cougaar.mlm.plugin.ldm.LDMSQLPlugin

All known Subclasses:   org.cougaar.mlm.plugin.ldm.SQLOplanPlugin,
LDMSQLPlugin
public class LDMSQLPlugin extends LDMEssentialPlugin (Code)
Provide a JDBC binding to an COUGAAR cluster using MB5.0 interfaces. This class replaces the JDBCPlugin. Current use involves runtime creation of LDMObjects at Cluster startup. Future use will involve dynamic, runtime creation of LDMObjects indirectly, via LDMFactory methods. On one side, we present a normal plugin API. On the other side, we parse a "Query file" and talk to JDBC and a set of QueryHandler objects. The plugin expects at least one Plugin parameter (via Plugin.getParameters). The first parameter is interpreted as the name of a "query file". We look for this file first in the current directory and then in $alphome/demo/queries/. Any other parameters are interpreted as query parameter settings, as though they were parsed from a global section of the query file. plugin=org.cougaar.mlm.plugin.sql.LDMSQLPlugin(foo.q, NSN=12345669) The query file is a description of one or more queries to execute on behalf of the plugin. Comment lines (lines starting with '#') and empty lines are ignored. Lines starting with '%' indicate the start of a "query section" and the rest of the line names the QueryHandler class to use. All other lines are of the form "parameter=value" where the parameter values are made available to the current query. Initial parameter settings (before a '%' line) are considered global and are inherited by all following queries. In addition, a special case pseudo-query of "%Global" allows additional entries into the global table. A QueryHandler (for now) names a java class to instantiate for the constructing an SQL expression and then parsing the rows of the results. If the QueryHandler name does not include a '.' character, the parser will prepend the value of the "Package" parameter (which defaults to "org.cougaar.mlm.plugin.sql") in order to resolve the class. See QueryHandler for more information. Reserved QueryFile Parameters: Package Default package for QueryHandler classnames QueryFile the QueryFile of the current Query Driver JDBC driver to use (oracle is already loaded) Database JDBC database descriptor (used in getConnection) Username JDBC Username (also "user") Password JDBC Password (also "password") Also support parameter substitutions in the sql query string. If the QueryHandler returns "select nsn, quantity from nsns where nsn = ':NSN'" the JDBC plugin will substitute the value of parameter NSN for the string :NSN. A colon character may be escaped with a backslash.


Field Summary
protected  StringdbType
    
 DomainServicedomainService
    
protected  PropertiesglobalParameters
    
protected  LoggingServicelog
    
protected  Vectorqueries
    
protected  StringqueryFile
    
protected  PlanningFactorytheFactory
    

Constructor Summary
public  LDMSQLPlugin()
    

Method Summary
public  voidexecute()
    
public  voidexecuteSQL(String rawSql, QueryHandler qh)
    
public  voidfillProperties(Asset anAsset)
    
public  LDMServesPlugingetLDMPlugin()
     This method exposes the protected LDM in the plugin Adapter to the QueryHandler.
public  AssetgetPrototype(String typeid, Class hint)
    
public  AssetgetPrototype(String typeid)
    
protected  voidgrokArguments()
    
protected  voidgrokQueries()
     sort queryhandlers into categories.
protected  voidinitProperties()
    
protected  voidparseQueryFile()
    
protected  voidsetupSubscriptions()
    

Field Detail
dbType
protected String dbType(Code)



domainService
DomainService domainService(Code)



globalParameters
protected Properties globalParameters(Code)



log
protected LoggingService log(Code)



queries
protected Vector queries(Code)



queryFile
protected String queryFile(Code)



theFactory
protected PlanningFactory theFactory(Code)




Constructor Detail
LDMSQLPlugin
public LDMSQLPlugin()(Code)




Method Detail
execute
public void execute()(Code)



executeSQL
public void executeSQL(String rawSql, QueryHandler qh)(Code)



fillProperties
public void fillProperties(Asset anAsset)(Code)



getLDMPlugin
public LDMServesPlugin getLDMPlugin()(Code)
This method exposes the protected LDM in the plugin Adapter to the QueryHandler. Had to name it differently than getLDM() because the plugin adapter version of getLDM() is final.



getPrototype
public Asset getPrototype(String typeid, Class hint)(Code)



getPrototype
public Asset getPrototype(String typeid)(Code)



grokArguments
protected void grokArguments()(Code)



grokQueries
protected void grokQueries()(Code)
sort queryhandlers into categories. PeriodicQueries will get executed synchronously for the first time here.



initProperties
protected void initProperties()(Code)



parseQueryFile
protected void parseQueryFile()(Code)



setupSubscriptions
protected void setupSubscriptions()(Code)



Fields inherited from org.cougaar.mlm.plugin.ldm.LDMEssentialPlugin
Subscriber subscriber(Code)(Java Doc)

Methods inherited from org.cougaar.mlm.plugin.ldm.LDMEssentialPlugin
public void execute()(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.