Search in sources :

Example 66 with JsonIgnore

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();
}
Also used : PosIdentifier(de.ids_mannheim.korap.response.match.PosIdentifier) JsonIgnore(com.fasterxml.jackson.annotation.JsonIgnore)

Example 67 with JsonIgnore

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;
}
Also used : MatchIdentifier(de.ids_mannheim.korap.response.match.MatchIdentifier) JsonIgnore(com.fasterxml.jackson.annotation.JsonIgnore)

Example 68 with JsonIgnore

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());
}
Also used : HighlightCombinatorElement(de.ids_mannheim.korap.response.match.HighlightCombinatorElement) JsonIgnore(com.fasterxml.jackson.annotation.JsonIgnore)

Example 69 with JsonIgnore

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;
}
Also used : Ticket(org.fossasia.openevent.app.data.models.Ticket) JsonIgnore(com.fasterxml.jackson.annotation.JsonIgnore)

Example 70 with JsonIgnore

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;
}
Also used : Faq(org.fossasia.openevent.app.data.models.Faq) JsonIgnore(com.fasterxml.jackson.annotation.JsonIgnore)

Aggregations

JsonIgnore (com.fasterxml.jackson.annotation.JsonIgnore)113 lombok.val (lombok.val)14 ArrayList (java.util.ArrayList)12 HashMap (java.util.HashMap)8 Map (java.util.Map)8 HashSet (java.util.HashSet)7 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)5 Date (java.util.Date)5 Field (com.hortonworks.registries.common.Schema.Field)4 Set (java.util.Set)4 Schema (com.hortonworks.registries.common.Schema)3 PrimaryKey (com.hortonworks.registries.storage.PrimaryKey)3 EntitlementException (com.sun.identity.entitlement.EntitlementException)3 PolicyException (com.sun.identity.policy.PolicyException)3 JsonArray (io.vertx.core.json.JsonArray)3 List (java.util.List)3 SequenceFile (ca.corefacility.bioinformatics.irida.model.sequenceFile.SequenceFile)2 TrustAndKeyProvider (com.codingchili.core.security.TrustAndKeyProvider)2 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)2 TypeReference (com.fasterxml.jackson.core.type.TypeReference)2