/** * Gets the Aspect tag in PCC format. * * @return A String in LST file format for this description. * @see pcgen.cdom.base.PrereqObject#getPCCText() */ public String getPCCText() { final StringBuilder buf = new StringBuilder(); for (final String str : theComponents) { if (str.startsWith(VAR_MARKER)) { final int ind = Integer.parseInt(str.substring(VAR_MARKER.length())); buf.append('%').append(ind); } else { buf.append(EntityEncoder.encode(str)); } } if (theVariables != null) { for (final String var : theVariables) { buf.append(Constants.PIPE); buf.append(var); } } if (hasPrerequisites()) { buf.append(Constants.PIPE); buf.append( new PrerequisiteWriter().getPrerequisiteString(getPrerequisiteList(), Constants.PIPE)); } return buf.toString(); }
@Override public String[] unparse(LoadContext context, CDOMObject obj) { String descr = context.getObjectContext().getString(obj, StringKey.TEMP_DESCRIPTION); if (descr == null) { return null; } return new String[] {EntityEncoder.encode(descr)}; }