Returns the model description for the model class of the EDBModelObject
545794
public ModelDescription getModelDescription() {
        String modelType = object.getString(EDBConstants.MODEL_TYPE);
        String version = object.getString(EDBConstants.MODEL_TYPE_VERSION);
        return new ModelDescription(modelType, version);
    }
686483
def for_class(digobj, repo):
        ''''''
        full_name = '%s.%s' % (digobj.__module__, digobj.__name__)
        cmodels = getattr(digobj, 'CONTENT_MODELS', None)
        if not cmodels:
            logger.debug('%s has no content models', full_name)
            return None
        if len(cmodels) > 1:
            logger.debug('%s has %d content models', full_name, len(cmodels))
            raise ValueError(('Cannot construct ContentModel object for ' +
                              '%s, which has %d CONTENT_MODELS (only 1 is ' +
                              'supported)') %
                             (full_name, len(cmodels)))

        cmodel_uri = cmodels[0]
        logger.debug('cmodel for %s is %s', full_name, cmodel_uri)
        cmodel_obj = repo.get_object(cmodel_uri, type=ContentModel,
                                     create=False)
        if cmodel_obj.exists:
            logger.debug('%s already exists', cmodel_uri)
            return cmodel_obj

        # otherwise the cmodel doesn't exist. let's create it.
        logger.debug('creating %s from %s', cmodel_uri, full_name)
        cmodel_obj = repo.get_object(cmodel_uri, type=ContentModel,
                                     create=True)
        # XXX: should this use _defined_datastreams instead?
        for ds in digobj._local_datastreams.values():
            ds_composite_model = cmodel_obj.ds_composite_model.content
            type_model = ds_composite_model.get_type_model(ds.id, create=True)
            type_model.mimetype = ds.default_mimetype
            if ds.default_format_uri:
                type_model.format_uri = ds.default_format_uri
        cmodel_obj.save()
        return cmodel_obj
1087979
public String getDescription() {
        return mBodyMap.containsKey(BoxItem.FIELD_DESCRIPTION) ?
                (String) mBodyMap.get(BoxItem.FIELD_DESCRIPTION) :
                null;
    }
347608
def get_point_model(cls):
        
        if is_plugin_point(cls):
            raise Exception(_('This method is only available to plugin '
                              'classes.'))
        else:
            return PluginPointModel.objects.\
                get(plugin__pythonpath=cls.get_pythonpath())
905109
public OpenEngSBModel getCorrespondingModel() throws EKBException {
        ModelDescription description = getModelDescription();
        try {
            Class<?> modelClass = modelRegistry.loadModel(description);
            return (OpenEngSBModel) edbConverter.convertEDBObjectToModel(modelClass, object);
        } catch (ClassNotFoundException e) {
            throw new EKBException(String.format("Unable to load model of type %s", description), e);
        }
    }
543854
@Override
	public void getModelDescription(StringBuilder out, int indent) {
		indent=0;
		if(!this.unorderedRulesOption.isSet()){
			StringUtils.appendIndented(out, indent, "Method Ordered");
			StringUtils.appendNewline(out);
		}else{
			StringUtils.appendIndented(out, indent, "Method Unordered");
			StringUtils.appendNewline(out);
		}
		if(this.DriftDetectionOption.isSet()){
			StringUtils.appendIndented(out, indent, "Change Detection OFF");
			StringUtils.appendNewline(out);
		}else{
			StringUtils.appendIndented(out, indent, "Change Detection ON");
			StringUtils.appendNewline(out);
		}
		if(this.noAnomalyDetectionOption.isSet()){
			StringUtils.appendIndented(out, indent, "Anomaly Detection OFF");
			StringUtils.appendNewline(out);
		}else{
			StringUtils.appendIndented(out, indent, "Anomaly Detection ON");
			StringUtils.appendNewline(out);
		}
		StringUtils.appendIndented(out, indent, "Number of Rules: " + (this.ruleSet.size()+1));
		StringUtils.appendNewline(out);		
	}
427144
private void fillEDBObjectWithEngineeringObjectInformation(EDBObject object, OpenEngSBModel model)
        throws IllegalAccessException {
        if (!new AdvancedModelWrapper(model).isEngineeringObject()) {
            return;
        }
        for (Field field : model.getClass().getDeclaredFields()) {
            OpenEngSBForeignKey annotation = field.getAnnotation(OpenEngSBForeignKey.class);
            if (annotation == null) {
                continue;
            }
            String value = (String) FieldUtils.readField(field, model, true);
            if (value == null) {
                continue;
            }
            value = String.format("%s/%s", ContextHolder.get().getCurrentContextId(), value);
            String key = getEOReferenceStringFromAnnotation(annotation);
            object.put(key, new EDBObjectEntry(key, value, String.class));
        }
    }
1200332
def description(self):
        """"""

        name = None
        try:
            name = self._TYPE_NAMES[self.audioObjectType]
        except IndexError:
            pass
        if name is None:
            return
        if self.sbrPresentFlag == 1:
            name += "+SBR"
        if self.psPresentFlag == 1:
            name += "+PS"
        return text_type(name)
694945
def getDescriptor(klass, **kw):
    
    # XXX: ctypes Structure.__init__ ignores arguments which do not exist
    # as structure fields. So check it.
    # This is annoying, but not doing it is a huge waste of time for the
    # developer.
    empty = klass()
    assert hasattr(empty, 'bLength')
    assert hasattr(empty, 'bDescriptorType')
    unknown = [x for x in kw if not hasattr(empty, x)]
    if unknown:
        raise TypeError('Unknown fields %r' % (unknown, ))
    # XXX: not very pythonic...
    return klass(
        bLength=ctypes.sizeof(klass),
        # pylint: disable=protected-access
        bDescriptorType=klass._bDescriptorType,
        # pylint: enable=protected-access
        **kw
    )
181391
def _pylxd_model_to_dict(obj):
    ''''''
    marshalled = {}
    for key in obj.__attributes__.keys():
        if hasattr(obj, key):
            marshalled[key] = getattr(obj, key)
    return marshalled
1111264
def get_model(self):
        
        model_cls = get_connected_model_for_table_name(self.table_name)
        return model_cls._default_manager.filter(id=self.record_id).first()
1065676
def get_model(self):
        

        return ToolModel(
            name=self.name,
            version="0.0.0",
            parameters=self.parameters_from_dicts(self.parameters)
        )
1337632
public AdvancedModelWrapper loadReferencedModel(Field field, ModelRegistry modelRegistry,
            EngineeringDatabaseService edbService, EDBConverter edbConverter) {
        try {
            ModelDescription description = getModelDescriptionFromField(field);
            String modelKey = (String) FieldUtils.readField(field, model, true);
            if (modelKey == null) {
                return null;
            }
            modelKey = appendContextId(modelKey);
            Class<?> sourceClass = modelRegistry.loadModel(description);
            Object model = edbConverter.convertEDBObjectToModel(sourceClass,
                edbService.getObject(modelKey));
            return new AdvancedModelWrapper((OpenEngSBModel) model);
        } catch (SecurityException e) {
            throw new EKBException(generateErrorMessage(field), e);
        } catch (IllegalArgumentException e) {
            throw new EKBException(generateErrorMessage(field), e);
        } catch (IllegalAccessException e) {
            throw new EKBException(generateErrorMessage(field), e);
        } catch (ClassNotFoundException e) {
            throw new EKBException(generateErrorMessage(field), e);
        }
    }
281780
def get_signal_models(self):
        

        base = self.db.Model
        return [
            cls for cls in base._decl_class_registry.values() if (
                isinstance(cls, type)
                and issubclass(cls, base)
                and hasattr(cls, 'send_signalbus_message')
            )
        ]
1239224
def get_app_model_classes(self):
        
        models = []
        for m in self.models:
            mod, cls = m.rsplit('.', 1)
            mod = import_module(mod)
            models.append(getattr(mod, cls))
        return models
169391
def get_model(self):
        '''
        
        '''
        class Model(object):
            def __init__(self, cnn):
                self.cnn = cnn

        return Model(self.__cnn)
320958
def models_descriptive(self):
        
        f = self._parent
        return {name: {a: f[name].attrs[a]
                       for a in H5File.stored_attributes}
                for name in f.keys()}