SourceJammer 1.3.0 November 20, 2002
Copyright (c) 2001, 2002 Robert MacGrogan

org.sourcejammer.project.model.filesys
Class XMLUtilFS

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

public class XMLUtilFS
extends java.lang.Object

Static utility methods for turning FileSys node objects into XML doc objects.


Inner Class Summary
static class XMLUtilFS.Attributes
           
static class XMLUtilFS.NodeNames
           
 
Constructor Summary
XMLUtilFS()
           
 
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.
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(NodeList labelList)
           
static org.w3c.dom.Document labelToXML(Label label)
           
static void main(java.lang.String[] args)
           
static org.w3c.dom.Document projectNodeToXML(ProjectNodeFS project)
          Turn a ProjectNodeFS object into an XML Doc for storage on file system.
static NodeAndShareParentPath xmlToFileNode(org.w3c.dom.Document doc, FileNodeFS ndFile, long lKey)
          Build a FileNodeFS from the file node's XML doc.
static NodeAndShareParentPath 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 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 NodeAndShareParentPath xmlToProject(org.w3c.dom.Document doc, long lKey, NodeLibraryFS lib)
          Sets only basic information of children.
static NodeAndShareParentPath xmlToProject(org.w3c.dom.Document doc, ProjectNodeFS ndProject, long lKey, NodeLibraryFS lib)
          Builds ProjectNode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLUtilFS

public XMLUtilFS()
Method Detail

xmlToLabelList

public static 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 XMLNodeDoesNotExistException
Parses a label xml document and returns the SJPath.

xmlToLabel

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

labelListToXML

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

labelToXML

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

xmlToProject

public static NodeAndShareParentPath xmlToProject(org.w3c.dom.Document doc,
                                                  long lKey,
                                                  NodeLibraryFS lib)
                                           throws XMLNodeDoesNotExistException,
                                                  SecurityException,
                                                  NodeDoesNotExistException,
                                                  FileAccessException
Sets only basic information of children.

xmlToNodeName

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

xmlToProject

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

xmlToFileNode

public static NodeAndShareParentPath xmlToFileNode(org.w3c.dom.Document doc,
                                                   long lKey)
                                            throws XMLNodeDoesNotExistException,
                                                   SecurityException,
                                                   SourceJammerVersionException

xmlToFileNode

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

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.

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.

main

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

SourceJammer 1.3.0 November 20, 2002
Copyright (c) 2001, 2002 Robert MacGrogan