class PartitionFilterBuilder implements FilterBuilder {

        private final Partition partition;

        public PartitionFilterBuilder(Partition partition) {
            this.partition = partition;
        }

        @Override
        public Category getCategory() {
            return PARTITION;
        }

        @Override
        public String getName() {
            return partition.getColumn().getTitle() + " (" + (AttributeUtils.isNodeColumn(partition.getColumn())
                ? NbBundle.getMessage(PartitionFilterBuilder.class, "PartitionFilterBuilder.name.node")
                : NbBundle.getMessage(PartitionFilterBuilder.class, "PartitionFilterBuilder.name.edge")) + ")";
        }

        @Override
        public Icon getIcon() {
            return null;
        }

        @Override
        public String getDescription() {
            return NbBundle.getMessage(PartitionBuilder.class, "PartitionBuilder.description");
        }

        @Override
        public PartitionFilter getFilter(Workspace workspace) {<FILL_FUNCTION_BODY>}

        @Override
        public JPanel getPanel(Filter filter) {
            PartitionUI ui = Lookup.getDefault().lookup(PartitionUI.class);
            if (ui != null) {
                return ui.getPanel((PartitionFilter) filter);
            }
            return null;
        }

        @Override
        public void destroy(Filter filter) {
        }
    }

            AppearanceModel am = Lookup.getDefault().lookup(AppearanceController.class).getModel(workspace);
            if (AttributeUtils.isNodeColumn(partition.getColumn())) {
                return new NodePartitionFilter(am, partition);
            } else {
                return new EdgePartitionFilter(am, partition);
            }
        
<no_super_class>