syntax = "proto3"; option java_package = "net.sf.okapi.proto.textunitflat"; option java_outer_classname = "OkapiTextUnitFlatProtoMapping"; option java_multiple_files = true; message TextUnits { repeated TextUnit textUnits = 1; } message Property { enum PropName { ENCODING = 0; LANGUAGE = 1; APPROVED = 2; NOTE = 3; TRANSNOTE = 4; COORDINATES = 5; STATE_QUALIFIER = 6; STATE = 7; ITS_LQI = 8; ITS_PROV = 9; ITS_MTCONFIDENCE = 10; XLIFF_TOOL = 11; XLIFF_PHASE = 12; MAX_WIDTH = 13; MAX_HEIGHT = 14; SIZE_UNIT = 15; /** * For TMX filter - may be used by {@link TMXWriter} or {@link TMXFilterWriter} */ TMX_i = 16; TMX_hi = 17; TMX_x = 18; } string name = 1; optional string value = 2; optional bool isReadOnly = 3; } message Note { enum Priority { ONE = 0; TWO = 1; THREE = 2; FOUR = 3; FIVE = 4; SIX = 5; SEVEN = 6; EIGHT = 7; NINE = 8; TEN = 9; } enum Annotates { SOURCE = 0; TARGET = 1; GENERAL = 2; } // Required string note = 1; // optional optional string xmlLang = 2; optional string from = 3; optional Priority priority = 4; optional Annotates annotates = 5; } message TextUnit { string id = 1; string mimeType = 2; optional string name = 3; string tuType = 4; bool translatable = 5; bool preserveWS = 6; TextContainer source = 7; map targets = 8; repeated Property properties = 9; repeated Note notes = 10; } /** should only appear on the target TextContainer or target TextFragment (segment) denotes an alternate translation for the current TextUnit as found in xliff 1.2 alt-trans element **/ message AltTranslation { enum MatchType { ACCEPTED = 0; HUMAN_RECOMMENDED = 1; EXACT_UNIQUE_ID = 2; EXACT_PREVIOUS_VERSION = 3; EXACT_LOCAL_CONTEXT = 4; EXACT_DOCUMENT_CONTEXT = 5; EXACT_STRUCTURAL = 6; EXACT = 7; EXACT_TEXT_ONLY_UNIQUE_ID = 8; EXACT_TEXT_ONLY_PREVIOUS_VERSION = 9; EXACT_TEXT_ONLY = 10; EXACT_REPAIRED = 11; FUZZY_UNIQUE_ID = 12; FUZZY_PREVIOUS_VERSION = 13; FUZZY = 14; FUZZY_REPAIRED = 15; PHRASE_ASSEMBLED = 16; MT = 17; CONCORDANCE = 18; UKNOWN = 19; } string sourcLocale = 1; string targetLocale = 2; TextUnit tu = 3; int32 combinedScore = 4; int32 fuzzyScore = 5; optional int32 qualityScore = 6; optional string origin = 7; bool fromOriginal = 8; optional string engine = 9; string alttranstype = 10; optional string currentToolId = 11; MatchType type = 12; } message TextContainer { repeated TextPart parts = 1; bool segApplied = 2; string locale = 3; repeated Property properties = 4; string id = 5; repeated AltTranslation altTrans = 6; repeated Note notes = 7; } message TextPart { enum WhitespaceStrategy { INHERIT = 0; PRESERVE = 1; NORMALIZE = 2; } string id = 1; optional string originalId = 2; TextFragment text = 3; WhitespaceStrategy whitespaceStrategy = 4; repeated Property properties = 5; bool isSegment = 6; } message TextFragment { enum TagType { OPENING = 0; CLOSING = 1; PLACEHOLDER = 2; } string text = 1; repeated Code codes = 2; bool isBalanced = 3; } message Code { TextFragment.TagType tagType = 1; optional string originalId = 2; int32 id = 3; string codeType = 4; string data = 5; optional string outerData = 6; bool hasOuterData = 7; int32 flag = 8; optional string mergedData = 9; int32 position = 10; bool isolated = 11; bool added = 12; optional string displayText = 13; repeated Property properties = 14; }