public void calcTargetString ( ) { int whatToShow = getWhatToShow ( ) ; switch ( whatToShow ) { case DTMFilter . SHOW_COMMENT : m_targetString = PsuedoNames . PSEUDONAME_COMMENT ; break ; case DTMFilter . SHOW_TEXT : case DTMFilter . SHOW_CDATA_SECTION : case ( DTMFilter . SHOW_TEXT | DTMFilter . SHOW_CDATA_SECTION ) : m_targetString = PsuedoNames . PSEUDONAME_TEXT ; break ; case DTMFilter . SHOW_ALL : m_targetString = PsuedoNames . PSEUDONAME_ANY ; break ; case DTMFilter . SHOW_DOCUMENT : case DTMFilter . SHOW_DOCUMENT | DTMFilter . SHOW_DOCUMENT_FRAGMENT : m_targetString = PsuedoNames . PSEUDONAME_ROOT ; break ; case DTMFilter . SHOW_ELEMENT : if ( this . WILD == m_name ) m_targetString = PsuedoNames . PSEUDONAME_ANY ; else m_targetString = m_name ; break ; default : m_targetString = PsuedoNames . PSEUDONAME_ANY ; break ; } }
Calculate the local name or psuedo name of the node that this pattern will test for hash table lookup optimization .