private void processUnitValidator() throws ParseException {
String filename;
if (getToken() == TOK_LITERAL) {
filename = getTokenValue();
nextToken();
MechSummary ms = MechSummaryCache.getInstance().getMech(
filename);
if (ms == null) {
MechSummary[] units = MechSummaryCache.getInstance()
.getAllMechs();
// System.err.println("units: "+units.length);
for (MechSummary unit : units) {
// System.err.println(unit.getSourceFile().getName());
if (unit.getSourceFile().getName().equalsIgnoreCase(
filename)) {
ms = unit;
break;
}
}
}
if (ms == null) {
System.err
.println(filename
+ " not found try using \"chassis model\" for input.");
} else {
try {
Entity entity = new MechFileParser(ms.getSourceFile(),
ms.getEntryName()).getEntity();
System.err.println("Validating Entity: "
+ entity.getShortNameRaw());
EntityVerifier entityVerifier = new EntityVerifier(
new File(
"data/mechfiles/UnitVerifierOptions.xml"));