Search in sources :

Example 1 with CDOMTransparentCategorizedSingleRef

use of pcgen.cdom.reference.CDOMTransparentCategorizedSingleRef in project pcgen by PCGen.

the class LoadValidator method buildCategoryMap.

private void buildCategoryMap() {
    categoryMap = new DoubleKeyMapToList<>();
    for (Campaign c : campaignList) {
        for (Qualifier q : c.getSafeListFor(ListKey.FORWARDREF)) {
            Class<? extends Loadable> qcl = q.getQualifiedClass();
            if (CATEGORIZED_CLASS.isAssignableFrom(qcl)) {
                CDOMSingleRef<?> ref = q.getQualifiedReference();
                String cat = ((CDOMTransparentCategorizedSingleRef<?>) ref).getLSTCategory();
                categoryMap.addToListFor(qcl, cat, ref.getLSTformat(false));
            }
        }
    }
}
Also used : Campaign(pcgen.core.Campaign) CDOMTransparentCategorizedSingleRef(pcgen.cdom.reference.CDOMTransparentCategorizedSingleRef) Qualifier(pcgen.cdom.reference.Qualifier)

Aggregations

CDOMTransparentCategorizedSingleRef (pcgen.cdom.reference.CDOMTransparentCategorizedSingleRef)1 Qualifier (pcgen.cdom.reference.Qualifier)1 Campaign (pcgen.core.Campaign)1