|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
VersionHandling is the interface of XML subsystem which deals with the maintainance of different versions of a file using an XML file for version content of each file. This interface standardizes the methods to be used for the classes implementing the the logic for implementing the version handling according to the needed algorithm.
Method Summary | |
void |
addAnotherVersion(java.lang.String allLinesOfText,
java.lang.String versionName,
java.lang.String versionComment,
java.lang.String versionCreator)
Obtains the reference DOM document from the reeference XML file and then creates the new version in the document by appending the nex XML content to the existing one. |
void |
createNewVersion(java.lang.String contentFileName,
java.lang.String allLinesOfText,
java.lang.String versionName,
java.lang.String versionComment,
java.lang.String versionCreator,
java.lang.String birthTime)
Obtains the reference DOM document from the reeference XML file and then creates the document from the scratch. |
VersionData[] |
getMultipleVersionContent(java.lang.String fileID,
java.lang.String[] versionNames)
Gets the XMl content of multiple versions of a file in the XML document. |
void |
loadXmlFile(boolean referenceXML)
Loads the XML document which is the baseline for doing the future XML operations on the DOM document. |
void |
removeVersion(java.lang.String versionName)
Obtains the reference DOM document from the reeference XML file and then removes the content of the specified version from the XML document. |
void |
saveXML()
Saves the existing DOM document into an XML file named after the object's filename variable, using the serialization of DOM document |
Method Detail |
public void loadXmlFile(boolean referenceXML) throws java.lang.Throwable
referenceXML
- if true loads the XMl document from the reference
file or else from the file given in the constructorpublic void saveXML() throws java.lang.Throwable
public void createNewVersion(java.lang.String contentFileName, java.lang.String allLinesOfText, java.lang.String versionName, java.lang.String versionComment, java.lang.String versionCreator, java.lang.String birthTime) throws java.lang.Throwable
contentFileName
- XML file name which is to be updated with the
data of new versiomnallLinesOfText
- XML data with wich the new version is to be createdversionName
- Name of the new versionversionComment
- Comment or Disription for the new versionversionCreator
- Name of the user creating this new versionbirthTime
- timestamp of the creation of this new versionpublic void addAnotherVersion(java.lang.String allLinesOfText, java.lang.String versionName, java.lang.String versionComment, java.lang.String versionCreator) throws java.lang.Throwable
allLinesOfText
- XML data with wich the new version is to be createdversionName
- Name of the new versionversionComment
- Comment or Disription for the new versionversionCreator
- Name of the user creating this new versionpublic void removeVersion(java.lang.String versionName) throws java.lang.Throwable
allLinesOfText
- XML data with wich the new version is to be createdversionName
- Name of the new versionversionComment
- Comment or Disription for the new versionversionCreator
- Name of the user creating this new versionpublic VersionData[] getMultipleVersionContent(java.lang.String fileID, java.lang.String[] versionNames) throws java.lang.Throwable
fileID
- ID of the file whose version data is to wantedversionNames
- Names of the versions whose content is wanted
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |