Bus

org.topcased.service.transformation
Class Xmi1toXmi2

java.lang.Object
  extended by org.topcased.service.transformation.Xmi1toXmi2

public class Xmi1toXmi2
extends java.lang.Object


Field Summary
static org.w3c.dom.Document document
           
static java.lang.String space
           
 
Constructor Summary
Xmi1toXmi2(java.lang.String xmifile1, java.lang.String xmifile2, java.lang.String enc, java.lang.String metamodel)
           
 
Method Summary
 void buildDom()
          builds the Dom from input file
 void closeOutputFile()
           
static void createDTDFile(java.lang.String fileName, java.lang.String fileToImport)
           
static void deleteDTDFile(java.lang.String fileName)
           
 void firstElemTransf()
          transf. of the first node
 java.lang.String getFileName(java.lang.String name)
           
 int initMap(java.util.Map<java.lang.String,java.lang.Integer> map, org.w3c.dom.Node node)
           
 void makeNewDom(org.w3c.dom.Node domNode, java.lang.String space)
          makes modif. in Dom
 void makeNodeNewRef(org.w3c.dom.Node modifNode, java.lang.String refName, java.lang.String refValue)
          makes new ref.
 void openOutputFile()
          file metods
 java.lang.String replaceChar(char c, java.lang.String source, java.lang.String s)
           
 java.lang.String runImport()
          transformatin action
 org.w3c.dom.Node seekRefNode(org.w3c.dom.Node startNode, java.lang.String refValue)
          seeks ref. to nodes
 void setRootName()
          set the root name
 java.lang.String upperCase(java.lang.String s)
          first char uppercase
 java.lang.String upperCase2(java.lang.String s)
           
 java.lang.String upperCaseAttribFirstNode(java.lang.String s)
           
 void writeAntet()
          write the antet of the output file
 void writeLine(java.lang.String line)
           
 void writeString(java.lang.String line)
           
 java.lang.String xmlString(java.lang.String source, boolean total)
          string to xml string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

document

public static org.w3c.dom.Document document

space

public static java.lang.String space
Constructor Detail

Xmi1toXmi2

public Xmi1toXmi2(java.lang.String xmifile1,
                  java.lang.String xmifile2,
                  java.lang.String enc,
                  java.lang.String metamodel)
Method Detail

openOutputFile

public void openOutputFile()
                    throws java.io.IOException
file metods

Throws:
java.io.IOException

closeOutputFile

public void closeOutputFile()
                     throws java.io.IOException
Throws:
java.io.IOException

createDTDFile

public static void createDTDFile(java.lang.String fileName,
                                 java.lang.String fileToImport)

deleteDTDFile

public static void deleteDTDFile(java.lang.String fileName)

writeLine

public void writeLine(java.lang.String line)
               throws java.io.IOException
Throws:
java.io.IOException

writeString

public void writeString(java.lang.String line)
                 throws java.io.IOException
Throws:
java.io.IOException

getFileName

public java.lang.String getFileName(java.lang.String name)

writeAntet

public void writeAntet()
                throws java.io.IOException
write the antet of the output file

Throws:
java.io.IOException

buildDom

public void buildDom()
              throws org.xml.sax.SAXParseException,
                     org.xml.sax.SAXException,
                     javax.xml.parsers.ParserConfigurationException,
                     java.io.IOException
builds the Dom from input file

Throws:
org.xml.sax.SAXParseException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
java.io.IOException

makeNewDom

public void makeNewDom(org.w3c.dom.Node domNode,
                       java.lang.String space)
                throws java.io.IOException
makes modif. in Dom

Throws:
java.io.IOException

makeNodeNewRef

public void makeNodeNewRef(org.w3c.dom.Node modifNode,
                           java.lang.String refName,
                           java.lang.String refValue)
makes new ref.


initMap

public int initMap(java.util.Map<java.lang.String,java.lang.Integer> map,
                   org.w3c.dom.Node node)

seekRefNode

public org.w3c.dom.Node seekRefNode(org.w3c.dom.Node startNode,
                                    java.lang.String refValue)
seeks ref. to nodes


firstElemTransf

public void firstElemTransf()
transf. of the first node


setRootName

public void setRootName()
set the root name


upperCase

public java.lang.String upperCase(java.lang.String s)
first char uppercase


upperCase2

public java.lang.String upperCase2(java.lang.String s)

upperCaseAttribFirstNode

public java.lang.String upperCaseAttribFirstNode(java.lang.String s)

xmlString

public java.lang.String xmlString(java.lang.String source,
                                  boolean total)
string to xml string


replaceChar

public java.lang.String replaceChar(char c,
                                    java.lang.String source,
                                    java.lang.String s)

runImport

public java.lang.String runImport()
transformatin action


Bus

Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.