Search in sources :

Example 1 with XmlDocHolder

use of main.data.ability.construct.XmlDocHolder in project Eidolons by IDemiurge.

the class AE_Manager method getDoc.

public static Node getDoc(String typeName) {
    OBJ_TYPE TYPE = ArcaneVault.getSelectedOBJ_TYPE();
    // if (!ArcaneVault.isDialogueMode()) {
    // TYPE = DC_TYPE.ABILS;
    // } else {
    // TYPE = DC_TYPE.DIALOGUE;
    // }
    ObjType type;
    if (ArcaneVault.isMacroMode()) {
        type = DataManager.getType(typeName);
    // DialogueType diagType = (DialogueType) type;
    // return diagType.getDoc();
    }
    type = DataManager.getType(typeName, TYPE.getName());
    XmlDocHolder abilType = (XmlDocHolder) type;
    // return XML_Converter.getDoc(abilType.getProperty(G_PROPS.ABILITIES));
    return abilType.getDoc();
}
Also used : C_OBJ_TYPE(main.content.C_OBJ_TYPE) OBJ_TYPE(main.content.OBJ_TYPE) ObjType(main.entity.type.ObjType) XmlDocHolder(main.data.ability.construct.XmlDocHolder)

Example 2 with XmlDocHolder

use of main.data.ability.construct.XmlDocHolder in project Eidolons by IDemiurge.

the class TypeBuilder method setProps.

private static void setProps(DataModel type, NodeList childNodes) {
    for (int i = 0; i < childNodes.getLength(); i++) {
        Node child = childNodes.item(i);
        if (child.getNodeName().equals(XML_Converter.TEXT_NODE)) {
            continue;
        }
        if ((type) instanceof XmlHoldingType) {
            if (StringMaster.getWellFormattedString(child.getNodeName()).equals(((XmlHoldingType) (type)).getXmlProperty().getName())) {
                child = XML_Converter.getAbilitiesDoc(child);
                type.setProperty(ContentManager.getPROP(child.getNodeName()), XML_Converter.getStringFromXML(child, false));
                ((XmlDocHolder) type).setDoc(child);
                continue;
            }
        }
        PROPERTY prop = ContentManager.getPROP(child.getNodeName());
        if (prop == null) {
            LogMaster.log(1, "no such prop: " + child.getNodeName());
            prop = ContentManager.getPROP(child.getNodeName());
            continue;
        }
        type.setProperty(prop, getTextFromXml(child));
    }
}
Also used : PROPERTY(main.content.values.properties.PROPERTY) Node(org.w3c.dom.Node) XmlHoldingType(main.entity.type.XmlHoldingType) XmlDocHolder(main.data.ability.construct.XmlDocHolder)

Aggregations

XmlDocHolder (main.data.ability.construct.XmlDocHolder)2 C_OBJ_TYPE (main.content.C_OBJ_TYPE)1 OBJ_TYPE (main.content.OBJ_TYPE)1 PROPERTY (main.content.values.properties.PROPERTY)1 ObjType (main.entity.type.ObjType)1 XmlHoldingType (main.entity.type.XmlHoldingType)1 Node (org.w3c.dom.Node)1