@Override protected String getDocumentData() { return getModelObject().getDocumentResponse() == null ? "{}" : getModelObject().getDocumentResponse(); }
@Override protected String getCollectionData() { return getModelObject().getCollectionData(); }
@SuppressWarnings("unchecked") public IModel<UserAnnotationSegment> getModel() { return (IModel<UserAnnotationSegment>) getDefaultModel(); }
public boolean equals(UserAnnotationSegment segment) { return segment.getCollectionData().equals(collectionData) && segment.getDocumentResponse().equals(documentResponse); } }
public void setModelObject(UserAnnotationSegment aModel) { setDefaultModelObject(aModel); }
public void setModel(IModel<UserAnnotationSegment> aModel) { setDefaultModel(aModel); }
public UserAnnotationSegment getModelObject() { return (UserAnnotationSegment) getDefaultModelObject(); }
public Boolean getHasDiff() { return sentenceState.hasDiff(); }
@Override public boolean equals(Object obj) { if (!(obj instanceof AnnotationSelection)) { return false; } AnnotationSelection as = (AnnotationSelection) obj; return addressByUsername.equals(as.getAddressByUsername()); }
@Override public String getColor(VID aVid, String aLabel) { if (aColors.get(aVid) == null) { return AnnotationState.NOT_SUPPORTED.getColorCode(); } return aColors.get(aVid).getColorCode(); } };
/** * Removes a prefix that is added to brat visualization for different color coded purpose. */ private static String removePrefix(String aType) { return aType.replace("_(" + AnnotationState.AGREE.name() + ")", "") .replace("_(" + AnnotationState.USE.name() + ")", "") .replace("_(" + AnnotationState.DISAGREE.name() + ")", "") .replace("_(" + AnnotationState.DO_NOT_USE.name() + ")", "") .replace("_(" + AnnotationState.NOT_SUPPORTED.name() + ")", ""); }
@Override protected String getDocumentData() { return getModelObject().getDocumentResponse() == null ? "{}" : getModelObject().getDocumentResponse(); }
@Override protected String getCollectionData() { return getModelObject().getCollectionData(); }
@SuppressWarnings("unchecked") public IModel<UserAnnotationSegment> getModel() { return (IModel<UserAnnotationSegment>) getDefaultModel(); }
public void setModelObject(UserAnnotationSegment aModel) { setDefaultModelObject(aModel); }
public void setModel(IModel<UserAnnotationSegment> aModel) { setDefaultModel(aModel); }
public UserAnnotationSegment getModelObject() { return (UserAnnotationSegment) getDefaultModelObject(); }
public Boolean getHasDiff() { return sentenceState.hasDiff(); }
@Override public boolean equals(Object obj) { if (!(obj instanceof AnnotationSelection)) { return false; } AnnotationSelection as = (AnnotationSelection) obj; return addressByUsername.equals(as.getAddressByUsername()); }
@Override public String getColor(VID aVid, String aLabel) { if (aColors.get(aVid) == null) { return AnnotationState.NOT_SUPPORTED.getColorCode(); } return aColors.get(aVid).getColorCode(); } };