lib/class_expression.js
function(in_type){
    this._is_a = 'class_expression';

    var anchor = this;

    ///
    /// Initialize.
    ///

    // in_type is always a JSON object, trivial catch of attempt to
    // use just a string as a class identifier.
    if( in_type ){
    	if( what_is(in_type) === 'class_expression' ){
    	    // Unfold and re-parse (takes some properties of new
    	    // host).
    	    in_type = in_type.structure();
    	}else if( what_is(in_type) === 'object' ){
	    // Fine as it is.
    	}else if( what_is(in_type) === 'string' ){
	    // Convert to a safe representation.
	    in_type = {
		'type': 'class',
		'id': in_type,
		'label': in_type
	    };
    	}
    }

    // Every single one is a precious snowflake (which is necessary
    // for managing some of the aspects of the UI for some use cases).
    this._id = bbop.uuid();

    // Derived property defaults.
    this._type = null;
    this._category = 'unknown';
    this._class_id = null;
    this._class_label = null;
    this._property_id = null;
    this._property_label = null;
    // Recursive elements.
    this._frame = [];

    // 
    this._raw_type = in_type;
    if( in_type ){
	anchor.parse(in_type);
    }
}
function(in_type){
    this._is_a = 'class_expression';

    var anchor = this;

    ///
    /// Initialize.
    ///

    // in_type is always a JSON object, trivial catch of attempt to
    // use just a string as a class identifier.
    if( in_type ){
    	if( what_is(in_type) === 'class_expression' ){
    	    // Unfold and re-parse (takes some properties of new
    	    // host).
    	    in_type = in_type.structure();
    	}else if( what_is(in_type) === 'object' ){
	    // Fine as it is.
    	}else if( what_is(in_type) === 'string' ){
	    // Convert to a safe representation.
	    in_type = {
		'type': 'class',
		'id': in_type,
		'label': in_type
	    };
    	}
    }

    // Every single one is a precious snowflake (which is necessary
    // for managing some of the aspects of the UI for some use cases).
    this._id = bbop.uuid();

    // Derived property defaults.
    this._type = null;
    this._category = 'unknown';
    this._class_id = null;
    this._class_label = null;
    this._property_id = null;
    this._property_label = null;
    // Recursive elements.
    this._frame = [];

    // 
    this._raw_type = in_type;
    if( in_type ){
	anchor.parse(in_type);
    }
}
function ( in_type ) { this . _is_a = 'class_expression' ; var anchor = this ; /// /// Initialize. /// // in_type is always a JSON object, trivial catch of attempt to // use just a string as a class identifier. if ( in_type ) { if ( what_is ( in_type ) === 'class_expression' ) { // Unfold and re-parse (takes some properties of new // host). in_type = in_type . structure ( ) ; } else if ( what_is ( in_type ) === 'object' ) { // Fine as it is. } else if ( what_is ( in_type ) === 'string' ) { // Convert to a safe representation. in_type = { 'type' : 'class' , 'id' : in_type , 'label' : in_type } ; } } // Every single one is a precious snowflake (which is necessary // for managing some of the aspects of the UI for some use cases). this . _id = bbop . uuid ( ) ; // Derived property defaults. this . _type = null ; this . _category = 'unknown' ; this . _class_id = null ; this . _class_label = null ; this . _property_id = null ; this . _property_label = null ; // Recursive elements. this . _frame = [ ] ; //  this . _raw_type = in_type ; if ( in_type ) { anchor . parse ( in_type ) ; } }
Core constructor.

The argument "in_type" may be:
- a class id (string)
- a JSON blob as described from Minerva
- another <class_expression>
- null (user will load or interactively create one)

@constructor
@param {String|Object|class_expression|null} - the raw type description (see above)
Core constructor .