protected boolean doesCommonContentMatch ( final CommonContent commonContent , final CSNodeWrapper node , boolean matchContent ) { if ( ! node . getNodeType ( ) . equals ( CommonConstants . CS_NODE_COMMON_CONTENT ) ) return false ; // If the unique id is not from the parser, in which case it will start with a number than use the unique id to compare if ( commonContent . getUniqueId ( ) != null && commonContent . getUniqueId ( ) . matches ( "^\\d.*" ) ) { return commonContent . getUniqueId ( ) . equals ( Integer . toString ( node . getId ( ) ) ) ; } else if ( matchContent ) { return StringUtilities . similarDamerauLevenshtein ( commonContent . getTitle ( ) , node . getTitle ( ) ) >= ProcessorConstants . MIN_MATCH_SIMILARITY ; } else { // Check the parent has the same name if ( commonContent . getParent ( ) != null ) { return commonContent . getParent ( ) . getTitle ( ) . equals ( node . getParent ( ) . getTitle ( ) ) ; } return true ; } }
Checks to see if a ContentSpec Common Content matches a Content Spec Entity Common Content .