Java Doc for ParseKickstart.java in  » Workflow-Engines » pegasus-2.1.0 » org » griphyn » vdl » directive » 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 » Workflow Engines » pegasus 2.1.0 » org.griphyn.vdl.directive 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.griphyn.vdl.directive.Directive
      org.griphyn.vdl.directive.ParseKickstart

ParseKickstart
public class ParseKickstart extends Directive (Code)
Main objective of this class is to extract the exit status from the invocation record returned by kickstart. The expected usage is another Java class passing a filename, and obtaining the cooked exit status for the parse. All other details, like removing non-XML header and tailers, de-concatenation, are handled internally.

Usage of the class is divided into typically three steps. The first step is to obtain an instance of the the parser, and configure it to fit your needs.

 ParseKickstart pks = new ParseKickstart();
 ... // set flags
 pks.setDatabaseSchema( ptcschema );
 
The next step can be executed multiple times, and parse one or more kickstart output files.

 List result = null;
 try {
 result = pks.parseFile( file );
 } catch ( FriendlyNudge fn ) {
 // handle failures
 }
 
Once you are definitely done, it is recommend to dis-associate yourself from the active database connection.

 pks.close();
 pks = null;
 

author:
   Jens-S. Vöckler
author:
   Yong Zhao
version:
   $Revision: 50 $
See Also:   org.griphyn.vdl.toolkit.ExitCode
See Also:   org.griphyn.vdl.parser.InvocationParser



Constructor Summary
public  ParseKickstart()
     Default c'tor.
public  ParseKickstart(DatabaseSchema dbschema)
     C'tor which permits the setting of a PTC connection.
public  ParseKickstart(DatabaseSchema dbschema, boolean emptyFail)
     C'tor which permits the setting of a PTC connection.

Method Summary
public  voidclose()
     Closes the associated database backend and invalidates the schema.
public  intdetermineExitStatus(InvocationRecord ivr)
     Determines the exit code of an invocation record.
public  ListextractToMemory(java.io.File input)
     Extracts records from the given input file.
public  booleangetEmptyFail()
     Obtains the fail-on-empty-file value.
public  booleangetIgnoreDBFail()
     Obtains a dont-fail-on-database-errors mode.
public  booleangetNoDBase()
     Gets the variable to permit connections to the PTC, or use parse-only mode.
public  StringgetWorkflowLabel()
     Obtains the current value of the workflow label to use.
public  DategetWorkflowTimestamp()
     Obtains the current value of the workflow modification time to use.
public  ListparseFile(String arg0)
     Parses the contents of a kickstart output file, and returns a list of exit codes obtains from the records.
public  voidsetDatabaseSchema(DatabaseSchema dbschema)
     Sets the database schema.
public  voidsetEmptyFail(boolean emptyFail)
     Sets the fail-on-empty-file value.
Parameters:
  emptyFail - contains the new value, if to fail on empty files.
public  voidsetIgnoreDBFail(boolean ignore)
     Sets the dont-fail-on-dbase-errors mode.
public  voidsetNoDBase(boolean noDBase)
     Sets the parse-only versus PTC mode.
public  voidsetWorkflowLabel(String label)
     Sets the workflow label.
public  voidsetWorkflowTimestamp(Date mtime)
     Sets the workflow modification time to record.


Constructor Detail
ParseKickstart
public ParseKickstart() throws IOException, MissingResourceException(Code)
Default c'tor.



ParseKickstart
public ParseKickstart(DatabaseSchema dbschema) throws IOException, MissingResourceException(Code)
C'tor which permits the setting of a PTC connection.
Parameters:
  dbschema - is the database schema to use for the PTC.



ParseKickstart
public ParseKickstart(DatabaseSchema dbschema, boolean emptyFail) throws IOException, MissingResourceException(Code)
C'tor which permits the setting of a PTC connection.
Parameters:
  dbschema - is the database schema to use for the PTC.
Parameters:
  emptyFail - determines, if empty input files are error or OK.




Method Detail
close
public void close() throws SQLException(Code)
Closes the associated database backend and invalidates the schema.



determineExitStatus
public int determineExitStatus(InvocationRecord ivr)(Code)
Determines the exit code of an invocation record. Currently, we will determine the exit code from all jobs until failure or no more jobs. However, set-up and clean-up jobs are ignored.
Parameters:
  ivr - is the invocation record to put into the database the status code as exit code to signal failure etc.
0   regular exit with exit code 01   regular exit with exit code > 02   failure to run program from kickstart3   application had died on signal4   application was suspended (should not happen)5   failure in exit code parsing6   impossible case



extractToMemory
public List extractToMemory(java.io.File input) throws FriendlyNudge(Code)
Extracts records from the given input file. Since there may be more than one record per file, especially in the case of MPI, multiple results are possible, though traditionally only one will be used.
Parameters:
  input - is the name of the file that contains the records a list of strings, each representing one invocation record.The result should not be empty (exception will be thrown).
throws:
  FriendlyNudge - , if the input format was invalid.The caller has to assume failure to parse the record provided.



getEmptyFail
public boolean getEmptyFail()(Code)
Obtains the fail-on-empty-file value. true, if to fail on empty files.
See Also:   ParseKickstart.setEmptyFail(boolean)



getIgnoreDBFail
public boolean getIgnoreDBFail()(Code)
Obtains a dont-fail-on-database-errors mode. true, if database failures are not fatal.
See Also:   ParseKickstart.setIgnoreDBFail(boolean)



getNoDBase
public boolean getNoDBase()(Code)
Gets the variable to permit connections to the PTC, or use parse-only mode. true, if the PTC is intended to be used, false forparse-only mode.
See Also:   ParseKickstart.setNoDBase(boolean)



getWorkflowLabel
public String getWorkflowLabel()(Code)
Obtains the current value of the workflow label to use. current workflow label to use, may be null.
See Also:   ParseKickstart.setWorkflowLabel(String)



getWorkflowTimestamp
public Date getWorkflowTimestamp()(Code)
Obtains the current value of the workflow modification time to use. current workflow mtime, may be null.
See Also:   ParseKickstart.setWorkflowTimestamp(Date)



parseFile
public List parseFile(String arg0) throws FriendlyNudge, IOException, SQLException(Code)
Parses the contents of a kickstart output file, and returns a list of exit codes obtains from the records.
Parameters:
  arg0 - is the name of the file to read a list with one or more exit code, one for each record.
throws:
  FriendlyNudge - , if parsing of the file goes hay-wire.
throws:
  IOException - if something happens while reading propertiesto instantiate the XML parser.
throws:
  SQLException - if accessing the database fails.



setDatabaseSchema
public void setDatabaseSchema(DatabaseSchema dbschema)(Code)
Sets the database schema.
Parameters:
  dbschema - is a database schema instance for the PTC.



setEmptyFail
public void setEmptyFail(boolean emptyFail)(Code)
Sets the fail-on-empty-file value.
Parameters:
  emptyFail - contains the new value, if to fail on empty files.
See Also:   ParseKickstart.getEmptyFail()



setIgnoreDBFail
public void setIgnoreDBFail(boolean ignore)(Code)
Sets the dont-fail-on-dbase-errors mode.
Parameters:
  ignore - is true to render database error non-fatal.
See Also:   ParseKickstart.getIgnoreDBFail()



setNoDBase
public void setNoDBase(boolean noDBase)(Code)
Sets the parse-only versus PTC mode.
Parameters:
  noDBase - is true to use the parse-only mode.
See Also:   ParseKickstart.getNoDBase()



setWorkflowLabel
public void setWorkflowLabel(String label)(Code)
Sets the workflow label.
Parameters:
  label - is the (new) workflow label.
See Also:   ParseKickstart.getWorkflowLabel()



setWorkflowTimestamp
public void setWorkflowTimestamp(Date mtime)(Code)
Sets the workflow modification time to record.
Parameters:
  mtime - is the (new) workflow mtime.
See Also:   ParseKickstart.getWorkflowTimestamp()



Fields inherited from org.griphyn.vdl.directive.Directive
protected Logging m_logger(Code)(Java Doc)
protected ChimeraProperties m_props(Code)(Java Doc)
protected boolean m_verbose(Code)(Java Doc)

Methods inherited from org.griphyn.vdl.directive.Directive
public Logging getLogger()(Code)(Java Doc)
public ChimeraProperties getProperties()(Code)(Java Doc)
public boolean getVerbose()(Code)(Java Doc)
public void setLogger(Logging logger)(Code)(Java Doc)
public void setProperties(ChimeraProperties props)(Code)(Java Doc)
public void setVerbose(boolean v)(Code)(Java Doc)

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.