+ /**
+ * A {@link SchemaSourceFilter} which accepts any schema source it is presented with.
+ */
+ public static final SchemaSourceFilter ALWAYS_ACCEPT = new SchemaSourceFilter() {
+ private final Iterable<Class<? extends SchemaSourceRepresentation>> REPRESENTATIONS =
+ Collections.<Class<? extends SchemaSourceRepresentation>>singletonList(SchemaSourceRepresentation.class);
+
+ @Override
+ public Iterable<Class<? extends SchemaSourceRepresentation>> supportedRepresentations() {
+ return REPRESENTATIONS;
+ }
+
+ @Override
+ public ListenableFuture<Boolean> apply(final SchemaSourceRepresentation schemaSource) {
+ return Futures.immediateFuture(Boolean.TRUE);
+ }
+ };
+
+ /**
+ * Get the representations this filter supports. A schema source is translated
+ * into one of these representations before it is presented for filtering.
+ *
+ * @return Set of supported representations.
+ */