João Paulo Lemes Machado created XERCESC-2106:
-------------------------------------------------

             Summary: Refactoring of CoreDocumentImpl
                 Key: XERCESC-2106
                 URL: https://issues.apache.org/jira/browse/XERCESC-2106
             Project: Xerces-C++
          Issue Type: Improvement
          Components: DOM
            Reporter: João Paulo Lemes Machado


Hello everyone.
I was analyzing the modularization of some classes, and I identified that the 
class CoreDocumentImpl has an opportunity for cohesion improvement. 
The class SAXParser was in the same situation and the problem was solved as 
follows: The AbstractSAXParser class was created, and several get() and set() 
methods that were used only to configure the class parameters were moved from 
SAXParser to AbstractSAXParser. 
The new class was then accessed through an instance variable in SAXParser. This 
strategy has cleaned and improved SAXParser cohesion.
With this in mind, I would recommend creating a new class: 
CoreDocumentImplConfig , and moving the following methods:

setXmlVersion
setVersion
getNodeName
getXmlStandalone
getStrictErrorChecking
setStrictErrorChecking
getElementsByTagName
getNodeListCache
getNodeNumber
setUserData
getStandalone
getAsync
getTextContent
setEncoding
getUserData
getDoctype
getMutationEvents
getOwnerDocument
getVersion
getDocumentURI
getIdentifiers
getElementById
getEncoding
setAttrNode
getXmlVersion
setInputEncoding
getNodeType
getErrorChecking
setDocumentURI
getXmlEncoding
getBaseURI
setStandalone
setXmlEncoding
getDocumentElement
getInputEncoding
getIdentifier
setAsync
getElementsByTagNameNS
setXmlStandalone
setMutationEvents
getImplementation
getDomConfig
setTextContent
getUserDataRecord
setUserDataTable
setErrorChecking
getFeature


from the CoreDocumentImpl.
Those parameters accessed by an instance variable in the CoreDocumentImpl.
Moreover, the orthogonality is the design would be enhanced.

What do you think about that?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscr...@xerces.apache.org
For additional commands, e-mail: c-dev-h...@xerces.apache.org

Reply via email to