// end declare accessors public static void checkClassConsistency(ModelRoot modelRoot) { Ooaofooa.log.println( ILogger.OPERATION, "Informal Argument", //$NON-NLS-1$ " Operation entered: Informal Argument::checkClassConsistency"); //$NON-NLS-1$ if (Boolean.valueOf(System.getenv("PTC_MCC_ENABLED")) == false) { // $NON-NLS-1$ return; } InformalArgument_c[] objs = InformalArgument_c.InformalArgumentInstances(modelRoot, null, false); for (int i = 0; i < objs.length; i++) { objs[i].checkConsistency(); } }
public boolean checkConsistency() { Ooaofooa.log.println( ILogger.OPERATION, "Informal Argument", //$NON-NLS-1$ " Operation entered: Informal Argument::checkConsistency"); //$NON-NLS-1$ if (Boolean.valueOf(System.getenv("PTC_MCC_ENABLED")) == false) { // $NON-NLS-1$ return true; } ModelRoot modelRoot = getModelRoot(); boolean retval = true; class InformalArgument_c_test39587_c implements ClassQueryInterface_c { InformalArgument_c_test39587_c(java.util.UUID p39588) { m_p39588 = p39588; } private java.util.UUID m_p39588; public boolean evaluate(Object candidate) { InformalArgument_c selected = (InformalArgument_c) candidate; boolean retval = false; retval = (selected.getArg_id().equals(m_p39588)); return retval; } } InformalArgument_c[] objs39586 = InformalArgument_c.InformalArgumentInstances( modelRoot, new InformalArgument_c_test39587_c(getArg_id())); if (((objs39586.length) == 0)) { if (CorePlugin.getDefault().isDebugging()) { Ooaofooa.log.println( ILogger.CONSISTENCY, "Informal Argument", //$NON-NLS-1$ "Consistency: Object: Informal Argument: Cardinality of an identifier is zero. " //$NON-NLS-1$ + "Actual Value: " + Integer.toString(objs39586.length)); // $NON-NLS-1$ } else { Exception e = new Exception(); CorePlugin.logError( "Consistency: Object: Informal Argument: Cardinality of an identifier is zero. " //$NON-NLS-1$ + "Actual Value: " //$NON-NLS-1$ + Integer.toString(objs39586.length), e); } retval = false; } if (((objs39586.length) > 1)) { if (CorePlugin.getDefault().isDebugging()) { Ooaofooa.log.println( ILogger.CONSISTENCY, "Informal Argument", //$NON-NLS-1$ "Consistency: Object: Informal Argument: Cardinality of an identifier is greater than 1. " //$NON-NLS-1$ + "Actual Value: " //$NON-NLS-1$ + Integer.toString(objs39586.length) + " Arg_ID: " + "Not Printable"); //$NON-NLS-1$ } else { Exception e = new Exception(); CorePlugin.logError( "Consistency: Object: Informal Argument: Cardinality of an identifier is greater than 1. " //$NON-NLS-1$ + "Actual Value: " //$NON-NLS-1$ + Integer.toString(objs39586.length) + " Arg_ID: " + "Not Printable", e); //$NON-NLS-1$ } retval = false; } // Informal Argument is a subtype in association: rel.Numb = 1013 // The supertype class is: Message Argument class MessageArgument_c_test39592_c implements ClassQueryInterface_c { MessageArgument_c_test39592_c(java.util.UUID p39593) { m_p39593 = p39593; } private java.util.UUID m_p39593; public boolean evaluate(Object candidate) { MessageArgument_c selected = (MessageArgument_c) candidate; boolean retval = false; retval = (selected.getArg_id().equals(m_p39593)); return retval; } } MessageArgument_c[] objs39591 = MessageArgument_c.MessageArgumentInstances( modelRoot, new MessageArgument_c_test39592_c(getArg_id())); if (((objs39591.length) != 1)) { if (CorePlugin.getDefault().isDebugging()) { Ooaofooa.log.println( ILogger.CONSISTENCY, "Informal Argument", //$NON-NLS-1$ "Consistency: Object: Informal Argument: Association: 1013: Cardinality of a supertype is not equal to 1. " //$NON-NLS-1$ + "Actual Value: " + Integer.toString(objs39591.length)); // $NON-NLS-1$ } else { Exception e = new Exception(); CorePlugin.logError( "Consistency: Object: Informal Argument: Association: 1013: Cardinality of a supertype is not equal to 1. " //$NON-NLS-1$ + "Actual Value: " //$NON-NLS-1$ + Integer.toString(objs39591.length), e); } retval = false; } return retval; }