diff --git a/src/main/java/pl/waw/ipipan/zil/nkjp/teiapi/api/entities/EntitiesFactory.java b/src/main/java/pl/waw/ipipan/zil/nkjp/teiapi/api/entities/EntitiesFactory.java index af0d95c..00ffc71 100644 --- a/src/main/java/pl/waw/ipipan/zil/nkjp/teiapi/api/entities/EntitiesFactory.java +++ b/src/main/java/pl/waw/ipipan/zil/nkjp/teiapi/api/entities/EntitiesFactory.java @@ -83,6 +83,9 @@ public abstract class EntitiesFactory { List<TEIMorph> morphs, boolean isZeroSubject); public abstract TEICoreference createCoreference(String id, String type, + String dominant, List<TEIMention> mentions, TEIMention sourceMention); + + public abstract TEICoreference createCoreference(String id, String type, String dominant, String facet, List<TEIMention> mentions, TEIMention sourceMention); } diff --git a/src/main/java/pl/waw/ipipan/zil/nkjp/teiapi/impl/entities/EntitiesFactoryImpl.java b/src/main/java/pl/waw/ipipan/zil/nkjp/teiapi/impl/entities/EntitiesFactoryImpl.java index a10b79e..c3dfe2d 100644 --- a/src/main/java/pl/waw/ipipan/zil/nkjp/teiapi/impl/entities/EntitiesFactoryImpl.java +++ b/src/main/java/pl/waw/ipipan/zil/nkjp/teiapi/impl/entities/EntitiesFactoryImpl.java @@ -135,6 +135,13 @@ public class EntitiesFactoryImpl extends EntitiesFactory { @Override public TEICoreference createCoreference(String id, String type, + String dominant, List<TEIMention> mentions, TEIMention sourceMention) { + return new TEICoreferenceImpl(id, type, dominant, mentions, + sourceMention); + } + + @Override + public TEICoreference createCoreference(String id, String type, String dominant, String facet, List<TEIMention> mentions, TEIMention sourceMention) { return new TEICoreferenceImpl(id, type, dominant, facet, mentions, sourceMention); diff --git a/src/main/java/pl/waw/ipipan/zil/nkjp/teiapi/impl/entities/TEICoreferenceImpl.java b/src/main/java/pl/waw/ipipan/zil/nkjp/teiapi/impl/entities/TEICoreferenceImpl.java index 5d482b4..0ceff22 100644 --- a/src/main/java/pl/waw/ipipan/zil/nkjp/teiapi/impl/entities/TEICoreferenceImpl.java +++ b/src/main/java/pl/waw/ipipan/zil/nkjp/teiapi/impl/entities/TEICoreferenceImpl.java @@ -18,6 +18,16 @@ public class TEICoreferenceImpl implements TEICoreference { private List<TEIMention> mentions; private TEIMention sourceMention; + public TEICoreferenceImpl(String id, String type, String dominant, + List<TEIMention> mentions, TEIMention sourceMention) { + this.id = id; + this.type = type; + this.dominant = dominant; + this.facet = null; + this.mentions = mentions; + this.sourceMention = sourceMention; + } + public TEICoreferenceImpl(String id, String type, String dominant, String facet, List<TEIMention> mentions, TEIMention sourceMention) { this.id = id;