return false;
}
protected boolean matchesPattern(SearchPattern pattern) {
if(searchPattern != null && pattern instanceof XMLSearchPattern){
XMLSearchPattern decodedPattern = (XMLSearchPattern)pattern;
if(searchPattern.getElementName().equals(decodedPattern.getElementName()) &&
searchPattern.getElementNamespace().equals(decodedPattern.getElementNamespace())){
if(searchPattern.getParentName() != null &&
decodedPattern.getParentName() != null &&
!searchPattern.getParentName().equals(decodedPattern.getParentName()))
{
return false;
}
if(searchPattern.getSearchName() == null)
{
return false;
}
else if ("*".equals(searchPattern.getSearchName())) //$NON-NLS-1$
{
return true;
}
else if(searchPattern.getSearchNamespace() == null){
return searchPattern.getSearchName().equals(decodedPattern.getSearchName());
}
else{
return searchPattern.getSearchName().equals(decodedPattern.getSearchName()) &&
searchPattern.getSearchNamespace().equals(decodedPattern.getSearchNamespace());
}
}
}
return false;