*/
public class FilterDefinitionFactory {
public static FilterDefinition create( final Element node, final IPentahoSession session, final ILogger logger )
throws FilterPanelException {
FilterDefinition fd = null;
if ( null != XmlDom4JHelper.getNodeText( "session-attribute", node ) ) { //$NON-NLS-1$
fd = new SessionFilterDefinition( node, session, logger );
} else if ( null != XmlDom4JHelper.getNodeText( "global-attribute", node ) ) { //$NON-NLS-1$
fd = new GlobalFilterDefinition( node, session, logger );
} else if ( null != XmlDom4JHelper.getNodeText( "data-solution", node ) ) { //$NON-NLS-1$
fd = new ActionFilterDefinition( node, session, logger );
} else if ( null != XmlDom4JHelper.getNodeText( "static-lov", node ) ) { //$NON-NLS-1$
fd = new StaticFilterDefinition( node, session, logger );
} else {
//
}
if ( fd != null ) {
fd.fromXml( node );
}
return fd;
}