use of main.content.values.properties.PROPERTY in project Eidolons by IDemiurge.
the class AE_Manager method saveTreesIntoXML.
public static void saveTreesIntoXML() {
OBJ_TYPE TYPE = C_OBJ_TYPE.XML_TYPES;
PROPERTY XML_PROP = null;
// }
for (String typeName : cacheMap.keySet()) {
ObjType type = DataManager.getType(typeName, TYPE);
if (type == null) {
continue;
}
if (type.getOBJ_TYPE_ENUM() == DC_TYPE.ABILS) {
XML_PROP = G_PROPS.ABILITIES;
} else {
XML_PROP = PROPS.DIALOGUE_DATA;
}
saveTreeIntoXML(TYPE, XML_PROP, type);
// dirty flag can help
// XML_Writer.writeXML_ForType(type, TYPE);
}
}
use of main.content.values.properties.PROPERTY in project Eidolons by IDemiurge.
the class ReportView method init.
public void init() {
PROPERTY prop = AT_PROPS.COMPLETED_TASKS;
OBJ_TYPE TYPE = AT_OBJ_TYPE.TASK;
List<ObjType> workedTasks = getTypeList(prop, TYPE);
List<Task> completedTasks = new ArrayList<>();
List<Task> failedTasks = new ArrayList<>();
// new ListMaster<>().toList(string)
// task comps? group by goals
// time spent,
// new G_ScrolledPanel<E>() {
// @Override
// protected G_Panel createComponent(E d) {
// // TODO Auto-generated method stub
// return null;
// }
// };
// state
// style
}
use of main.content.values.properties.PROPERTY in project Eidolons by IDemiurge.
the class XML_Reader method constructTypeMap.
private static void constructTypeMap(Document doc, String key, Map<String, Set<String>> tabGroupMap, Map<String, Set<String>> treeSubGroupMap) {
key = key.replace("_", " ").toLowerCase();
LogMaster.log(LogMaster.DATA_DEBUG, "type map: " + key);
Map<String, ObjType> typeMap = typeMaps.computeIfAbsent(key, k -> new XLinkedMap<>());
NodeList nl = doc.getFirstChild().getChildNodes();
Set<String> groupSet = new LinkedHashSet<>();
for (int i = 0; i < nl.getLength(); i++) {
Node node = nl.item(i);
NodeList nl1 = node.getChildNodes();
String aspect = node.getNodeName();
PROPERTY groupingKey = DataManager.getGroupingKey(key);
PROPERTY subGroupingKey = DataManager.getSubGroupingKey(key);
for (int a = 0; a < nl1.getLength(); a++) {
Node typeNode = nl1.item(a);
String name = typeNode.getNodeName();
if ("#text".equals(name)) {
continue;
}
ObjType type = TypeBuilder.buildType(typeNode, key);
if (type != null) {
name = type.getName();
// TAB GROUPS
if (type.getProperty(groupingKey) == null) {
type.setProperty(G_PROPS.ASPECT, aspect);
}
groupSet.add(type.getProperty(groupingKey));
aspect = type.getProperty(groupingKey);
// TREE SUB GROUPS
String subKey = type.getProperty(subGroupingKey);
treeSubGroupMap.computeIfAbsent(aspect, k -> new HashSet<>()).add(subKey);
typeMap.put(name, type);
LogMaster.log(LogMaster.DATA_DEBUG, typeNode.getNodeName() + " has been put into map as " + type);
}
}
}
if (tabGroupMap.get(key) == null) {
tabGroupMap.put(key, groupSet);
} else {
tabGroupMap.get(key).addAll(groupSet);
}
// if (key.equals(StringS.ABILS.getName())) {
// Err.info(set + "");
// }
}
use of main.content.values.properties.PROPERTY in project Eidolons by IDemiurge.
the class DataModel method cloneMapsWithExceptions.
public void cloneMapsWithExceptions(DataModel type, VALUE... exceptions) {
Map<VALUE, String> map = new HashMap<>();
for (VALUE exception : exceptions) {
map.put(exception, getValue(exception));
}
this.propMap = clonePropMap(type.getPropMap().getMap());
this.paramMap = cloneParamMap(type.getParamMap().getMap());
for (VALUE exception : exceptions) {
String value = map.get(exception);
if (exception instanceof PARAMETER) {
paramMap.put(exception.getName(), value);
} else if (exception instanceof PROPERTY) {
propMap.put(exception.getName(), value);
}
}
setDirty(true);
}
use of main.content.values.properties.PROPERTY in project Eidolons by IDemiurge.
the class DataModel method mergeValues.
public void mergeValues(Entity type, VALUE... vals) {
for (VALUE val : vals) {
if (val instanceof PROPERTY) {
PROPERTY property = (PROPERTY) val;
addProperty(property, type.getProperty(property), true);
} else {
if (val instanceof PARAMETER) {
PARAMETER parameter = (PARAMETER) val;
addParam(parameter, type.getParam(parameter), false);
}
}
}
}
Aggregations