org.sourcejammer.project.model.filesys
Class Pre20XMLUtilFS

java.lang.Object
  |
  +--org.sourcejammer.project.model.filesys.Pre20XMLUtilFS

public class Pre20XMLUtilFS
extends java.lang.Object

This class only exists only to be used in converting 1.3 archives to 2.0.


Nested Class Summary
static class Pre20XMLUtilFS.Attributes
           
static class Pre20XMLUtilFS.NodeNames
           
 
Constructor Summary
Pre20XMLUtilFS()
           
 
Method Summary
static org.w3c.dom.Element addChildElementAndAttribute(java.lang.String name, java.lang.String uniqueID, org.w3c.dom.Element parent)
          Be sure ID is unique.
private static NodeXMLBean buildBasicProjectNodeDocument(NodeFS ndFS)
          Builds a basic XML Doc for file sys project node info.
private static org.w3c.dom.Element childToElement(java.lang.String childID, org.w3c.dom.Element parent, org.sourcejammer.project.view.NodeInfo ndChild)
          Builds an element for a project child or removed child.
static org.w3c.dom.Document fileNodeToXML(FileNodeFS file)
          Turn a FileNodeFS object into an XML Doc for storage on file system.
static java.lang.String getLabelSJPath(org.w3c.dom.Document doc)
          Parses a label xml document and returns the SJPath.
static org.w3c.dom.Document labelListToXML(org.sourcejammer.project.NodeList labelList)
           
static org.w3c.dom.Document labelToXML(Label label)
           
private static org.w3c.dom.Element projectChildToElement(java.lang.String childNumber, org.w3c.dom.Element parent, ProjectChild ndChild)
          Builds an element for a project child or removed child.
static org.w3c.dom.Document projectNodeToXML(ProjectNodeFS project)
          Turn a ProjectNodeFS object into an XML Doc for storage on file system.
static FileNodeFS xmlToFileNode(org.w3c.dom.Document doc, FileNodeFS ndFile, long lKey)
          Build a FileNodeFS from the file node's XML doc.
static FileNodeFS xmlToFileNode(org.w3c.dom.Document doc, long lKey)
           
static Label xmlToLabel(org.w3c.dom.Document doc)
          Parses a label xml docuemnt into an org.sourcejammer.project.controller.Label.
static org.sourcejammer.project.NodeList xmlToLabelList(org.w3c.dom.Document doc)
          Parses the labels xml docuemnt into an org.sourcejammer.project.NodeList of FileSysLabel objects.
static java.lang.String xmlToNodeName(org.w3c.dom.Document doc)
           
static ProjectNodeFS xmlToProject(org.w3c.dom.Document doc, long lKey)
          Sets only basic information of children.
static ProjectNodeFS xmlToProject(org.w3c.dom.Document doc, ProjectNodeFS ndProject, long lKey)
          Builds ProjectNode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pre20XMLUtilFS

public Pre20XMLUtilFS()
Method Detail

xmlToLabelList

public static org.sourcejammer.project.NodeList xmlToLabelList(org.w3c.dom.Document doc)
Parses the labels xml docuemnt into an org.sourcejammer.project.NodeList of FileSysLabel objects.


getLabelSJPath

public static java.lang.String getLabelSJPath(org.w3c.dom.Document doc)
                                       throws org.sourcejammer.xml.XMLNodeDoesNotExistException
Parses a label xml document and returns the SJPath.

org.sourcejammer.xml.XMLNodeDoesNotExistException

xmlToLabel

public static Label xmlToLabel(org.w3c.dom.Document doc)
                        throws org.sourcejammer.xml.XMLNodeDoesNotExistException,
                               org.sourcejammer.util.SourceJammerVersionException
Parses a label xml docuemnt into an org.sourcejammer.project.controller.Label.

org.sourcejammer.xml.XMLNodeDoesNotExistException
org.sourcejammer.util.SourceJammerVersionException

labelListToXML

public static org.w3c.dom.Document labelListToXML(org.sourcejammer.project.NodeList labelList)

labelToXML

public static org.w3c.dom.Document labelToXML(Label label)

xmlToProject

public static ProjectNodeFS xmlToProject(org.w3c.dom.Document doc,
                                         long lKey)
                                  throws org.sourcejammer.xml.XMLNodeDoesNotExistException,
                                         SecurityException,
                                         org.sourcejammer.project.NodeDoesNotExistException,
                                         FileAccessException
Sets only basic information of children.

org.sourcejammer.xml.XMLNodeDoesNotExistException
SecurityException
org.sourcejammer.project.NodeDoesNotExistException
FileAccessException

xmlToNodeName

public static java.lang.String xmlToNodeName(org.w3c.dom.Document doc)
                                      throws org.sourcejammer.xml.XMLNodeDoesNotExistException
org.sourcejammer.xml.XMLNodeDoesNotExistException

xmlToProject

public static ProjectNodeFS xmlToProject(org.w3c.dom.Document doc,
                                         ProjectNodeFS ndProject,
                                         long lKey)
                                  throws org.sourcejammer.xml.XMLNodeDoesNotExistException,
                                         SecurityException,
                                         org.sourcejammer.project.NodeDoesNotExistException,
                                         FileAccessException
Builds ProjectNode. ProjectNode should be locked and key passed in.

org.sourcejammer.xml.XMLNodeDoesNotExistException
SecurityException
org.sourcejammer.project.NodeDoesNotExistException
FileAccessException

xmlToFileNode

public static FileNodeFS xmlToFileNode(org.w3c.dom.Document doc,
                                       long lKey)
                                throws org.sourcejammer.xml.XMLNodeDoesNotExistException,
                                       SecurityException,
                                       org.sourcejammer.util.SourceJammerVersionException
org.sourcejammer.xml.XMLNodeDoesNotExistException
SecurityException
org.sourcejammer.util.SourceJammerVersionException

xmlToFileNode

public static FileNodeFS xmlToFileNode(org.w3c.dom.Document doc,
                                       FileNodeFS ndFile,
                                       long lKey)
                                throws org.sourcejammer.xml.XMLNodeDoesNotExistException,
                                       SecurityException,
                                       org.sourcejammer.util.SourceJammerVersionException
Build a FileNodeFS from the file node's XML doc. File node should already be locked and key should be passed in.

org.sourcejammer.xml.XMLNodeDoesNotExistException
SecurityException
org.sourcejammer.util.SourceJammerVersionException

projectNodeToXML

public static org.w3c.dom.Document projectNodeToXML(ProjectNodeFS project)
Turn a ProjectNodeFS object into an XML Doc for storage on file system.


fileNodeToXML

public static org.w3c.dom.Document fileNodeToXML(FileNodeFS file)
Turn a FileNodeFS object into an XML Doc for storage on file system.


childToElement

private static org.w3c.dom.Element childToElement(java.lang.String childID,
                                                  org.w3c.dom.Element parent,
                                                  org.sourcejammer.project.view.NodeInfo ndChild)
Builds an element for a project child or removed child.


projectChildToElement

private static org.w3c.dom.Element projectChildToElement(java.lang.String childNumber,
                                                         org.w3c.dom.Element parent,
                                                         ProjectChild ndChild)
Builds an element for a project child or removed child.


buildBasicProjectNodeDocument

private static NodeXMLBean buildBasicProjectNodeDocument(NodeFS ndFS)
Builds a basic XML Doc for file sys project node info.


addChildElementAndAttribute

public static org.w3c.dom.Element addChildElementAndAttribute(java.lang.String name,
                                                              java.lang.String uniqueID,
                                                              org.w3c.dom.Element parent)
Be sure ID is unique. This method does not check.



Copyright 2003 Soucejammer project.