Class Node

    • Constructor Detail

      • Node

        public Node​(java.lang.String pNameEnum)
        Ctor.
        Parameters:
        pNameEnum - The name of the node which must be a String constant which is defined inside this class (because the implementation compares by reference).
    • Method Detail

      • getNodeName

        public java.lang.String getNodeName()
        getNodeName
        Returns:
        The name of the node. This name have to be one of the String constant defined in the class.
      • init

        public abstract void init​(org.xml.sax.Attributes pAttribs,
                                  SAXSession pSession)
                           throws org.xml.sax.SAXException
        The SAX ContentHandler implementation calls this method after testChild() and addChild() calls. The implementation must reset it's instance unless it implements NonVolatileIf
        Parameters:
        pAttribs -
        pSession - - stores variables which are common for the whole SAX parsing session
        Throws:
        org.xml.sax.SAXException
      • parseData

        public abstract void parseData​(java.lang.String pData)
                                throws org.xml.sax.SAXException
        XML element's data have to be passed
        Parameters:
        pData - - String which is concatenated in SAX's DefaultHandler.characters() implementation.
        Throws:
        org.xml.sax.SAXException
      • testChild

        public abstract void testChild​(java.lang.String pNodeNameEnum)
                                throws org.xml.sax.SAXException
        It have to be called by SAX's DefaultHandler implementation when it detects a new child element (startElement()).
        Parameters:
        pNodeNameEnum - - the name of the child element, it must be one of the String constant defined in class Node, because the implementer subclasses uses reference based equals comparisons (==)
        Throws:
        org.xml.sax.SAXException - - It have to be thrown when the Node cannot have pNodeNameEnum named child Node.
      • testCompletness

        public abstract void testCompletness()
                                      throws org.xml.sax.SAXException
        It have to be called by SAX's DefaultHandler.endElement(). It's task is to check that the Element is built up correctly. The implementer function can do some post processing here. testCompletness
        Throws:
        org.xml.sax.SAXException - It must be thrown when the Node is not valid.
      • childParsed

        public abstract void childParsed​(Node pChild)
                                  throws org.xml.sax.SAXException
        Have to be called by SAX's DefaultHandler.endElement()
        Parameters:
        pChild -
        Throws:
        org.xml.sax.SAXException - - parent Nodes can make conversions here (e.g. type string into CIMDataType), failed operation should throw SAXException)
      • isCompleted

        public boolean isCompleted()
        completed
        Returns:
        true if the parsing of the node is completed
      • setCompleted

        public void setCompleted()
        Have to be called by SAX's DefaultHandler at endElement(), after calling testCompletness().
      • clearCompleted

        public void clearCompleted()
        When a Node instance is going to be reused, this function must be called before.
      • getCIMName

        public static java.lang.String getCIMName​(org.xml.sax.Attributes pAttribs)
                                           throws org.xml.sax.SAXException
        ENTITY % CIMName "NAME CDATA #REQUIRED"
        Parameters:
        pAttribs -
        Returns:
        String
        Throws:
        org.xml.sax.SAXException
      • getClassName

        public static java.lang.String getClassName​(org.xml.sax.Attributes pAttribs)
                                             throws org.xml.sax.SAXException
        ENTITY % ClassName "CLASSNAME CDATA #REQUIRED"
        Parameters:
        pAttribs -
        Returns:
        String
        Throws:
        org.xml.sax.SAXException
      • getReferenceClass

        public static java.lang.String getReferenceClass​(org.xml.sax.Attributes pAttribs)
        ENTITY % ReferenceClass "REFERENCECLASS CDATA #IMPLIED"
        Parameters:
        pAttribs -
        Returns:
        String
      • getClassOrigin

        public static java.lang.String getClassOrigin​(org.xml.sax.Attributes pAttribs)
        ENTITY % ClassOrigin "CLASSORIGIN CDATA #IMPLIED
        Parameters:
        pAttribs -
        Returns:
        String
      • getPropagated

        public static boolean getPropagated​(org.xml.sax.Attributes pAttribs)
        ENTITY % Propagated "PROPAGATED (true|false) 'false'" getPropagated
        Parameters:
        pAttribs -
        Returns:
        boolean
      • getArraySize

        public static int getArraySize​(org.xml.sax.Attributes pAttribs)
                                throws org.xml.sax.SAXException
        ENTITY % ArraySize "ARRAYSIZE CDATA #IMPLIED"
        Parameters:
        pAttribs -
        Returns:
        int
        Throws:
        org.xml.sax.SAXException
      • getCIMType

        public static CIMDataType getCIMType​(org.xml.sax.Attributes pAttribs,
                                             boolean pOptional)
                                      throws org.xml.sax.SAXException
        ENTITY % CIMType "TYPE (boolean|string|char16|uint8|sint8|uint16|sint16|uint32 |sint32|uint64|sint64|datetime|real32|real64)" getCIMType
        Parameters:
        pAttribs -
        pOptional -
        Returns:
        CIMDataType
        Throws:
        org.xml.sax.SAXException
      • getCIMType

        public static CIMDataType getCIMType​(org.xml.sax.Attributes pAttribs)
                                      throws org.xml.sax.SAXException
        getCIMType(pAttribs, pOptional=false);
        Parameters:
        pAttribs -
        Returns:
        CIMDataType
        Throws:
        org.xml.sax.SAXException
      • getParamType

        public static CIMDataType getParamType​(org.xml.sax.Attributes pAttribs)
                                        throws org.xml.sax.SAXException
        ENTITY % ParamType "PARAMTYPE ( boolean|string|char16|uint8|sint8|uint16|sint16 |uint32|sint32|uint64|sint64|datetime| real32|real64|reference)
        Parameters:
        pAttribs -
        Returns:
        CIMDataType
        Throws:
        org.xml.sax.SAXException
      • getQualifierFlavor

        public int getQualifierFlavor​(org.xml.sax.Attributes pAttribs)
         ENTITY % QualifierFlavor "
         OVERRIDABLE    (true|false)  'true'
         TOSUBCLASS     (true|false)  'true'
         TOINSTANCE     (true|false)  'false'
         TRANSLATABLE   (true|false)  'false'"
         
        Parameters:
        pAttribs -
        Returns:
        int - CIMFlavor bit mixture
      • hasTrueAttribute

        public static boolean hasTrueAttribute​(org.xml.sax.Attributes pAttribs,
                                               java.lang.String pName)
        hasTrueAttribute
        Parameters:
        pAttribs -
        pName -
        Returns:
        boolean
      • getBoolAttribute

        public static boolean getBoolAttribute​(org.xml.sax.Attributes pAttribs,
                                               java.lang.String pName,
                                               boolean pDefVal)
        getBoolAttribute
        Parameters:
        pAttribs -
        pName -
        pDefVal -
        Returns:
        boolean
      • duplicatedNode

        public void duplicatedNode​(java.lang.String pParsedNodeName,
                                   java.lang.String pNewNodeName)
                            throws org.xml.sax.SAXException
        duplicatedNode
        Parameters:
        pParsedNodeName -
        pNewNodeName -
        Throws:
        org.xml.sax.SAXException
      • illegalChildNodePair

        public void illegalChildNodePair​(java.lang.String pNodeName0,
                                         java.lang.String pNodeName1)
                                  throws org.xml.sax.SAXException
        illegalChildNodePair
        Parameters:
        pNodeName0 -
        pNodeName1 -
        Throws:
        org.xml.sax.SAXException