Class XMLConstants


  • public class XMLConstants
    extends java.lang.Object
    XML Constants for the XML Connector.
    Since:
    04.10.11
    Author:
    El-Sharkawy
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) static java.lang.String AMP
      XML Character:Escaped ampersand.
      (package private) static java.lang.String CLOSING_ROOT
      Closing Tag: For the root node.
      (package private) static java.lang.String GREATERTHAN
      XML Character:Escaped closing brackets.
      (package private) static java.lang.String LESSTHAN
      XML Character:Escaped opening brackets.
      (package private) static java.lang.String LINEFEED
      XML Character:Linefeed.
      (package private) static java.lang.String PATH_4_ROOT_NODE
      XML Node Path: For the root node.
      (package private) static java.lang.String PATH_4_TRANSFORMATORS
      XML Node Path: For the Transformator Section.
      (package private) static java.lang.String QUOTES
      XML Character:Escaped Quotes.
      private static java.lang.String ROOT_NODE_NAME
      XML Node Name: For the root node.
      (package private) static java.lang.String STARTING_TRANSFORMATORS
      Starting Tag: For the Transformators Section.
      (package private) static java.lang.String TABSTOP
      XML Character:Tabstop.
      private static java.lang.String TRANSFORMATORS_NODE_NAME
      XML Node Name: For the Transformators Section.
    • Constructor Summary

      Constructors 
      Constructor Description
      XMLConstants()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static java.lang.StringBuffer closingTag​(ModelType type)
      Creates an appropriate XML opening tag for a given model type.
      (package private) static java.lang.StringBuffer path4Models​(ModelType type)
      Creates a path for the XML parser to locate the desired model.
      (package private) static java.lang.StringBuffer startingTag​(ModelType type)
      Creates an appropriate XML opening tag for a given model type.
      (package private) static java.lang.StringBuffer startTag​(PersistentProject project, PathEnvironment pathEnv)
      Returns the Begin of the the xml file (preamble + ROOT tag).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • LINEFEED

        static final java.lang.String LINEFEED
        XML Character:Linefeed.
        See Also:
        Constant Field Values
      • QUOTES

        static final java.lang.String QUOTES
        XML Character:Escaped Quotes.
        See Also:
        Constant Field Values
      • LESSTHAN

        static final java.lang.String LESSTHAN
        XML Character:Escaped opening brackets.
        See Also:
        Constant Field Values
      • GREATERTHAN

        static final java.lang.String GREATERTHAN
        XML Character:Escaped closing brackets.
        See Also:
        Constant Field Values
      • AMP

        static final java.lang.String AMP
        XML Character:Escaped ampersand.
        See Also:
        Constant Field Values
      • PATH_4_ROOT_NODE

        static final java.lang.String PATH_4_ROOT_NODE
        XML Node Path: For the root node.
        See Also:
        Constant Field Values
      • PATH_4_TRANSFORMATORS

        static final java.lang.String PATH_4_TRANSFORMATORS
        XML Node Path: For the Transformator Section.
        See Also:
        Constant Field Values
      • ROOT_NODE_NAME

        private static final java.lang.String ROOT_NODE_NAME
        XML Node Name: For the root node.
        See Also:
        Constant Field Values
      • TRANSFORMATORS_NODE_NAME

        private static final java.lang.String TRANSFORMATORS_NODE_NAME
        XML Node Name: For the Transformators Section.
        See Also:
        Constant Field Values
      • CLOSING_ROOT

        static final java.lang.String CLOSING_ROOT
        Closing Tag: For the root node.
        See Also:
        Constant Field Values
      • STARTING_TRANSFORMATORS

        static final java.lang.String STARTING_TRANSFORMATORS
        Starting Tag: For the Transformators Section.
        See Also:
        Constant Field Values
    • Constructor Detail

      • XMLConstants

        public XMLConstants()
    • Method Detail

      • startTag

        static java.lang.StringBuffer startTag​(PersistentProject project,
                                               PathEnvironment pathEnv)
        Returns the Begin of the the xml file (preamble + ROOT tag).
        Parameters:
        project - The project which should be saved.
        pathEnv - a path environment for making files and paths relative
        Returns:
        begin for a valid configuration xml file.
      • startingTag

        static java.lang.StringBuffer startingTag​(ModelType type)
        Creates an appropriate XML opening tag for a given model type.
        Parameters:
        type - the model type which should be stored in a XML file.
        Returns:
        A XML starting tag
      • closingTag

        static java.lang.StringBuffer closingTag​(ModelType type)
        Creates an appropriate XML opening tag for a given model type.
        Parameters:
        type - the model type which should be stored in a XML file.
        Returns:
        A XML starting tag
      • path4Models

        static java.lang.StringBuffer path4Models​(ModelType type)
        Creates a path for the XML parser to locate the desired model.
        Parameters:
        type - The type of the desired model, which should be parsed.
        Returns:
        A XML path to locate the nodes of the desired model