message.append(this.getId()); message.append("\" is not consistent in this context:\n");
/** * Utility to return the content of this class into the CIM XML format * * @param xmlsw * the stream in which are stored the elements to write */ private void writeClass(XMLStreamWriter xmlsw) { if (currentBitset.get(0)) { for (SubGeographicalRegion regions : this.regions){ try { xmlsw.writeEmptyElement(CIMURI.CIMURI,"GeographicalRegion.Regions"); xmlsw.writeAttribute(CIMModel.rdfURI, "resource", "#" + regions.getId()); } catch (XMLStreamException e) { StringBuilder errorMessage = new StringBuilder( "Error while trying to write the reference to "); errorMessage.append("GeographicalRegion "); errorMessage.append("which ID has been initialized to : "); errorMessage.append(getId()); errorMessage.append(" in the subset "); errorMessage.append("Equipment"); LOGGER.error(errorMessage.toString()); LOGGER.error(e.toString(), e); } } } return; }
errorMessage.append("SubGeographicalRegion "); errorMessage.append("which ID has been initialized to : "); errorMessage.append(getId()); LOGGER.error(errorMessage.toString()); LOGGER.error(e.toString(), e); errorMessage.append("SubGeographicalRegion "); errorMessage.append("which ID has been initialized to : "); errorMessage.append(getId()); errorMessage.append(" in the subset "); errorMessage.append("Equipment");
/** * 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 otherSubstation * the instance to copy */ public void copyBase(final Substation otherSubstation) { // 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 (otherSubstation.currentBitset.get(0)) { SubGeographicalRegion regionAssociation = otherSubstation.getRegion(); //this.idRegion = (regionAssociation != null) ? regionAssociation.getId() : ""; if (regionAssociation != null) { this.idRegion = regionAssociation.getId(); // the proper bit will be set when the setter is called } else { this.idRegion = ""; } } // TODO : Call the parent copy constructor instead ? super.copyBase(otherSubstation); }
xmlsw.writeAttribute(CIMModel.rdfURI, "ID", getId()); errorMessage.append("SubGeographicalRegion "); errorMessage.append("which ID has been initialized to : "); errorMessage.append(getId()); LOGGER.error(errorMessage.toString()); LOGGER.error(e.toString(), e); errorMessage.append("SubGeographicalRegion "); 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, "SubGeographicalRegion"); xmlsw.writeAttribute(CIMModel.rdfURI, "ID", getId()); errorMessage.append("SubGeographicalRegion "); errorMessage.append("which ID has been initialized to : "); errorMessage.append(getId()); errorMessage.append(" in the subset "); errorMessage.append("Equipment"); errorMessage.append("SubGeographicalRegion "); errorMessage.append("which ID has been initialized to : "); errorMessage.append(getId()); errorMessage.append(" in the subset "); errorMessage.append("Equipment");
errorMessage.append(idRegion); errorMessage.append("\" in \"SubGeographicalRegion\" of id \""); errorMessage.append(this.getId()); errorMessage.append("\" !"); throw new LinkageException(errorMessage.toString()); errorMessage.append(idRegion); errorMessage.append("\" in \"SubGeographicalRegion\" of id \""); errorMessage.append(this.getId()); errorMessage.append("\" !"); throw new LinkageException(errorMessage.toString());
SubGeographicalRegion value = entry.getValue(); newSubGeographicalRegion = value; this.id_SubGeographicalRegion.put(newSubGeographicalRegion.getId(), newSubGeographicalRegion); this.allInstances.put(newSubGeographicalRegion.getId(), newSubGeographicalRegion); newMap.put(newSubGeographicalRegion.getId(), newSubGeographicalRegion); this.subsetsInstances.put( .put(newSubGeographicalRegion.getId(), newSubGeographicalRegion);