Class LimitRemovalsToLanguage

  • All Implemented Interfaces:
    ModelChangePreprocessor

    public class LimitRemovalsToLanguage
    extends Object
    implements ModelChangePreprocessor
    A model change preprocessor that discards triples with language tags in the retractionsModel that do not match the specified language, unless the additionsModel also contains a new value for the same subject and predicate in that language, or no values in any language are added for the same subject and predicate (such as when an entire resource is deleted) .
    • Constructor Detail

      • LimitRemovalsToLanguage

        public LimitRemovalsToLanguage​(Locale locale)
        Parameters:
        locale - the Java locale object representing the language to which edits should be limited. May not be null.
      • LimitRemovalsToLanguage

        public LimitRemovalsToLanguage​(String language)
        Parameters:
        language - string representing the RDF language tag to which edits should be limited. May not be null.
    • Method Detail

      • preprocess

        public void preprocess​(org.apache.jena.rdf.model.Model retractionsModel,
                               org.apache.jena.rdf.model.Model additionsModel,
                               javax.servlet.http.HttpServletRequest request)
        Specified by:
        preprocess in interface ModelChangePreprocessor