1   package eu.fbk.dkm.pikes.rdf.api;
2   
3   
4   import org.eclipse.rdf4j.model.Model;
5   
6   public interface Extractor {
7   
8       void extract(Object document, Model model, boolean[] sentenceIDs) throws Exception;
9   
10      public static Extractor concat(final Extractor... extractors) {
11          return new Extractor() {
12  
13              @Override
14              public void extract(final Object document, final Model model, final boolean[] sentenceIDs) throws Exception {
15                  for (final Extractor extractor : extractors) {
16                      extractor.extract(document, model, sentenceIDs);
17                  }
18              }
19  
20          };
21      }
22  
23  }