use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project Krill by KorAP.
the class Match method getPosID.
/**
* Get identifier for a specific position.
*
* @param int
* Start position to get identifier on.
* @param int
* End position to get identifier on.
*/
@JsonIgnore
public String getPosID(int start, int end) {
if (DEBUG)
log.trace("Retrieve identifier for position {}-{}", start, end);
// Identifier already given
if (this.identifier != null)
return this.identifier;
// Nothing here
if (this.localDocID == -1)
return null;
PosIdentifier id = new PosIdentifier();
// Get prefix string corpus/doc
// <legacy>
id.setCorpusID(this.getCorpusID());
id.setDocID(this.getDocID());
// </legacy>
id.setTextSigle(this.getTextSigle());
id.setStart(start);
id.setEnd(end);
if (DEBUG)
log.trace("Identifier is {} in {} ({}-{}) {}", id.toString(), this.getTextSigle(), this.getCorpusID(), this.getDocID(), start);
return id.toString();
}
use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project Krill by KorAP.
the class Match method getMatchIdentifier.
@JsonIgnore
public MatchIdentifier getMatchIdentifier() {
MatchIdentifier id = new MatchIdentifier();
id.setStartPos(startPos);
id.setEndPos(endPos);
// There are highlights to integrate
if (this.highlight != null) {
for (Highlight h : this.highlight) {
if (h.number >= 256 || h.end == PB_MARKER)
continue;
// Add highlight to the snippet
id.addPos(h.start, h.end, h.number);
}
;
}
;
return id;
}
use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project Krill by KorAP.
the class Match method getSnippetBrackets.
@JsonIgnore
public String getSnippetBrackets() {
if (!this._processHighlight())
return null;
if (this.processed && this.snippetBrackets != null)
return this.snippetBrackets;
// Snippet stack sizes
short start = (short) 0;
short end = this.snippetArray.size();
end--;
StringBuilder sb = new StringBuilder();
if (this.startMore)
sb.append("... ");
// First element of sorted array
HighlightCombinatorElement elem = this.snippetArray.getFirst();
if (elem.type == 0) {
sb.append(elem.toBrackets(this));
start++;
}
;
sb.append("[");
// Last element of sorted array
elem = this.snippetArray.getLast();
StringBuilder rightContext = new StringBuilder();
// Last element is textual
if (elem != null && elem.type == 0) {
rightContext.append(elem.toBrackets(this));
// decrement end
end--;
}
;
for (short i = start; i <= end; i++) {
sb.append(this.snippetArray.get(i).toBrackets(this));
}
;
sb.append("]");
sb.append(rightContext);
if (this.endMore)
sb.append(" ...");
return (this.snippetBrackets = sb.toString());
}
use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project open-event-orga-app by fossasia.
the class EventDelegate method getEventTickets.
@Override
@JsonIgnore
public List<Ticket> getEventTickets() {
List<Ticket> tickets = event.getTickets();
if (tickets != null && !tickets.isEmpty()) {
for (Ticket ticket : tickets) ticket.setEvent(event);
return tickets;
}
event.setTickets(SQLite.select().from(Ticket.class).where(Ticket_Table.event_id.eq(event.getId())).queryList());
return tickets;
}
use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project open-event-orga-app by fossasia.
the class EventDelegate method getEventFaqs.
@Override
@JsonIgnore
public List<Faq> getEventFaqs() {
List<Faq> faqs = event.getFaqs();
if (faqs != null && !faqs.isEmpty()) {
for (Faq faq : faqs) faq.setEvent(event);
return faqs;
}
event.setFaqs(SQLite.select().from(Faq.class).where(Faq_Table.event_id.eq(event.getId())).queryList());
return faqs;
}
Aggregations