/** * Utility in charge of creating the message when the class is not * consistent within a specific context * * @param minBitset * bitset describing which CIM attributes of this class have * to be set so that it is consistent within a * specific subset context * @return the message explaining what is not consistent */ private String getMessageForConsistency(final BitSet minBitset) { StringBuilder message = new StringBuilder( "Instance of \"HydroGeneratingUnit\" of id \""); message.append(this.getId()); message.append("\" is not consistent in this context:\n"); /* * XOR and then AND * The result is : * "1" : has not been set and need to be * "0" : has been set or is not mandatory */ BitSet isNotSet = new BitSet(minBitset.length()); isNotSet.or(minBitset); // we create a copy of minBitset isNotSet.xor(this.currentBitset); isNotSet.and(minBitset); return message.toString(); }
xmlsw.writeAttribute(CIMModel.rdfURI, "ID", getId()); errorMessage.append("HydroGeneratingUnit "); errorMessage.append("which ID has been initialized to : "); errorMessage.append(getId()); LOGGER.error(errorMessage.toString()); LOGGER.error(e.toString(), e); errorMessage.append("HydroGeneratingUnit "); errorMessage.append("which ID has been initialized to : "); errorMessage.append(getId()); LOGGER.error(errorMessage.toString()); LOGGER.error(e.toString(), e); try { xmlsw.writeStartElement(CIMURI.CIMURI, "HydroGeneratingUnit"); xmlsw.writeAttribute(CIMModel.rdfURI, "ID", getId()); errorMessage.append("HydroGeneratingUnit "); errorMessage.append("which ID has been initialized to : "); errorMessage.append(getId()); errorMessage.append(" in the subset "); errorMessage.append("Equipment"); errorMessage.append("HydroGeneratingUnit "); errorMessage.append("which ID has been initialized to : "); errorMessage.append(getId()); errorMessage.append(" in the subset "); errorMessage.append("Equipment");
HydroGeneratingUnit value = entry.getValue(); newHydroGeneratingUnit = value; this.id_HydroGeneratingUnit.put(newHydroGeneratingUnit.getId(), newHydroGeneratingUnit); this.allInstances.put(newHydroGeneratingUnit.getId(), newHydroGeneratingUnit); newMap.put(newHydroGeneratingUnit.getId(), newHydroGeneratingUnit); this.subsetsInstances.put( .put(newHydroGeneratingUnit.getId(), newHydroGeneratingUnit);