this.filters = new ArrayList<>(); for (Filter child: ((FilterList)filter).getFilters()) { this.filters.add(new FilterModel(child)); case SkipFilter: this.filters = new ArrayList<>(); this.filters.add(new FilterModel(((SkipFilter)filter).getFilter())); break; case TimestampsFilter: this.filters = new ArrayList<>(); this.filters.add( new FilterModel(((WhileMatchFilter)filter).getFilter())); break; default:
this.filters = new ArrayList<>(); for (Filter child: ((FilterList)filter).getFilters()) { this.filters.add(new FilterModel(child)); case SkipFilter: this.filters = new ArrayList<>(); this.filters.add(new FilterModel(((SkipFilter)filter).getFilter())); break; case TimestampsFilter: this.filters = new ArrayList<>(); this.filters.add( new FilterModel(((WhileMatchFilter)filter).getFilter())); break; default:
this.filters = new ArrayList<>(); for (Filter child: ((FilterList)filter).getFilters()) { this.filters.add(new FilterModel(child)); case SkipFilter: this.filters = new ArrayList<>(); this.filters.add(new FilterModel(((SkipFilter)filter).getFilter())); break; case TimestampsFilter: this.filters = new ArrayList<>(); this.filters.add( new FilterModel(((WhileMatchFilter)filter).getFilter())); break; default:
this.filters = new ArrayList<FilterModel>(); for (Filter child: ((FilterList)filter).getFilters()) { this.filters.add(new FilterModel(child)); case SkipFilter: this.filters = new ArrayList<FilterModel>(); this.filters.add(new FilterModel(((SkipFilter)filter).getFilter())); break; case TimestampsFilter: this.filters = new ArrayList<FilterModel>(); this.filters.add( new FilterModel(((WhileMatchFilter)filter).getFilter())); break; default:
/** * @param filter the filter * @return the JSON representation of the filter * @throws Exception */ public static String stringifyFilter(final Filter filter) throws Exception { JSONJAXBContext context = new JSONJAXBContext(JSONConfiguration.natural().build(), FilterModel.class); JSONMarshaller marshaller = context.createJSONMarshaller(); StringWriter writer = new StringWriter(); marshaller.marshallToJSON(new FilterModel(filter), writer); return writer.toString(); }
/** * @param s the JSON representation of the filter * @return the filter * @throws Exception */ public static Filter buildFilter(String s) throws Exception { JSONJAXBContext context = new JSONJAXBContext(JSONConfiguration.natural().build(), FilterModel.class); JSONUnmarshaller unmarshaller = context.createJSONUnmarshaller(); FilterModel model = unmarshaller.unmarshalFromJSON(new StringReader(s), FilterModel.class); return model.build(); }
/** * @param filter the filter * @return the JSON representation of the filter * @throws Exception */ public static String stringifyFilter(final Filter filter) throws Exception { return getJasonProvider().locateMapper(FilterModel.class, MediaType.APPLICATION_JSON_TYPE).writeValueAsString(new FilterModel(filter)); }
/** * @param filter the filter * @return the JSON representation of the filter * @throws Exception */ public static String stringifyFilter(final Filter filter) throws Exception { return getJasonProvider().locateMapper(FilterModel.class, MediaType.APPLICATION_JSON_TYPE).writeValueAsString(new FilterModel(filter)); }
/** * @param s the JSON representation of the filter * @return the filter * @throws Exception */ public static Filter buildFilter(String s) throws Exception { FilterModel model = getJasonProvider().locateMapper(FilterModel.class, MediaType.APPLICATION_JSON_TYPE).readValue(s, FilterModel.class); return model.build(); }
/** * @param s the JSON representation of the filter * @return the filter * @throws Exception */ public static Filter buildFilter(String s) throws Exception { FilterModel model = getJasonProvider().locateMapper(FilterModel.class, MediaType.APPLICATION_JSON_TYPE).readValue(s, FilterModel.class); return model.build(); }
/** * @param filter the filter * @return the JSON representation of the filter * @throws Exception */ public static String stringifyFilter(final Filter filter) throws Exception { return getJasonProvider().locateMapper(FilterModel.class, MediaType.APPLICATION_JSON_TYPE).writeValueAsString(new FilterModel(filter)); }
/** * @param s the JSON representation of the filter * @return the filter * @throws Exception */ public static Filter buildFilter(String s) throws Exception { FilterModel model = getJasonProvider().locateMapper(FilterModel.class, MediaType.APPLICATION_JSON_TYPE).readValue(s, FilterModel.class); return model.build(); }