use of delta.games.lotro.lore.deeds.io.xml.DeedXMLParser in project lotro-tools by dmorcellet.
the class DeedsContainer method load.
private void load() {
DeedXMLParser parser = new DeedXMLParser();
_deeds = parser.parseXML(_deedsFile);
resolveProxies();
}
use of delta.games.lotro.lore.deeds.io.xml.DeedXMLParser in project lotro-tools by dmorcellet.
the class DeedsFileBuilder method doIt.
private void doIt() {
File loreDir = LotroCoreConfig.getInstance().getLoreDir();
File deedsDir = new File(loreDir, "deeds");
List<DeedDescription> deeds = new ArrayList<DeedDescription>();
DeedXMLParser parser = new DeedXMLParser();
for (File deedFile : deedsDir.listFiles()) {
List<DeedDescription> newDeeds = parser.parseXML(deedFile);
deeds.addAll(newDeeds);
}
File out = new File(loreDir, "deeds.xml");
DeedXMLWriter writer = new DeedXMLWriter();
writer.writeDeeds(out, deeds, EncodingNames.UTF_8);
}
use of delta.games.lotro.lore.deeds.io.xml.DeedXMLParser in project lotro-tools by dmorcellet.
the class LorebookDeedsDatabaseNormalization method doIt.
private void doIt() {
File loreDir = LotroCoreConfig.getInstance().getLoreDir();
File in = new File(loreDir, "deeds.xml");
DeedXMLParser parser = new DeedXMLParser();
List<DeedDescription> deeds = parser.parseXML(in);
for (DeedDescription deed : deeds) {
normalizeDeed(deed);
}
File out = new File(loreDir, "deeds_by_name.xml");
DeedsContainer.writeSortedDeeds(deeds, out);
}
use of delta.games.lotro.lore.deeds.io.xml.DeedXMLParser in project lotro-tools by dmorcellet.
the class MainLotroWikiDeedsLoader method writeResultFile.
private void writeResultFile() {
List<DeedDescription> deeds = new ArrayList<DeedDescription>();
DeedXMLParser parser = new DeedXMLParser();
File currentDir = new File(".");
for (File deedFile : currentDir.listFiles()) {
if (deedFile.getName().endsWith(".xml")) {
List<DeedDescription> newDeeds = parser.parseXML(deedFile);
deeds.addAll(newDeeds);
}
}
// Resolve deed links
new DeedLinksResolver(deeds).doIt();
int nbDeeds = deeds.size();
System.out.println("Found " + nbDeeds + " deeds.");
new CheckItemRewardsInDeeds().doIt(deeds);
new NormalizeDeedsText().doIt(deeds);
new CheckDeedLinks().doIt(deeds);
File out = new File("../lotro-companion/data/lore/deeds.xml");
DeedsContainer.writeSortedDeeds(deeds, out);
}
Aggregations