public static ConfigModel createConfigModelWithSubInstance() { final ConfigModel model = new ConfigModelImpl(); model.setId(CONFIG_ID); model.setName(CONFIG_NAME); model.setComplete(false); model.setConsistent(true); // Root Instance final InstanceModel rootInstance = new InstanceModelImpl(); rootInstance.setId(ROOT_INSTANCE_ID); rootInstance.setName(ROOT_INSTANCE_NAME); rootInstance.setLanguageDependentName(ROOT_INSTANCE_LANG_DEP_NAME); rootInstance.setRootInstance(true); rootInstance.setComplete(false); rootInstance.setConsistent(true); final ArrayList<InstanceModel> subInstances = new ArrayList<InstanceModel>(); subInstances.add(createSubInstance("SUBINSTANCE1")); rootInstance.setSubInstances(subInstances); model.setRootInstance(rootInstance); // Characteristics and Values final List<CsticModel> cstics = new ArrayList<CsticModel>(); cstics.add(createSTRCstic()); rootInstance.setCstics(cstics); return model; }
public static ConfigModel createEmptyConfigModel() { final ConfigModel model = new ConfigModelImpl(); model.setId(CONFIG_ID); model.setName(CONFIG_NAME); model.setComplete(false); model.setConsistent(true); // Root Instance InstanceModel rootInstance; rootInstance = createInstance(); model.setRootInstance(rootInstance); return model; }