Search in sources :

Example 1 with XmlHoldingType

use of main.entity.type.XmlHoldingType 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

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