Commit 9aa24d4480d36279d62f5887b257714b0d8c64f8

Authored by Bartłomiej Nitoń
1 parent 3d9775fc

Added backwards compatibility.

src/main/java/pl/waw/ipipan/zil/nkjp/teiapi/api/entities/EntitiesFactory.java
... ... @@ -83,6 +83,9 @@ public abstract class EntitiesFactory {
83 83 List<TEIMorph> morphs, boolean isZeroSubject);
84 84  
85 85 public abstract TEICoreference createCoreference(String id, String type,
  86 + String dominant, List<TEIMention> mentions, TEIMention sourceMention);
  87 +
  88 + public abstract TEICoreference createCoreference(String id, String type,
86 89 String dominant, String facet, List<TEIMention> mentions, TEIMention sourceMention);
87 90  
88 91 }
... ...
src/main/java/pl/waw/ipipan/zil/nkjp/teiapi/impl/entities/EntitiesFactoryImpl.java
... ... @@ -135,6 +135,13 @@ public class EntitiesFactoryImpl extends EntitiesFactory {
135 135  
136 136 @Override
137 137 public TEICoreference createCoreference(String id, String type,
  138 + String dominant, List<TEIMention> mentions, TEIMention sourceMention) {
  139 + return new TEICoreferenceImpl(id, type, dominant, mentions,
  140 + sourceMention);
  141 + }
  142 +
  143 + @Override
  144 + public TEICoreference createCoreference(String id, String type,
138 145 String dominant, String facet, List<TEIMention> mentions, TEIMention sourceMention) {
139 146 return new TEICoreferenceImpl(id, type, dominant, facet, mentions,
140 147 sourceMention);
... ...
src/main/java/pl/waw/ipipan/zil/nkjp/teiapi/impl/entities/TEICoreferenceImpl.java
... ... @@ -18,6 +18,16 @@ public class TEICoreferenceImpl implements TEICoreference {
18 18 private List<TEIMention> mentions;
19 19 private TEIMention sourceMention;
20 20  
  21 + public TEICoreferenceImpl(String id, String type, String dominant,
  22 + List<TEIMention> mentions, TEIMention sourceMention) {
  23 + this.id = id;
  24 + this.type = type;
  25 + this.dominant = dominant;
  26 + this.facet = null;
  27 + this.mentions = mentions;
  28 + this.sourceMention = sourceMention;
  29 + }
  30 +
21 31 public TEICoreferenceImpl(String id, String type, String dominant, String facet,
22 32 List<TEIMention> mentions, TEIMention sourceMention) {
23 33 this.id = id;
... ...