/** * Factory of the class * * @param id * id of the class ControlArea to create * @return the class created */ public static ControlArea create(final String id) { ControlArea newControlArea = new ControlArea(); newControlArea.setId(id); return newControlArea; }
/** * Utility to set the "controlAreaValue" * * @param controlAreaValue * instance to set * @param setInverse * boolean to specify whether to set the inverse association * or not * @throws LinkageException */ public void setControlArea( ControlArea controlAreaValue, boolean setInverse) throws LinkageException { this.controlArea = controlAreaValue; this.currentBitset.set(1); if (setInverse) { if (controlAreaValue != null) { controlAreaValue.addControlAreaGeneratingUnit(this, false); } } }
/** * Utility to set the "controlAreaValue" * * @param controlAreaValue * instance to set * @param setInverse * boolean to specify whether to set the inverse association * or not * @throws LinkageException */ public void setControlArea( ControlArea controlAreaValue, boolean setInverse) throws LinkageException { this.controlArea = controlAreaValue; this.currentBitset.set(1); if (setInverse) { if (controlAreaValue != null) { controlAreaValue.addTieFlow(this, false); } } }
/** * Utility to copy the "base" of an other instance of the same class * This utility does not copy the associations with other instances from * the instance to copy * * @param otherControlArea * the instance to copy */ public void copyBase(final ControlArea otherControlArea) { float newnetInterchange; // assigning primitive type : if (otherControlArea.currentBitset.get(0)) { newnetInterchange = otherControlArea.getNetInterchange(); this.setNetInterchange(newnetInterchange); } float newpTolerance; // assigning primitive type : if (otherControlArea.currentBitset.get(1)) { newpTolerance = otherControlArea.getPTolerance(); this.setPTolerance(newpTolerance); } // Memory allocation has done successfully ! // Dropping "old" objects... // This part may change : we do nothing to allow the user to access // object by their id from the global model. // TODO : Call the parent copy constructor instead ? super.copyBase(otherControlArea); }
xmlsw.writeCharacters(String.valueOf(getNetInterchange())); xmlsw.writeEndElement(); errorMessage.append("ControlArea "); errorMessage.append("which ID has been initialized to : "); errorMessage.append(getId()); LOGGER.error(errorMessage.toString()); LOGGER.error(e.toString(), e); xmlsw.writeCharacters(String.valueOf(getPTolerance())); xmlsw.writeEndElement(); errorMessage.append("ControlArea "); errorMessage.append("which ID has been initialized to : "); errorMessage.append(getId()); LOGGER.error(errorMessage.toString()); LOGGER.error(e.toString(), e); errorMessage.append("ControlArea "); errorMessage.append("which ID has been initialized to : "); errorMessage.append(getId()); errorMessage.append(" in the subset "); errorMessage.append("Equipment"); errorMessage.append("ControlArea "); errorMessage.append("which ID has been initialized to : "); errorMessage.append(getId()); errorMessage.append(" in the subset "); errorMessage.append("Equipment");
xmlsw.writeAttribute(CIMModel.rdfURI, "ID", getId()); errorMessage.append("ControlArea "); errorMessage.append("which ID has been initialized to : "); errorMessage.append(getId()); LOGGER.error(errorMessage.toString()); LOGGER.error(e.toString(), e); writeClass(xmlsw); super.write(xmlsw, false); errorMessage.append("ControlArea "); 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, "ControlArea"); xmlsw.writeAttribute(CIMModel.rdfURI, "ID", getId()); errorMessage.append("ControlArea "); errorMessage.append("which ID has been initialized to : "); errorMessage.append(getId()); errorMessage.append(" in the subset "); errorMessage.append("Equipment"); writeClass(xmlsw); super.write(xmlsw, subset, false);
ControlArea newControlArea = new ControlArea(); ControlArea value = entry.getValue(); newControlArea = value; this.id_ControlArea.put(newControlArea.getId(), newControlArea); this.allInstances.put(newControlArea.getId(), newControlArea); newMap.put(newControlArea.getId(), newControlArea); this.subsetsInstances.put( .put(newControlArea.getId(), newControlArea);
message.append(this.getId()); message.append("\" is not consistent in this context:\n");
message.append(getMessageForConsistency(this.minBitsets.get(subset)));
/** * Utility returning a copy of the "base" of this instance * This utility does not copy the associations with other instances * * @return a clone of this instance */ public ControlArea clone() { ControlArea newInstance = new ControlArea(this); ControlArea newInstanceSP = newInstance; return newInstanceSP; }
/** * Copy constructor * The associations with other objects are not copied * * @param ControlArea * the reference to the class to copy * @return the class constructed */ private ControlArea(final ControlArea otherControlArea) { // TODO : check exception safe this.copyBase(otherControlArea); }
/** * Utility to "clear" the content of a class when a subset is invalidated * * @param subset subset to clean */ @Override public void clearContent(Subset subset) { // First of all, we clear the associations: this.clearAssociations(subset); switch (subset) { default: // nothing to clear } }
/** * Utility to set the "controlAreaValue" * * @param controlAreaValue * instance to set * @param setInverse * boolean to specify whether to set the inverse association * or not * @throws LinkageException */ public void setControlArea( ControlArea controlAreaValue, boolean setInverse) throws LinkageException { this.controlArea = controlAreaValue; this.currentBitset.set(10); if (setInverse) { if (controlAreaValue != null) { controlAreaValue.addTopologicalNode(this, false); } } }
this.idControlArea = controlAreaAssociation.getId();
message.append(getMessageForConsistency(this.minBitset));
this.idControlArea = controlAreaAssociation.getId();
this.idControlArea = controlAreaAssociation.getId();