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


java.lang.Object
   org.griphyn.vdl.dbschema.DatabaseSchema
      org.griphyn.vdl.dbschema.AnnotationSchema

AnnotationSchema
public class AnnotationSchema extends DatabaseSchema implements Advanced,Annotation(Code)
This class provides basic functionalities to interact with the backend database, such as insertion, deletion, and search. While the main database layout for storing definitions is derived from the "chunk" schema with minor improvements, the database layout of the annotations is shown in the following figure:

annotation schema

The central five elements that can receive annotations, all depend on the same sequence generator for their primary key. Their secondary key references the definition in question, or otherwise qualifies the element to annotate. Note that logical filenames can be annotated outside of any definitions.

Grouped along the outer edges, five primary data type tables store annotations efficiently. The distinction into separate data types is necessary to enable efficient searches and appropriate operations. Their primary key is also a foreign key referencing the five central elements.
author:
   Jens-S. Vöckler
author:
   Yong Zhao
version:
   $Revision: 50 $



Field Summary
final protected static  String[]c_lfn_names
     Name of the four parameter tables in human readable format.
protected  Cachem_cache
     A cache for definitions to avoid reloading from the database.
protected  booleanm_deferDeleteCommit
     Communication between saveDefinition and deleteDefinition in update mode.

Constructor Summary
public  AnnotationSchema(String dbDriverName)
     Default constructor for the "chunk" schema.

Method Summary
public  ResultSetbackdoor(String query)
     A too generic method to search annotation (and anything) in the database.
public  booleancontainsDefinition(Definition definition)
     Search the database for the existence of a definition.
public  booleandeleteAnnotation(String primary, Object secondary, int kind, String key)
     Deletes an annotation with the specified key.
Parameters:
  primary - is the primary object specifier for the class.
public  booleandeleteAnnotationCall(String fqdi, int index, String key)
     Deletes a specific key for a call statement.
public  booleandeleteAnnotationDeclare(String fqdi, String farg, String key)
     Deletes a specific key in an annotated formal argument.
public  booleandeleteAnnotationDerivation(String fqdi, String key)
     Deletes a specific key in an annotated derivation.
public  booleandeleteAnnotationFilename(String filename, String key)
     Deletes a specific key in an annotated filename.
public  booleandeleteAnnotationTransformation(String fqdi, String key)
     Deletes a specific key in an annotated transformation.
public  booleandeleteDefinition(Definition definition)
     Delete a specific Definition objects from the database.
public  java.util.ListdeleteDefinition(String namespace, String name, String version, int type)
     Delete Definition objects from the database.
public  java.util.ListdeleteDefinitionEx(String namespace, String name, String version, int type)
     Delete one or more definitions from the backend database.
protected  LonggetDefinitionId(Definition d)
     Obtains the primary key id for a given definition.
protected  java.util.ListgetDefinitionId(String namespace, String name, String version, int type)
     Obtains the list of primary key ids for a matching definitions. This method allows for wildcards in the usual fashion.
protected  java.util.ListgetDefinitionIdEx(String namespace, String name, String version, int type)
     Obtains the list of primary key ids for a matching definitions. This method allows for wildcards in the usual fashion.
public  java.util.ListgetFQDNList(int type)
     Searches the database for a list of fully-qualified names of the definitions sorted in ascending order.
public  java.util.ListgetNamespaceList(int type)
     Searches the database for a list of namespaces of the definitions Sorted in ascending order.
protected  LonggetSpecificDefinitionId(String namespace, String name, String version, int type)
     Obtains the primary key id for a given definition.
public  TupleloadAnnotation(String primary, Object secondary, int kind, String key)
     Retrieves a specific annotation from an annotatable classes with the specified tuple.
public  java.util.ListloadAnnotation(String primary, Object secondary, int kind)
     Retrieves all annotations from an annotatable classes with the specified tuple.
public  TupleloadAnnotationCall(String fqdi, int index, String key)
     Obtains the value to a specific key for a call statement.
public  java.util.ListloadAnnotationCall(String fqdi, int index)
     Lists all annotations for a call statement.
Parameters:
  fqdi - is the FQDI of the transformation
Parameters:
  index - is the number of the call to annotate.
public  TupleloadAnnotationDeclare(String fqdi, String farg, String key)
     Obtains the value to a specific key in an annotated formal argument.
public  java.util.ListloadAnnotationDeclare(String fqdi, String farg)
     Lists all annotations for a formal argument.
public  TupleloadAnnotationDerivation(String fqdi, String key)
     Obtains the value to a specific key in an annotated derivation.
public  java.util.ListloadAnnotationDerivation(String fqdi)
     Lists all annotations for a derivation.
public  TupleloadAnnotationFilename(String filename, String key)
     Obtains the value to a specific key in an annotated filename.
public  java.util.ListloadAnnotationFilename(String filename)
     Lists all annotations for a logical filename.
Parameters:
  filename - is the logical filename.
public  TupleloadAnnotationTransformation(String fqdi, String key)
     Obtains the value to a specific key in an annotated transformation.
public  java.util.ListloadAnnotationTransformation(String fqdi)
     Lists all annotations for a transformation.
public  DefinitionloadDefinition(String namespace, String name, String version, int type)
     Loads a single Definition from the backend database into an Java object. This method does not allow wildcarding!
Parameters:
  namespace - namespace, null will be converted into empty string
Parameters:
  name - name, null will be converted into empty string
Parameters:
  version - version, null will be converted into empty string
Parameters:
  type - type of the definition (TR or DV), must not be -1.
public  longsaveAnnotation(String primary, Object secondary, int kind, Tuple annotation, boolean overwrite)
     Annotates any of the annotatable classes with the specified tuple. This is an interface method to the various class-specific methods.
Parameters:
  primary - is the primary object specifier for the class.
public  longsaveAnnotationCall(String fqdi, int index, Tuple annotation, boolean overwrite)
     Annotates a transformation call with a tuple.
Parameters:
  fqdi - is the FQDI to annotate
Parameters:
  index - is the number of the call to annotate.
Parameters:
  annotation - is the value to place
Parameters:
  overwrite - is a predicate on replace or maintain.
public  longsaveAnnotationDeclare(String fqdi, String formalname, Tuple annotation, boolean overwrite)
     Annotates a transformation argument with a tuple.
Parameters:
  fqdi - is the FQDI to annotate
Parameters:
  formalname - is the name of the formal argument to annotoate.
Parameters:
  annotation - is the value to place
Parameters:
  overwrite - is a predicate on replace or maintain.
public  longsaveAnnotationDerivation(String fqdi, Tuple annotation, boolean overwrite)
     Annotates a derivation with a tuple.
Parameters:
  fqdi - is the FQDI to annotate
Parameters:
  annotation - is the value to place
Parameters:
  overwrite - is a predicate on replace or maintain.
public  longsaveAnnotationFilename(String filename, Tuple annotation, boolean overwrite)
     Annotates a logical filename with a tuple.
Parameters:
  filename - is the FQDI to annotate
Parameters:
  annotation - is the value to place
Parameters:
  overwrite - is a predicate on replace or maintain.
public  longsaveAnnotationTransformation(String fqdi, Tuple annotation, boolean overwrite)
     Annotates a transformation with a tuple.
Parameters:
  fqdi - is the FQDI to annotate
Parameters:
  annotation - is the value to place
Parameters:
  overwrite - is a predicate on replace or maintain.
public  booleansaveDefinition(Definition definition, boolean overwrite)
     Saves a Definition, that is either a Transformation or Derivation, into the backend database.
public  java.util.ListsearchAnnotation(int kind, Object arg, QueryTree tree)
     Search for LFNs or Definitions that has certain annotations
Parameters:
  kind - defines the kind/class of object annotated.
Parameters:
  arg - is used only for TR ARG and TR CALL.
public  ResultSetsearchAnnotation(java.util.List select, String table, java.util.Map where, String order)
     A not very generic method to search annotation (and anything) in the database.
public  java.util.ListsearchDefinition(String namespace, String name, String version, int type)
     Search the database for definitions by ns::name:version triple and by type (either Transformation or Derivation).
public  java.util.ListsearchDefinitionEx(String namespace, String name, String version, int type)
     Search the database for definitions by ns::name:version triple and by type (either Transformation or Derivation).
public  java.util.ListsearchFilename(String lfn, int link)
     Searches the database for all derivations that contain a certain LFN. The linkage is an additional constraint.
public  java.util.ListsearchLFN(String lfn, int link)
     Searches the database for all LFNs that match a certain pattern. The linkage is an additional constraint.

Field Detail
c_lfn_names
final protected static String[] c_lfn_names(Code)
Name of the four parameter tables in human readable format.



m_cache
protected Cache m_cache(Code)
A cache for definitions to avoid reloading from the database.



m_deferDeleteCommit
protected boolean m_deferDeleteCommit(Code)
Communication between saveDefinition and deleteDefinition in update mode.




Constructor Detail
AnnotationSchema
public AnnotationSchema(String dbDriverName) throws ClassNotFoundException, NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException, SQLException, IOException(Code)
Default constructor for the "chunk" schema.
Parameters:
  dbDriverName - is the database driver name




Method Detail
backdoor
public ResultSet backdoor(String query) throws SQLException(Code)
A too generic method to search annotation (and anything) in the database. This method is also responsible for breaking any no-database-based backends.

WARNING: This is a method for internal use only.
Parameters:
  query - is an SQL query statement. something to search for results in.
exception:
  SQLException - if something goes wrong with the database.




containsDefinition
public boolean containsDefinition(Definition definition) throws SQLException(Code)
Search the database for the existence of a definition.
Parameters:
  definition - the definition object to search for true, if the definition exists, false if not found



deleteAnnotation
public boolean deleteAnnotation(String primary, Object secondary, int kind, String key) throws SQLException, IllegalArgumentException(Code)
Deletes an annotation with the specified key.
Parameters:
  primary - is the primary object specifier for the class. According to the type, this is either the FQDI, or the filename.
Parameters:
  secondary - is a helper argument for annotations to callsand formal arguments, and should be null for all other classes.For calls, the argument must be packed into java.lang.Integer.
Parameters:
  kind - defines the kind/class of object to annotate.
Parameters:
  key - is the annotation key. true, if the database was modified, false otherwise.
exception:
  SQLException - , if something went wrong during databaseaccess.



deleteAnnotationCall
public boolean deleteAnnotationCall(String fqdi, int index, String key) throws SQLException, IllegalArgumentException(Code)
Deletes a specific key for a call statement.
Parameters:
  fqdi - is the FQDI of the transformation
Parameters:
  index - is the number of the call to annotate.
Parameters:
  key - is the key to search for true, if the database was modified, false otherwise.
See Also:   org.griphyn.vdl.classes.Call



deleteAnnotationDeclare
public boolean deleteAnnotationDeclare(String fqdi, String farg, String key) throws SQLException, IllegalArgumentException(Code)
Deletes a specific key in an annotated formal argument.
Parameters:
  fqdi - is the FQDI of the transformation
Parameters:
  farg - is the name of the formal argument
Parameters:
  key - is the key to search for true, if the database was modified, false otherwise.
See Also:   org.griphyn.vdl.classes.Declare



deleteAnnotationDerivation
public boolean deleteAnnotationDerivation(String fqdi, String key) throws SQLException, IllegalArgumentException(Code)
Deletes a specific key in an annotated derivation.
Parameters:
  fqdi - is the FQDI of the derivation
Parameters:
  key - is the key to search for true, if the database was modified, false otherwise.
See Also:   org.griphyn.vdl.classes.Derivation



deleteAnnotationFilename
public boolean deleteAnnotationFilename(String filename, String key) throws SQLException, IllegalArgumentException(Code)
Deletes a specific key in an annotated filename.
Parameters:
  filename - is the name of the file that was annotated.
Parameters:
  key - is the key to search for true, if the database was modified, false otherwise.
See Also:   org.griphyn.vdl.classes.LFN



deleteAnnotationTransformation
public boolean deleteAnnotationTransformation(String fqdi, String key) throws SQLException, IllegalArgumentException(Code)
Deletes a specific key in an annotated transformation.
Parameters:
  fqdi - is the FQDI of the transformation
Parameters:
  key - is the key to search for true, if the database was modified, false otherwise.
See Also:   org.griphyn.vdl.classes.Transformation



deleteDefinition
public boolean deleteDefinition(Definition definition) throws SQLException(Code)
Delete a specific Definition objects from the database. No wildcard matching will be done. "Fake" definitions are permissable, meaning it just has the secondary key triple.
Parameters:
  definition - is the definition specification to delete true is something was deleted, false if non existent.
See Also:   org.griphyn.vdl.classes.Definition.TRANSFORMATION
See Also:   org.griphyn.vdl.classes.Definition.DERIVATION
See Also:   



deleteDefinition
public java.util.List deleteDefinition(String namespace, String name, String version, int type) throws SQLException(Code)
Delete Definition objects from the database. This method allows for wildcards in the usual fashion. Use null for strings as wildcards, and -1 for the type wildcard. For efficiency reasons, this method will return an empty list.
Parameters:
  namespace - namespace, null to match any namespace
Parameters:
  name - name, null to match any name
Parameters:
  version - version, null to match any version
Parameters:
  type - definition type (TR or DV) a list containing all Definitions that were deleted
See Also:   org.griphyn.vdl.classes.Definition.TRANSFORMATION
See Also:   org.griphyn.vdl.classes.Definition.DERIVATION
See Also:   



deleteDefinitionEx
public java.util.List deleteDefinitionEx(String namespace, String name, String version, int type) throws SQLException(Code)
Delete one or more definitions from the backend database. The key triple parameters may be wildcards. Wildcards are expressed as null value, or have special characters '%' and '_'.
Parameters:
  namespace - namespace
Parameters:
  name - name
Parameters:
  version - version
Parameters:
  type - definition type (TR or DV) a list of definitions that were deleted.
See Also:   org.griphyn.vdl.classes.Definition.TRANSFORMATION
See Also:   org.griphyn.vdl.classes.Definition.DERIVATION
See Also:   



getDefinitionId
protected Long getDefinitionId(Definition d) throws SQLException(Code)
Obtains the primary key id for a given definition. "Fake" definitions are permissable. This is an internal helper function.
Parameters:
  d - is a definition specification. the id of the definition, or null if not found.
See Also:   AnnotationSchema.getSpecificDefinitionId(String,String,String,int)
See Also:   AnnotationSchema.getDefinitionId(String,String,String,int)



getDefinitionId
protected java.util.List getDefinitionId(String namespace, String name, String version, int type) throws SQLException(Code)
Obtains the list of primary key ids for a matching definitions. This method allows for wildcards in the usual fashion. Use null for strings as wildcards, and -1 for the type wildcard. This method may return an empty list, but it will not return null. This is an internal helper function.
Parameters:
  namespace - namespace, null to match any namespace
Parameters:
  name - name, null to match any name
Parameters:
  version - version, null to match any version
Parameters:
  type - definition type (TR or DV) a possibly empty list containing all matchingdefinition ids as Longs.
See Also:   org.griphyn.vdl.classes.Definition.TRANSFORMATION
See Also:   org.griphyn.vdl.classes.Definition.DERIVATION
See Also:   
See Also:   AnnotationSchema.getDefinitionId(Definition)
See Also:   



getDefinitionIdEx
protected java.util.List getDefinitionIdEx(String namespace, String name, String version, int type) throws SQLException(Code)
Obtains the list of primary key ids for a matching definitions. This method allows for wildcards in the usual fashion. Use null for strings as wildcards, and -1 for the type wildcard. It also allows special characters '%' and '_' in strings. This method may return an empty list, but it will not return null. This is an internal helper function.
Parameters:
  namespace - namespace, null to match any namespace
Parameters:
  name - name, null to match any name
Parameters:
  version - version, null to match any version
Parameters:
  type - definition type (TR or DV) a possibly empty list containing all matchingdefinition ids as Longs.
See Also:   org.griphyn.vdl.classes.Definition.TRANSFORMATION
See Also:   org.griphyn.vdl.classes.Definition.DERIVATION
See Also:   
See Also:   AnnotationSchema.getDefinitionId(Definition)
See Also:   



getFQDNList
public java.util.List getFQDNList(int type) throws SQLException(Code)
Searches the database for a list of fully-qualified names of the definitions sorted in ascending order.
Parameters:
  type - type of definition, see below, or -1 for both a list of FQDNs
See Also:   org.griphyn.vdl.classes.Definition.TRANSFORMATION
See Also:   org.griphyn.vdl.classes.Definition.DERIVATION



getNamespaceList
public java.util.List getNamespaceList(int type) throws SQLException(Code)
Searches the database for a list of namespaces of the definitions Sorted in ascending order.
Parameters:
  type - type of definition, see below, or -1 for both a list of namespaces
See Also:   org.griphyn.vdl.classes.Definition.TRANSFORMATION
See Also:   org.griphyn.vdl.classes.Definition.DERIVATION



getSpecificDefinitionId
protected Long getSpecificDefinitionId(String namespace, String name, String version, int type) throws SQLException(Code)
Obtains the primary key id for a given definition. "Fake" definitions are NOT permissable. This is an internal helper function.
Parameters:
  namespace - is the specific namespace, null will be mapped to ""
Parameters:
  name - is the specific name, null will be mapped to ""
Parameters:
  version - is the specific version, null will be mapped to ""
Parameters:
  type - is the type identifier, -1 is not allowed. the id of the definition, or null if not found.
See Also:   AnnotationSchema.getDefinitionId(String,String,String,int)



loadAnnotation
public Tuple loadAnnotation(String primary, Object secondary, int kind, String key) throws SQLException, IllegalArgumentException(Code)
Retrieves a specific annotation from an annotatable classes with the specified tuple. This is an interface method to the various class-specific methods.
Parameters:
  primary - is the primary object specifier for the class. According to the type, this is either the FQDI, or the filename.
Parameters:
  secondary - is a helper argument for annotations to callsand formal arguments, and should be null for all other classes.For calls, the argument must be packed into java.lang.Integer.
Parameters:
  kind - defines the kind/class of object to annotate.
Parameters:
  key - is the key to look for. null if not found, otherwise the annotation tuple.
See Also:   AnnotationSchema.loadAnnotationTransformation(String,String)
See Also:   AnnotationSchema.loadAnnotationDerivation(String,String)
See Also:   AnnotationSchema.loadAnnotationCall(String,int,String)
See Also:   AnnotationSchema.loadAnnotationDeclare(String,String,String)
See Also:   AnnotationSchema.loadAnnotationFilename(String,String)



loadAnnotation
public java.util.List loadAnnotation(String primary, Object secondary, int kind) throws SQLException, IllegalArgumentException(Code)
Retrieves all annotations from an annotatable classes with the specified tuple. This is an interface method to the various class-specific methods.
Parameters:
  primary - is the primary object specifier for the class. According to the type, this is either the FQDI, or the filename.
Parameters:
  secondary - is a helper argument for annotations to callsand formal arguments, and should be null for all other classes.For calls, the argument must be packed into java.lang.Integer.
Parameters:
  kind - defines the kind/class of object to annotate. null if not found, otherwise the annotation tuple.
See Also:   AnnotationSchema.loadAnnotationTransformation(String)
See Also:   AnnotationSchema.loadAnnotationDerivation(String)
See Also:   AnnotationSchema.loadAnnotationCall(String,int)
See Also:   AnnotationSchema.loadAnnotationDeclare(String,String)
See Also:   AnnotationSchema.loadAnnotationFilename(String)



loadAnnotationCall
public Tuple loadAnnotationCall(String fqdi, int index, String key) throws SQLException, IllegalArgumentException(Code)
Obtains the value to a specific key for a call statement.
Parameters:
  fqdi - is the FQDI of the transformation
Parameters:
  index - is the number of the call to annotate.
Parameters:
  key - is the key to search for the annotated value, or null if not found
See Also:   org.griphyn.vdl.classes.Call



loadAnnotationCall
public java.util.List loadAnnotationCall(String fqdi, int index) throws SQLException, IllegalArgumentException(Code)
Lists all annotations for a call statement.
Parameters:
  fqdi - is the FQDI of the transformation
Parameters:
  index - is the number of the call to annotate. a list of tuples, which may be empty.
See Also:   org.griphyn.vdl.classes.Call



loadAnnotationDeclare
public Tuple loadAnnotationDeclare(String fqdi, String farg, String key) throws SQLException, IllegalArgumentException(Code)
Obtains the value to a specific key in an annotated formal argument.
Parameters:
  fqdi - is the FQDI of the transformation
Parameters:
  farg - is the name of the formal argument
Parameters:
  key - is the key to search for the annotated value, or null if not found
See Also:   org.griphyn.vdl.classes.Declare



loadAnnotationDeclare
public java.util.List loadAnnotationDeclare(String fqdi, String farg) throws SQLException, IllegalArgumentException(Code)
Lists all annotations for a formal argument.
Parameters:
  fqdi - is the FQDI of the transformation
Parameters:
  farg - is the name of the formal argument a list of tuples, which may be empty.
See Also:   org.griphyn.vdl.classes.Declare



loadAnnotationDerivation
public Tuple loadAnnotationDerivation(String fqdi, String key) throws SQLException, IllegalArgumentException(Code)
Obtains the value to a specific key in an annotated derivation.
Parameters:
  fqdi - is the FQDI of the derivation
Parameters:
  key - is the key to search for the annotated value, or null if not found.
See Also:   org.griphyn.vdl.classes.Derivation



loadAnnotationDerivation
public java.util.List loadAnnotationDerivation(String fqdi) throws SQLException, IllegalArgumentException(Code)
Lists all annotations for a derivation.
Parameters:
  fqdi - is the FQDI of the derivation a list of tuples, which may be empty.
See Also:   org.griphyn.vdl.classes.Derivation



loadAnnotationFilename
public Tuple loadAnnotationFilename(String filename, String key) throws SQLException, IllegalArgumentException(Code)
Obtains the value to a specific key in an annotated filename.
Parameters:
  filename - is the name of the file that was annotated.
Parameters:
  key - is the key to search for the annotated value, or null if not found.
See Also:   org.griphyn.vdl.classes.LFN



loadAnnotationFilename
public java.util.List loadAnnotationFilename(String filename) throws SQLException, IllegalArgumentException(Code)
Lists all annotations for a logical filename.
Parameters:
  filename - is the logical filename. a list of tuples, which may be empty.
See Also:   org.griphyn.vdl.classes.LFN



loadAnnotationTransformation
public Tuple loadAnnotationTransformation(String fqdi, String key) throws SQLException, IllegalArgumentException(Code)
Obtains the value to a specific key in an annotated transformation.
Parameters:
  fqdi - is the FQDI of the transformation
Parameters:
  key - is the key to search for the annotated value, or null if not found.
See Also:   org.griphyn.vdl.classes.Transformation



loadAnnotationTransformation
public java.util.List loadAnnotationTransformation(String fqdi) throws SQLException, IllegalArgumentException(Code)
Lists all annotations for a transformation.
Parameters:
  fqdi - is the FQDI of the transformation a list of tuples, which may be empty.
See Also:   org.griphyn.vdl.classes.Transformation



loadDefinition
public Definition loadDefinition(String namespace, String name, String version, int type) throws SQLException(Code)
Loads a single Definition from the backend database into an Java object. This method does not allow wildcarding!
Parameters:
  namespace - namespace, null will be converted into empty string
Parameters:
  name - name, null will be converted into empty string
Parameters:
  version - version, null will be converted into empty string
Parameters:
  type - type of the definition (TR or DV), must not be -1. the Definition as specified, or null if not found.
See Also:   org.griphyn.vdl.classes.Definition.TRANSFORMATION
See Also:   org.griphyn.vdl.classes.Definition.DERIVATION
See Also:   AnnotationSchema.saveDefinition(Definition,boolean)



saveAnnotation
public long saveAnnotation(String primary, Object secondary, int kind, Tuple annotation, boolean overwrite) throws SQLException, IllegalArgumentException(Code)
Annotates any of the annotatable classes with the specified tuple. This is an interface method to the various class-specific methods.
Parameters:
  primary - is the primary object specifier for the class. According to the type, this is either the FQDI, or the filename.
Parameters:
  secondary - is a helper argument for annotations to callsand formal arguments, and should be null for all other classes.For calls, the argument must be packed into java.lang.Integer.
Parameters:
  kind - defines the kind/class of object to annotate.
Parameters:
  annotation - is the value to place into the class.
Parameters:
  overwrite - is a predicate on replace or maintain. the insertion id, or -1, if the database was untouched
See Also:   AnnotationSchema.saveAnnotationTransformation(String,Tuple,boolean)
See Also:   AnnotationSchema.saveAnnotationDerivation(String,Tuple,boolean)
See Also:   AnnotationSchema.saveAnnotationCall(String,int,Tuple,boolean)
See Also:   AnnotationSchema.saveAnnotationDeclare(String,String,Tuple,boolean)
See Also:   AnnotationSchema.saveAnnotationFilename(String,Tuple,boolean)



saveAnnotationCall
public long saveAnnotationCall(String fqdi, int index, Tuple annotation, boolean overwrite) throws SQLException, IllegalArgumentException(Code)
Annotates a transformation call with a tuple.
Parameters:
  fqdi - is the FQDI to annotate
Parameters:
  index - is the number of the call to annotate.
Parameters:
  annotation - is the value to place
Parameters:
  overwrite - is a predicate on replace or maintain. the insertion id, or -1, if the database was untouched
See Also:   org.griphyn.vdl.classes.Call



saveAnnotationDeclare
public long saveAnnotationDeclare(String fqdi, String formalname, Tuple annotation, boolean overwrite) throws SQLException, IllegalArgumentException(Code)
Annotates a transformation argument with a tuple.
Parameters:
  fqdi - is the FQDI to annotate
Parameters:
  formalname - is the name of the formal argument to annotoate.
Parameters:
  annotation - is the value to place
Parameters:
  overwrite - is a predicate on replace or maintain. the insertion id, or -1, if the database was untouched
See Also:   org.griphyn.vdl.classes.Declare



saveAnnotationDerivation
public long saveAnnotationDerivation(String fqdi, Tuple annotation, boolean overwrite) throws SQLException, IllegalArgumentException(Code)
Annotates a derivation with a tuple.
Parameters:
  fqdi - is the FQDI to annotate
Parameters:
  annotation - is the value to place
Parameters:
  overwrite - is a predicate on replace or maintain. the insertion id, or -1, if the database was untouched
See Also:   org.griphyn.vdl.classes.Derivation



saveAnnotationFilename
public long saveAnnotationFilename(String filename, Tuple annotation, boolean overwrite) throws SQLException, IllegalArgumentException(Code)
Annotates a logical filename with a tuple.
Parameters:
  filename - is the FQDI to annotate
Parameters:
  annotation - is the value to place
Parameters:
  overwrite - is a predicate on replace or maintain. the insertion id, or -1, if the database was untouched
See Also:   org.griphyn.vdl.classes.LFN



saveAnnotationTransformation
public long saveAnnotationTransformation(String fqdi, Tuple annotation, boolean overwrite) throws SQLException, IllegalArgumentException(Code)
Annotates a transformation with a tuple.
Parameters:
  fqdi - is the FQDI to annotate
Parameters:
  annotation - is the value to place
Parameters:
  overwrite - is a predicate on replace or maintain. the insertion id, or -1, if the database was untouched
See Also:   org.griphyn.vdl.classes.Transformation



saveDefinition
public boolean saveDefinition(Definition definition, boolean overwrite) throws SQLException(Code)
Saves a Definition, that is either a Transformation or Derivation, into the backend database. This method, of course, does not allow wildcarding. The definition has to be completely specified and valid.

Please note that updating a definition will remove all the meta- data that was defined for the definition.
Parameters:
  definition - is the new Definition to store.
Parameters:
  overwrite - true, if existing defitions will be overwritten bynew ones with the same primary (or secondary) key (-set), or false,if a new definition will be rejected on key matches. true, if the backend database was changed, orfalse, if the definition was not accepted into the backend.
See Also:   org.griphyn.vdl.classes.Definition
See Also:   org.griphyn.vdl.classes.Transformation
See Also:   org.griphyn.vdl.classes.Derivation
See Also:   AnnotationSchema.loadDefinition(String,String,String,int)




searchAnnotation
public java.util.List searchAnnotation(int kind, Object arg, QueryTree tree) throws SQLException(Code)
Search for LFNs or Definitions that has certain annotations
Parameters:
  kind - defines the kind/class of object annotated.
Parameters:
  arg - is used only for TR ARG and TR CALL. For the formerit is the name of the argument (String), for the latter the position of the call (Integer).
Parameters:
  tree - stores the query tree to query the annotation a list of LFNs if search for filenames, otherwise a list ofdefinitions.
exception:
  SQLException - if something goes wrong with the database.
See Also:   org.griphyn.vdl.annotation.QueryTree



searchAnnotation
public ResultSet searchAnnotation(java.util.List select, String table, java.util.Map where, String order) throws SQLException(Code)
A not very generic method to search annotation (and anything) in the database. Selects any rows in one or more colums from one or more tables restricted by some condition, possibly ordered.

WARNING: This is a method for internal use only.
Parameters:
  select - is the ordered set of column names to select, orsimply a one-value list with an asterisk.
Parameters:
  table - is the name of the table to select from.
Parameters:
  where - is a collection of column names and values they must equal.
Parameters:
  order - is an optional ordering string. something to search for results in.
exception:
  SQLException - if something goes wrong with the database.
See Also:   org.griphyn.vdl.dbdriver.DatabaseDriver.select(java.util.ListStringjava.util.MapString)




searchDefinition
public java.util.List searchDefinition(String namespace, String name, String version, int type) throws SQLException(Code)
Search the database for definitions by ns::name:version triple and by type (either Transformation or Derivation). This version of the search allows for jokers expressed as null value
Parameters:
  namespace - namespace, null to match any namespace
Parameters:
  name - name, null to match any name
Parameters:
  version - version, null to match any version
Parameters:
  type - type of definition (TR/DV, or both) a list of definitions
See Also:   org.griphyn.vdl.classes.Definition.TRANSFORMATION
See Also:   org.griphyn.vdl.classes.Definition.DERIVATION



searchDefinitionEx
public java.util.List searchDefinitionEx(String namespace, String name, String version, int type) throws SQLException(Code)
Search the database for definitions by ns::name:version triple and by type (either Transformation or Derivation). This version of the search allows for jokers expressed as null value
Parameters:
  namespace - namespace, null to match any namespace
Parameters:
  name - name, null to match any name
Parameters:
  version - version, null to match any version
Parameters:
  type - type of definition, see below, or -1 as wildcard a list of Definition items, which may be empty
See Also:   org.griphyn.vdl.classes.Definition.TRANSFORMATION
See Also:   org.griphyn.vdl.classes.Definition.DERIVATION
See Also:   AnnotationSchema.loadDefinition(String,String,String,int)



searchFilename
public java.util.List searchFilename(String lfn, int link) throws SQLException(Code)
Searches the database for all derivations that contain a certain LFN. The linkage is an additional constraint. This method does not allow jokers.
Parameters:
  lfn - the LFN name
Parameters:
  link - the linkage type of the LFN a list of Definition items that match the criterion.
See Also:   org.griphyn.vdl.classes.LFN.NONE
See Also:   org.griphyn.vdl.classes.LFN.INPUT
See Also:   org.griphyn.vdl.classes.LFN.OUTPUT
See Also:   org.griphyn.vdl.classes.LFN.INOUT



searchLFN
public java.util.List searchLFN(String lfn, int link) throws SQLException(Code)
Searches the database for all LFNs that match a certain pattern. The linkage is an additional constraint. This method allows joker characters such as '%' and '_'.
Parameters:
  lfn - the LFN name
Parameters:
  link - the linkage type of the LFN a list of filenames that match the criterion.
See Also:   org.griphyn.vdl.classes.LFN.NONE
See Also:   org.griphyn.vdl.classes.LFN.INPUT
See Also:   org.griphyn.vdl.classes.LFN.OUTPUT
See Also:   org.griphyn.vdl.classes.LFN.INOUT



Fields inherited from org.griphyn.vdl.dbschema.DatabaseSchema
protected DatabaseDriver m_dbdriver(Code)(Java Doc)
protected Properties m_dbschemaprops(Code)(Java Doc)

Methods inherited from org.griphyn.vdl.dbschema.DatabaseSchema
public boolean cachingMakesSense()(Code)(Java Doc)
public void close() throws SQLException(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
public static DatabaseSchema loadSchema(String dbSchemaName, String propertyPrefix, Object[] arguments) throws ClassNotFoundException, IOException, NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException(Code)(Java Doc)
public static DatabaseSchema loadSchema(String propertyPrefix) throws ClassNotFoundException, IOException, NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException(Code)(Java Doc)
protected void longOrNull(PreparedStatement ps, int pos, long l) throws SQLException(Code)(Java Doc)
protected String makeNotNull(String s)(Code)(Java Doc)
protected void stringOrNull(PreparedStatement ps, int pos, String s) throws SQLException(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.