cl::utfsm::cdbChecker::CDBChecker Class Reference

Collaboration diagram for cl::utfsm::cdbChecker::CDBChecker:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void cleanUp ()
void downloadSchemas (Vector reqSchemas)

Static Public Member Functions

static void setTargetNamespaceString (String targetNamespace)
static void main (String[] args)

Public Attributes

String XMLPath = null
String XSDPath = null

Static Public Attributes

static final String IR_CORBALOC = "ACS.repository"
static Vector reqSchemas
static boolean errorFlag = false
static boolean globalErrorFlag = false
static Repository rep = null
static boolean verbose = false
static boolean checkidl = false

Protected Member Functions

Vector getFilenames (String paths[], String type)
void XSDValidate (Vector filename)
void checkIdlTypes ()
void XMLValidate (Vector filename)
void getTargetNamespace (Vector XSDFilenames)
boolean checkArgs (String[] args)
void deleteTmp ()

Static Protected Member Functions

static void printUsage ()

Private Member Functions

void getFile (String url)
boolean configLoader ()

Private Attributes

File tmpDir
SAXParser SP
Properties props = new Properties()
Hashtable xsd_targetns
String schemaFolder
boolean network = false
boolean recursive = true

Static Private Attributes

static String targetNamespace

Member Function Documentation

boolean cl::utfsm::cdbChecker::CDBChecker::checkArgs ( String[]  args  )  [inline, protected]

Checks the command line arguments given to the program and capture the given flags.

Parameters:
args command line arguments
Returns:
True if arguments are OK, false otherwise

References checkidl, globalErrorFlag, network, recursive, verbose, XMLPath, and XSDPath.

Referenced by main().

void cl::utfsm::cdbChecker::CDBChecker::checkIdlTypes (  )  [inline, protected]

This method check if the idl types on CDB are available

References IR_CORBALOC, props, and rep.

Referenced by main().

void cl::utfsm::cdbChecker::CDBChecker::cleanUp (  )  [inline]

References deleteTmp(), tmpDir, and verbose.

Referenced by main().

boolean cl::utfsm::cdbChecker::CDBChecker::configLoader (  )  [inline, private]

References downloadSchemas(), network, props, reqSchemas, schemaFolder, SP, and tmpDir.

Referenced by main().

void cl::utfsm::cdbChecker::CDBChecker::deleteTmp (  )  [inline, protected]

References tmpDir.

Referenced by cleanUp().

void cl::utfsm::cdbChecker::CDBChecker::downloadSchemas ( Vector  reqSchemas  )  [inline]

Calls CDBChecker.getFile() to download files usually needed by XSD schema files.

Parameters:
reqSchemas Vector that contains the required schemas, to be downloaded.

References getFile(), schemaFolder, and verbose.

Referenced by configLoader().

void cl::utfsm::cdbChecker::CDBChecker::getFile ( String  url  )  [inline, private]

Downloads the file from the given URL. Creates the temporary directory directory if it doesn't already exists. Only downloads the file if it doesn't already exists.

Parameters:
url where to download the file from.

References schemaFolder.

Referenced by downloadSchemas().

Vector cl::utfsm::cdbChecker::CDBChecker::getFilenames ( String  paths[],
String  type 
) [inline, protected]

This get the filenames of type 'type' from the given path. There could be several paths separated by ":".

Parameters:
path multiple paths separated by ":" to look for 'type' files.
type type of files to get.
Returns:
a vector of strings with the filenames of type 'type' with absolute path. An empty vector is returned if paths is empty.

References recursive.

Referenced by main().

void cl::utfsm::cdbChecker::CDBChecker::getTargetNamespace ( Vector  XSDFilenames  )  [inline, protected]

This method checks for the targetNamespace defined by the schema files and fills the CDBChecker.xsd_targetns with pairs {targetNamespace, XSD filename}

Parameters:
XSDFilenames Vector with all the XSD filenames with absolute path.

References SP, targetNamespace, and xsd_targetns.

Referenced by main().

static void cl::utfsm::cdbChecker::CDBChecker::main ( String[]  args  )  [inline, static]

Main function to run the cdbChecker tool System.exit(0/1) is used to return success if everything if fine or failure int case errors were encountered

References checkArgs(), checkidl, checkIdlTypes(), cleanUp(), configLoader(), getFilenames(), getTargetNamespace(), globalErrorFlag, printUsage(), props, reqSchemas, SP, verbose, XMLPath, XMLValidate(), xsd_targetns, XSDPath, and XSDValidate().

static void cl::utfsm::cdbChecker::CDBChecker::printUsage (  )  [inline, static, protected]

Prints usage information.

Referenced by main().

static void cl::utfsm::cdbChecker::CDBChecker::setTargetNamespaceString ( String  targetNamespace  )  [inline, static]

Sets the static variable CDBChecker.targetNamespace

Parameters:
targetNamespace 
void cl::utfsm::cdbChecker::CDBChecker::XMLValidate ( Vector  filename  )  [inline, protected]

This method validates the XML files.

Parameters:
filename name with absolute path of the XML file to validate.

References errorFlag, SP, targetNamespace, verbose, XMLPath, and xsd_targetns.

Referenced by main().

void cl::utfsm::cdbChecker::CDBChecker::XSDValidate ( Vector  filename  )  [inline, protected]

This method validates the XSD files.

Parameters:
filename name with absolute path of the XSD file to validate.

References errorFlag, schemaFolder, SP, verbose, and XSDPath.

Referenced by main().


Member Data Documentation

Referenced by checkArgs(), and main().

This errorFlag is used to signal from the parser callbacks that something failed int the validation of one specific file. It shall be reset before starting the validation of each file.

Referenced by XMLValidate(), and XSDValidate().

This globalErrorFlag is used to keep memory of any failure. It is never reset and it is set to true whenever there is a failure. If at the end of all validations it is true, it means that something failed and therefore we have to return with a failure error code.

Referenced by checkArgs(), and main().

final String cl::utfsm::cdbChecker::CDBChecker::IR_CORBALOC = "ACS.repository" [static]

Referenced by checkIdlTypes().

boolean cl::utfsm::cdbChecker::CDBChecker::network = false [private]

Referenced by checkArgs(), and configLoader().

Properties cl::utfsm::cdbChecker::CDBChecker::props = new Properties() [private]

Referenced by checkIdlTypes(), configLoader(), and main().

Referenced by checkArgs(), and getFilenames().

Repository cl::utfsm::cdbChecker::CDBChecker::rep = null [static]

Referenced by checkIdlTypes().

Referenced by configLoader(), and main().

Referenced by getTargetNamespace(), and XMLValidate().

Referenced by cleanUp(), configLoader(), and deleteTmp().

Referenced by checkArgs(), main(), and XMLValidate().

Referenced by checkArgs(), main(), and XSDValidate().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2