|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.core.xml.SerialUIDChanger
public class SerialUIDChanger
This class enables one to change the UID of a serialized object and therefore not losing the data stored in the binary format.
Constructor Summary | |
---|---|
SerialUIDChanger()
|
Method Summary | |
---|---|
static void |
binaryToKOML(java.lang.String binary,
java.lang.String koml)
converts a binary file into a KOML XML file |
static void |
changeUID(long oldUID,
long newUID,
java.lang.String fromFile,
java.lang.String toFile)
changes the oldUID into newUID from the given file (binary/KOML) into the other one (binary/KOML). |
java.lang.String |
getRevision()
Returns the revision string. |
static boolean |
isKOML(java.lang.String filename)
checks whether the given filename ends with ".koml" |
static void |
komlToBinary(java.lang.String koml,
java.lang.String binary)
converts a KOML file into a binary one |
static void |
main(java.lang.String[] args)
exchanges an old UID for a new one. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SerialUIDChanger()
Method Detail |
---|
public static boolean isKOML(java.lang.String filename)
filename
- the filename to check
KOML.FILE_EXTENSION
public static void binaryToKOML(java.lang.String binary, java.lang.String koml) throws java.lang.Exception
binary
- the binary file to convertkoml
- where to store the XML output
java.lang.Exception
- if conversion failspublic static void komlToBinary(java.lang.String koml, java.lang.String binary) throws java.lang.Exception
koml
- the filename with the XML databinary
- the name of the
java.lang.Exception
public static void changeUID(long oldUID, long newUID, java.lang.String fromFile, java.lang.String toFile) throws java.lang.Exception
oldUID
- the old UID to changenewUID
- the new UID to usefromFile
- the original file with the old UIDtoFile
- the new file where to store the modified UID
java.lang.Exception
- if conversion failspublic java.lang.String getRevision()
getRevision
in interface RevisionHandler
public static void main(java.lang.String[] args) throws java.lang.Exception
args
- the command line parameters
java.lang.Exception
KOML.FILE_EXTENSION
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |