code: public static WorkspaceFilter getFilter(JcrPackageDefinition pckgDef) throws RepositoryException {
          WorkspaceFilter filter = null;
          if (pckgDef != null) {
              MetaInf metaInf = pckgDef.getMetaInf();
              filter = metaInf.getFilter();
          }
          return filter;
      }
docs: Filters