MCPcopy Create free account
hub / github.com/PCGen/pcgen / appendDomainLines

Method appendDomainLines

code/src/java/pcgen/io/PCGVer2Creator.java:1062–1146  ·  view source on GitHub ↗
(StringBuilder buffer)

Source from the content-addressed store, hash-verified

1060 }
1061
1062 private void appendDomainLines(StringBuilder buffer)
1063 {
1064 for (final Domain domain : charDisplay.getDomainSet())
1065 {
1066 // TODO is any of this commented out code any use anymore?:
1067 //
1068 // // improve here - performance and concept!!!!
1069 // domainSpells.clear();
1070 // for (Iterator it2 = Globals.getSpellMap().values().iterator(); it2.hasNext();)
1071 // {
1072 // aSpell = (Spell)it2.next();
1073 // // levelString = aSpell.levelForClass(aDomain.getName());
1074 // if ((levelString.length() > 0) &&
1075 // (levelString.indexOf("-1") < 0))
1076 // {
1077 // tokens = new StringTokenizer(levelString, ",");
1078 // while (tokens.hasMoreTokens())
1079 // {
1080 // if (tokens.nextToken().equals(aDomain.getName()))
1081 // {
1082 // break;
1083 // }
1084 // }
1085 // domainSpells.add(((tokens.hasMoreTokens()) ? tokens.nextToken() + " " : "") +
1086 // aSpell.getName());
1087 // }
1088 // }
1089 buffer.append(IOConstants.TAG_DOMAIN).append(':');
1090 buffer.append(EntityEncoder.encode(domain.getKeyName()));
1091
1092 for (String assoc : thePC.getAssociationList(domain))
1093 {
1094 buffer.append('|');
1095 buffer.append(IOConstants.TAG_ASSOCIATEDDATA).append(':');
1096 buffer.append(EntityEncoder.encode(assoc));
1097 }
1098
1099 for (final Description desc : domain.getSafeListFor(ListKey.DESCRIPTION))
1100 {
1101 buffer.append('|');
1102 buffer.append(IOConstants.TAG_DOMAINGRANTS).append(':');
1103 buffer.append(desc.getPCCText());
1104 }
1105 buffer.append('|');
1106 appendSourceInTaggedFormat(buffer, getDomainSourcePcgString(domain));
1107
1108 // buffer.append('|');
1109 // buffer.append(TAG_DOMAINFEATS).append(':');
1110 // buffer.append(aDomain.getFeatList());
1111 // buffer.append('|');
1112 // buffer.append(TAG_DOMAINSKILLS).append(':');
1113 // buffer.append(aDomain.getSkillList());
1114 // buffer.append('|');
1115 // buffer.append(TAG_DOMAINSPECIALS).append(':');
1116 // buffer.append(aDomain.getSpecialAbility());
1117 // buffer.append('|');
1118 // buffer.append(TAG_DOMAINSPELLS).append(':');
1119 // buffer.append(aDomain.getSpellList());

Callers 1

createPCGStringMethod · 0.95

Calls 10

encodeMethod · 0.95
appendAddTokenInfoMethod · 0.95
getKeyNameMethod · 0.65
getSafeListForMethod · 0.65
getDomainSetMethod · 0.45
appendMethod · 0.45
getAssociationListMethod · 0.45
getPCCTextMethod · 0.45

Tested by

no test coverage detected