/** * Factory of the class * * @param id * id of the class RegulatingCondEq to create * @return the class created */ public static RegulatingCondEq create(final String id) { RegulatingCondEq newRegulatingCondEq = new RegulatingCondEq(); newRegulatingCondEq.setId(id); return newRegulatingCondEq; }
/** * Utility to clear the associations of this class belonging to a * specific subset * * @param subset * the subset from which to clear the associations of this class */ @Override protected void clearAssociations(final Subset subset) { switch (subset) { case StateVariables: { // reset the Reference svShuntCompensatorSections = null; idSvShuntCompensatorSections = ""; this.currentBitset.clear(0); super.clearAssociations(subset); break; } case Topology: { super.clearAssociations(subset); break; } case Equipment: { super.clearAssociations(subset); break; } default: // nothing to clear } }
/** * Copy constructor * The associations with other objects are not copied * * @param RegulatingCondEq * the reference to the class to copy * @return the class constructed */ private RegulatingCondEq(final RegulatingCondEq otherRegulatingCondEq) { // TODO : check exception safe this.copyBase(otherRegulatingCondEq); }
|| (model.getCurrentSubset() == Subset.Equipment)) { idSvShuntCompensatorSections = id.substring(1); if (!super.isAddedToUnresolved()) { model.addUnresolved(); super.addToUnresolved(); throw new InterpretationException(errorMessage.toString()); } else { super.readResource(class_name, resource_name, id, model);
this.setRegulatingControl(attributeToSet, setInverse); } catch(LinkageException e) { LOGGER.error(e.toString(), e); this.setRegulatingControl(attributeToSetFromBoundary, setInverse); } catch(LinkageException e) { LOGGER.error(e.toString(), e); errorMessage.append(idRegulatingControl); errorMessage.append("\" in \"RegulatingCondEq\" of id \""); errorMessage.append(this.getId()); errorMessage.append("\" !"); throw new LinkageException(errorMessage.toString()); errorMessage.append(idRegulatingControl); errorMessage.append("\" in \"RegulatingCondEq\" of id \""); errorMessage.append(this.getId()); errorMessage.append("\" !"); throw new LinkageException(errorMessage.toString()); removeFromUnresolved();
if (super.modelConsistency().isConsistent()) { consistent = consistent && (true); message.append((super.modelConsistency()).getMessage()); } else { consistent = consistent && (false); message.append((super.modelConsistency()).getMessage());
errorMessage.append("RegulatingCondEq "); errorMessage.append("which ID has been initialized to : "); errorMessage.append(getId()); LOGGER.error(errorMessage.toString()); LOGGER.error(e.toString(), e);
message.append(getMessageForConsistency(this.minBitsets.get(subset)));
super.readAttribute(class_name, attr_name, value, model);
/** * 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 RegulatingCondEq clone() { RegulatingCondEq newInstance = new RegulatingCondEq(this); RegulatingCondEq newInstanceSP = newInstance; return newInstanceSP; }
/** * 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 otherRegulatingCondEq * the instance to copy */ public void copyBase(final RegulatingCondEq otherRegulatingCondEq) { // 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. if (otherRegulatingCondEq.currentBitset.get(0)) { RegulatingControl regulatingControlAssociation = otherRegulatingCondEq.getRegulatingControl(); //this.idRegulatingControl = (regulatingControlAssociation != null) ? regulatingControlAssociation.getId() : ""; if (regulatingControlAssociation != null) { this.idRegulatingControl = regulatingControlAssociation.getId(); // the proper bit will be set when the setter is called } else { this.idRegulatingControl = ""; } } // TODO : Call the parent copy constructor instead ? super.copyBase(otherRegulatingCondEq); }
|| (model.getCurrentSubset() == Subset.Equipment)) { idMemberOf_GeneratingUnit = id.substring(1); if (!super.isAddedToUnresolved()) { model.addUnresolved(); super.addToUnresolved(); || (model.getCurrentSubset() == Subset.Equipment)) { idDrives_HydroPump = id.substring(1); if (!super.isAddedToUnresolved()) { model.addUnresolved(); super.addToUnresolved(); || (model.getCurrentSubset() == Subset.Equipment)) { idInitialReactiveCapabilityCurve = id.substring(1); if (!super.isAddedToUnresolved()) { model.addUnresolved(); super.addToUnresolved(); throw new InterpretationException(errorMessage.toString()); } else { super.readResource(class_name, resource_name, id, model);
if (super.modelConsistency().isConsistent()) { consistent = consistent && (true); message.append((super.modelConsistency(subset)).getMessage()); } else { consistent = consistent && (false); message.append((super.modelConsistency(subset)).getMessage());
message.append(this.getId()); message.append("\" is not consistent in this context:\n");
message.append(getMessageForConsistency(this.minBitset));
super.readAttribute(class_name, attr_name, value, model);
if (super.modelConsistency().isConsistent()) { consistent = consistent && (true); message.append((super.modelConsistency(subset)).getMessage()); } else { consistent = consistent && (false); message.append((super.modelConsistency(subset)).getMessage());
super.copyBase(otherShuntCompensator);
super.clearAssociations(subset); break; super.clearAssociations(subset); break; idInitialReactiveCapabilityCurve = ""; this.currentBitset.clear(13); super.clearAssociations(subset); break;
xmlsw.writeEmptyElement(CIMURI.CIMURI,"RegulatingControl.RegulatingCondEq"); xmlsw.writeAttribute(CIMModel.rdfURI, "resource", "#" + regulatingCondEq.getId()); } catch (XMLStreamException e) { StringBuilder errorMessage = new StringBuilder(