/** * Factory of the class * * @param id * id of the class EquivalentEquipment to create * @return the class created */ public static EquivalentEquipment create(final String id) { EquivalentEquipment newEquivalentEquipment = new EquivalentEquipment(); newEquivalentEquipment.setId(id); return newEquivalentEquipment; }
/** * Copy constructor * The associations with other objects are not copied * * @param EquivalentEquipment * the reference to the class to copy * @return the class constructed */ private EquivalentEquipment(final EquivalentEquipment otherEquivalentEquipment) { // TODO : check exception safe this.copyBase(otherEquivalentEquipment); }
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 EquivalentEquipment clone() { EquivalentEquipment newInstance = new EquivalentEquipment(this); EquivalentEquipment newInstanceSP = newInstance; return newInstanceSP; }
/** * 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); // The function has been called by a concrete class : // the checking has already been done so we can clear everything ! super.clearContent(subset); }
/** * Utility to resolve the links at the end of parsing * * @param model * the model this class belongs to * @param boundaryModel * the model that gather data about the boundarySet, used * as a resource force links resolving * @throws Linkage Exception */ @Override public void resolveLinks(CIMModel model, CIMModel boundaryModel) throws LinkageException { super.resolveLinks(model, boundaryModel); removeFromUnresolved(); }
/** * 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 \"EquivalentEquipment\" 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(); }
writeClass(xmlsw); super.write(xmlsw, false); return; writeClass(xmlsw); super.write(xmlsw, subset, false); return;
message.append(getMessageForConsistency(this.minBitset));