public List<Code> getCodesAsList () { String tmp = getString(GenericAnnotationType.LQI_XCODES); if ( tmp == null ) return null; String[] dataArray = tmp.split(CODES_SEP, 0); ArrayList<Code> list = new ArrayList<Code>(); for ( String data : dataArray ) { // We create fake codes, only the data matter list.add(new Code(TagType.PLACEHOLDER, "none", data)); } return list; }
/** * Appends a new code to the text. * @param tagType the tag type of the code (e.g. TagType.OPENING). * @param type the type of the code (e.g. "bold"). * @param data the raw code itself. (e.g. "<b>"). * @return the new code that was added to the text. */ public Code append (TagType tagType, String type, String data) { Code code = new Code(tagType, type, data); append(code); return code; }
@Override public void validateSimplifierRules() throws ParseException { SimplifierRules r = new SimplifierRules(getSimplifierRules(), new Code()); r.parse(); }
@Override public void validateSimplifierRules() throws ParseException { SimplifierRules r = new SimplifierRules(getSimplifierRules(), new Code()); r.parse(); } }
@Override public void validateSimplifierRules() throws ParseException { SimplifierRules r = new SimplifierRules(getSimplifierRules(), new Code()); r.parse(); }
@Override public void validateSimplifierRules() throws ParseException { SimplifierRules r = new SimplifierRules(getSimplifierRules(), new Code()); r.parse(); }
@Override public void validateSimplifierRules() throws ParseException { SimplifierRules r = new SimplifierRules(getSimplifierRules(), new Code()); r.parse(); } }
@Override public void validateSimplifierRules() throws ParseException { SimplifierRules r = new SimplifierRules(getSimplifierRules(), new Code()); r.parse(); } }
@Override public void validateSimplifierRules() throws ParseException { SimplifierRules r = new SimplifierRules(getSimplifierRules(), new Code()); r.parse(); }
@Override public void validateSimplifierRules() throws ParseException { SimplifierRules r = new SimplifierRules(getSimplifierRules(), new Code()); r.parse(); } }
@Override public void validateSimplifierRules() throws ParseException { SimplifierRules r = new SimplifierRules(getSimplifierRules(), new Code()); r.parse(); } }
@Override public void validateSimplifierRules() throws ParseException { SimplifierRules r = new SimplifierRules(getSimplifierRules(), new Code()); r.parse(); }
protected void addIsolatedCode(TextFragment tf, XMLEvents events) { int codeId = nextCodeId++; codeMap.put(codeId, events); Code code = new Code(TextFragment.TagType.PLACEHOLDER, "x", getCodeData(events, codeId)); code.setId(codeId); tf.append(code); }
private void addIsolatedCode(TextFragment textFragment, MarkupRange markupRange, String referentId) { int codeId = nextCodeId++; String codeType = createCodeType(markupRange); String codeData = getCodeData(referentId, codeId); Code code = new Code(TextFragment.TagType.PLACEHOLDER, codeType, codeData); code.setId(codeId); if (null != referentId) { code.setReferenceFlag(true); } textFragment.append(code); codeMap.put(codeId, markupRange); }
private Code addOpeningCode(TextFragment tf, RunContainer rc) { Code code = new Code(TagType.OPENING, createCodeType(rc)); code.setData("<" + rc.getType().getValue() + nextCodeId + ">"); code.setId(nextCodeId); tf.append(code); codeMap.put(nextCodeId, rc); // Entering the container means we also assume its default properties. runCodeStack.push(new RunCode(nextCodeId++, rc.getDefaultRunProperties(), rc.getDefaultCombinedRunProperties())); return code; }
public Code createRefCode () { startSubfilter.setIsReferent(true); Code c = new Code(TagType.PLACEHOLDER, startSubfilter.getName(), TextFragment.makeRefMarker(startSubfilter.getId())); c.setReferenceFlag(true); return c; }
private void addClosingCode(TextFragment tf, RunContainer rc, Code openCode) { Code code = new Code(TagType.CLOSING, openCode.getType()); code.setData("</" + rc.getType().getValue() + openCode.getId() + ">"); code.setId(openCode.getId()); // Clear container default properties runCodeStack.pop(); tf.append(code); } }
protected void addOpeningCode(TextFragment tf, RunCode rc) { Code code = new Code(TextFragment.TagType.OPENING, rc.getCodeType()); code.setId(rc.getCodeId()); code.setData("<run" + code.getId() + ">"); codeMap.put(rc.getCodeId(), rc.getRunProperties()); tf.append(code); }
private void addClosingCode(TextFragment textFragment, ContentCode contentCode) { Code code = new Code(TextFragment.TagType.CLOSING, contentCode.getCodeType()); code.setId(contentCode.getCodeId()); code.setData(CONTENT_TAG_CLOSING + DASH + code.getId() + TAG_CLOSING); textFragment.append(code); }
private void addOpeningCode(TextFragment textFragment, ContentCode contentCode) { Code code = new Code(TextFragment.TagType.OPENING, contentCode.getCodeType()); code.setId(contentCode.getCodeId()); code.setData(CONTENT_TAG_OPENING + DASH + code.getId() + TAG_CLOSING); textFragment.append(code); codeMap.put(contentCode.getCodeId(), null == contentCode.getStyledTextReferenceElement() ? contentCode.getStyleDefinitions() : contentCode.getStyledTextReferenceElement()); }