com.highqsoft.uml
Class ODSdiff

java.lang.Object
  extended by com.highqsoft.uml.ODSdiff

public class ODSdiff
extends java.lang.Object

This program converts the application elements of an ASAM ODS application model to UML and vice-versa.

Since:
$Date: 2007/09/14 18:06:55 $
Version:
$Revision: 1.2 $
Author:
Mark Quinsland

Field Summary
static java.lang.String AO_SERVICE_ATHOS
          Athos AoService
static java.lang.String AO_SERVICE_CORBA
          CORBA AoService
static java.lang.String CLASSNAME
           
static java.lang.String LOGON_PASSWORDPARM
           
static java.lang.String LOGON_USERPARM
           
static java.lang.String version
           
 
Constructor Summary
ODSdiff()
          Constructor.
 
Method Summary
static boolean checkFileExists(java.lang.String fullFileName)
          Check to see if the file exists
 void closeFile(java.io.PrintWriter pw)
          Close HTML output file.
 void compareModelElements(org.asam.ods.ApplicationStructure asA, org.asam.ods.ApplicationStructure asB)
           
 void compareModelEnums(org.asam.ods.ApplicationStructure asA, org.asam.ods.ApplicationStructure asB)
           
static com.highqsoft.odsx.OdsxSession CreateSession(java.lang.String username, java.lang.String password, java.lang.String servicetype, java.lang.String service, java.lang.String hostName, java.lang.String portName)
           
static java.lang.String dataTypeToString(int dt)
          Convert data type to string.
static org.asam.ods.ApplicationStructure getAppStructure(java.lang.String fullFileName, java.lang.String serviceName)
          Load the ATF File and obtain an application structure from it.
static org.asam.ods.AoSession getATFSession(java.lang.String serviceName, java.lang.String fileName)
          Creates an AoSession from an ATF file using the athos default
static org.asam.ods.AoSession getATFSession(java.lang.String serviceName, java.lang.String fileName, java.lang.String serviceType)
          Creates an AoSession from an ATF file
 java.lang.String getVersion()
           
static void main(java.lang.String[] args)
           
 java.lang.String nonBlank(java.lang.String theString)
          Make sure that empty strings contain at least an HTML non blank space.
 java.io.PrintWriter openFile(java.lang.String filename)
          Open HTML output file.
 void printFooter(java.io.PrintWriter pw)
          Print the HTML document footer.
 void printHeader(java.io.PrintWriter pw, java.lang.String pageTitle)
          Print the HTML document header.
static java.lang.String relationRangeToString(org.asam.ods.RelationRange rr)
          Convert relation range to string.
static java.lang.String relationshipToString(int rs)
          Convert relationship to string.
static java.lang.String relationTypeToString(int rt)
          Convert relation type to string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

version

public static final java.lang.String version
See Also:
Constant Field Values

CLASSNAME

public static final java.lang.String CLASSNAME
See Also:
Constant Field Values

AO_SERVICE_ATHOS

public static final java.lang.String AO_SERVICE_ATHOS
Athos AoService

See Also:
Constant Field Values

AO_SERVICE_CORBA

public static final java.lang.String AO_SERVICE_CORBA
CORBA AoService

See Also:
Constant Field Values

LOGON_USERPARM

public static final java.lang.String LOGON_USERPARM
See Also:
Constant Field Values

LOGON_PASSWORDPARM

public static final java.lang.String LOGON_PASSWORDPARM
See Also:
Constant Field Values
Constructor Detail

ODSdiff

public ODSdiff()
Constructor.

Method Detail

getVersion

public java.lang.String getVersion()

main

public static void main(java.lang.String[] args)
Parameters:
args -

compareModelElements

public void compareModelElements(org.asam.ods.ApplicationStructure asA,
                                 org.asam.ods.ApplicationStructure asB)
                          throws java.lang.Exception
Throws:
java.lang.Exception

compareModelEnums

public void compareModelEnums(org.asam.ods.ApplicationStructure asA,
                              org.asam.ods.ApplicationStructure asB)
                       throws java.lang.Exception
Throws:
java.lang.Exception

checkFileExists

public static boolean checkFileExists(java.lang.String fullFileName)
Check to see if the file exists

Parameters:
fullFileName - The full path to the file
Returns:
boolean Indicates whether or not the file exists

getAppStructure

public static org.asam.ods.ApplicationStructure getAppStructure(java.lang.String fullFileName,
                                                                java.lang.String serviceName)
Load the ATF File and obtain an application structure from it.

Parameters:
fullFileName - The path and file name of the source atf file
serviceName - The name of the atf file import service in the Athos Ini file
Returns:
ApplicationStructure The ods application structure contained in the input atf file

CreateSession

public static com.highqsoft.odsx.OdsxSession CreateSession(java.lang.String username,
                                                           java.lang.String password,
                                                           java.lang.String servicetype,
                                                           java.lang.String service,
                                                           java.lang.String hostName,
                                                           java.lang.String portName)

getATFSession

public static org.asam.ods.AoSession getATFSession(java.lang.String serviceName,
                                                   java.lang.String fileName)
Creates an AoSession from an ATF file using the athos default

Parameters:
serviceName - The name of the service to connect
fileName - The name of the atf file to use
Returns:
AoSession - a session on the desired plumname

getATFSession

public static org.asam.ods.AoSession getATFSession(java.lang.String serviceName,
                                                   java.lang.String fileName,
                                                   java.lang.String serviceType)
Creates an AoSession from an ATF file

Parameters:
serviceType - The pluggable module (Athos or Corba) to use
serviceName - The name of the service to connect
fileName - The name of the atf file to use
Returns:
AoSession - a session on the desired plumname

printHeader

public void printHeader(java.io.PrintWriter pw,
                        java.lang.String pageTitle)
Print the HTML document header.


printFooter

public void printFooter(java.io.PrintWriter pw)
Print the HTML document footer.


nonBlank

public java.lang.String nonBlank(java.lang.String theString)
Make sure that empty strings contain at least an HTML non blank space.


closeFile

public void closeFile(java.io.PrintWriter pw)
Close HTML output file.


dataTypeToString

public static java.lang.String dataTypeToString(int dt)
Convert data type to string.

Parameters:
dt - The data type to be converted to string.
Returns:
The data type as string representation.

relationRangeToString

public static java.lang.String relationRangeToString(org.asam.ods.RelationRange rr)
Convert relation range to string.

Parameters:
rr - The relation range to be converted to string.
Returns:
The relation range as string representation.

relationTypeToString

public static java.lang.String relationTypeToString(int rt)
Convert relation type to string.

Parameters:
rt - The relation type to be converted to string.
Returns:
The relation type as string representation.

relationshipToString

public static java.lang.String relationshipToString(int rs)
Convert relationship to string.

Parameters:
rs - The relationship to be converted to string.
Returns:
The relationship as string representation.

openFile

public java.io.PrintWriter openFile(java.lang.String filename)
Open HTML output file.