BratRelationAnnotation extends BratAnnotation { public static BratRelationAnnotation parse(String aLine) { Matcher m = PATTERN.matcher(aLine); if (!m.matches()) { throw new IllegalArgumentException( "Illegal relation annotation format [" + aLine + "]"); } return new BratRelationAnnotation(m.group(ID), m.group(TYPE), m.group(ARG1_LABEL), m.group(ARG1_TARGET), m.group(ARG2_LABEL), m.group(ARG2_TARGET)); } BratRelationAnnotation(int aId, String aType, String aArg1Label, String aArg1Target,
            String aArg2Label, String aArg2Target);  BratRelationAnnotation(String aId, String aType, String aArg1Label, String aArg1Target,
            String aArg2Label, String aArg2Target); String getArg1Label(); String getArg1Target(); String getArg2Label(); String getArg2Target(); @Override void write(JsonGenerator aJG); @Override String toString(); static BratRelationAnnotation parse(String aLine);  }
@Test public void parseTest() { final String in = "R1\tOrigin Arg1:T3 Arg2:T4"; BratRelationAnnotation v = BratRelationAnnotation.parse(in); assertEquals(in, v.toString()); }