private void updateFilterConfigurationMapper() { if (fcMapper == null) { fcMapper = new FilterConfigurationMapper(); DefaultFilters.setMappings(fcMapper, true, true); } }
public SubFilter (IFilter filter, IEncoder parentEncoder, int sectionIndex, String parentId, String parentName) { filter.close(); this.filter = filter; this.parentId = parentId; this.parentName = parentName; this.sectionIndex = sectionIndex; this.converter = new SubFilterEventConverter(this, parentEncoder); }
/** * Creates an instance of the filter for a given configuration identifier * and loads its corresponding parameters. Only Okapi default filter configurations * are accepted. * @param configId the filter configuration identifier. Can only be one of default filter * configurations. * @return a new {@link IFilter} object (with its parameters loaded) for the given * configuration identifier, or null if the object could not be created. */ public static IFilter createFilter(String configId) { IFilterConfigurationMapper fcMapper = new FilterConfigurationMapper(); DefaultFilters.setMappings(fcMapper, true, true); return fcMapper.createFilter(configId); }
@Override public Event next () { return converter.convertEvent(filter.next()); }
@Override public void close() { if (delegate != null) { delegate.close(); } }
@Override public void setFilterConfigurationMapper(IFilterConfigurationMapper fcMapper) { if (delegate != null) { delegate.setFilterConfigurationMapper(fcMapper); } this.fcMapper = fcMapper; }
/** * Start a {@link TextUnit}. Also create a TextUnit {@link Event} and add it to the event queue. * * @param text * the text used to prime the {@link TextUnit} */ public void startTextUnit(String text) { startTextUnit(text, null, null, null); }
/** * End the current {@link TextUnit} and place the {@link Event} on the event queue. * * @return the ended {@link TextUnit} */ public ITextUnit endTextUnit() { return endTextUnit(null, null, null); }
public SubFilterSkeletonWriter createSkeletonWriter (StartSubfilter resource, LocaleId outputLocale, String outputEncoding, ILayerProvider layer) { this.skelWriter = new SubFilterSkeletonWriter(this); return this.skelWriter.setOptions(outputLocale, outputEncoding, this, layer); }
/** * Instantiates a new EventBuilder. */ public EventBuilder() { reset(null, null); }
/** * Creates a new LocalizationDirectives object. */ public LocalizationDirectives () { reset(); }
/** * End the {@link DocumentPart} and finalize the {@link Event}. Place the {@link Event} on the event queue. */ public void endDocumentPart() { endDocumentPart(null); }
private boolean isTextPlaceHoldersOnly(List<PropertyTextUnitPlaceholder> propertyTextUnitPlaceholders) { boolean text = false; boolean nontext = false; for (PropertyTextUnitPlaceholder propOrText : propertyTextUnitPlaceholders) { if (propOrText.getAccessType() == PlaceholderAccessType.TRANSLATABLE) { text = true; } else { nontext = true; } } return (text && !nontext); }
/** * Create a {@link Ending} {@link Event} of type END_GROUP and add it to the event queue. * * @param endMarker * the tags that ends the group. * @return the newly created Ending */ public Ending endGroup(GenericSkeleton endMarker) { return endGroup(endMarker, null, null); }
/** * Get the current {@link Code}. COuld be null. * @return the {@link Code} */ public Code getCurrentCode() { return peekMostRecentCode(); }
/** * Start a {@link TextUnit}. Also create a TextUnit {@link Event} and add it to the event queue. */ public void startTextUnit() { startTextUnit(null, null, null, null); }
/** * End the current {@link TextUnit} and place the {@link Event} on the event queue. * * @param endMarker * the tag that ends the complex {@link TextUnit} * @return the ended {@link TextUnit} */ public ITextUnit endTextUnit(GenericSkeleton endMarker) { return endTextUnit(endMarker, null, null); }