/** * Factory of the class * * @param id * id of the class OperationalLimit to create * @return the class created */ public static OperationalLimit create(final String id) { OperationalLimit newOperationalLimit = new OperationalLimit(); newOperationalLimit.setId(id); return newOperationalLimit; }
/** * 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: { 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 OperationalLimit * the reference to the class to copy * @return the class constructed */ private OperationalLimit(final OperationalLimit otherOperationalLimit) { // TODO : check exception safe this.copyBase(otherOperationalLimit); }
this.setOperationalLimitSet(attributeToSet, setInverse); } catch(LinkageException e) { LOGGER.error(e.toString(), e); this.setOperationalLimitSet(attributeToSetFromBoundary, setInverse); } catch(LinkageException e) { LOGGER.error(e.toString(), e); errorMessage.append(idOperationalLimitSet); errorMessage.append("\" in \"OperationalLimit\" of id \""); errorMessage.append(this.getId()); errorMessage.append("\" !"); throw new LinkageException(errorMessage.toString()); errorMessage.append(idOperationalLimitSet); errorMessage.append("\" in \"OperationalLimit\" of id \""); errorMessage.append(this.getId()); errorMessage.append("\" !"); throw new LinkageException(errorMessage.toString()); this.setOperationalLimitType(attributeToSet, setInverse); } catch(LinkageException e) { LOGGER.error(e.toString(), e); this.setOperationalLimitType(attributeToSetFromBoundary, setInverse); } catch(LinkageException e) { LOGGER.error(e.toString(), e); errorMessage.append(idOperationalLimitType);
OperationalLimitSet operationalLimitSetAssociation = otherOperationalLimit.getOperationalLimitSet(); OperationalLimitType operationalLimitTypeAssociation = otherOperationalLimit.getOperationalLimitType();
cim1.model.OperationalLimitType olt = ol.getOperationalLimitType(); float value; switch (olt.getName()) {
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");
/** * Utility to read a reference to a resource * This function is called by the CIMModel * * @param class_name * the read name of class * @param resource_name * the read name of the associated resource * @param id * the id of the associated resource * @param model * the model this class belongs to * @throws InterpretationException */ @Override public void readResource(final String class_name, final String resource_name, final String id, CIMModel model) throws InterpretationException, LinkageException { if (class_name.equals("CurrentLimit")) { StringBuilder errorMessage = new StringBuilder("The association \""); errorMessage.append(resource_name); errorMessage.append("\" in class \""); errorMessage.append(class_name); errorMessage.append("\" could not be found in the model !"); throw new InterpretationException(errorMessage.toString()); } else { super.readResource(class_name, resource_name, id, model); } }
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 OperationalLimit clone() { OperationalLimit newInstance = new OperationalLimit(this); OperationalLimit newInstanceSP = newInstance; return newInstanceSP; }
cim1.model.OperationalLimitType olt = ol.getOperationalLimitType(); if (ol instanceof cim1.model.CurrentLimit) { float value = ((cim1.model.CurrentLimit) ol).getValue();
if (super.modelConsistency().isConsistent()) { consistent = consistent && (true); message.append((super.modelConsistency(subset)).getMessage()); } else { consistent = consistent && (false); message.append((super.modelConsistency(subset)).getMessage());
errorMessage.append("OperationalLimit "); errorMessage.append("which ID has been initialized to : "); errorMessage.append(getId()); LOGGER.error(errorMessage.toString()); LOGGER.error(e.toString(), e); errorMessage.append("OperationalLimit "); errorMessage.append("which ID has been initialized to : "); errorMessage.append(getId()); LOGGER.error(errorMessage.toString()); LOGGER.error(e.toString(), e);
/** * Utility to read a reference to a resource * This function is called by the CIMModel * * @param class_name * the read name of class * @param resource_name * the read name of the associated resource * @param id * the id of the associated resource * @param model * the model this class belongs to * @throws InterpretationException */ @Override public void readResource(final String class_name, final String resource_name, final String id, CIMModel model) throws InterpretationException, LinkageException { if (class_name.equals("VoltageLimit")) { StringBuilder errorMessage = new StringBuilder("The association \""); errorMessage.append(resource_name); errorMessage.append("\" in class \""); errorMessage.append(class_name); errorMessage.append("\" could not be found in the model !"); throw new InterpretationException(errorMessage.toString()); } else { super.readResource(class_name, resource_name, id, model); } }
message.append(getMessageForConsistency(this.minBitset));
super.readAttribute(class_name, attr_name, value, model);
if (super.modelConsistency().isConsistent()) { consistent = consistent && (true); message.append((super.modelConsistency()).getMessage()); } else { consistent = consistent && (false); message.append((super.modelConsistency()).getMessage());
xmlsw.writeEmptyElement(CIMURI.CIMURI,"OperationalLimitSet.OperationalLimitValue"); xmlsw.writeAttribute(CIMModel.rdfURI, "resource", "#" + operationalLimitValue.getId()); } catch (XMLStreamException e) { StringBuilder errorMessage = new StringBuilder(