NAME

OME::SemanticType - data object representing attribute types

Back to Top


SYNOPSIS

        use OME::SemanticType;
        # Load object via primary key
        my $atype = $factory->loadObject("OME::SemanticType",1);
        # Ensure that instance package is created
        my $pkg = $atype->requireAttributeTypePackage();
        # Create a new instance of this attribute type via primary key
        my $attribute = $pkg->load(1);

Back to Top


DESCRIPTION

OME::SemanticType serves two purposes. First, it functoins just like any other OME DBObject, representing rows from the semantic_types table in the OME database. More importantly, though, it serves as the means of creating data classes for each attribute type, similar to how OME::DataTable create data classes for each attribute table.

Back to Top


METHODS

The following methods are available in addition to those defined by the OME::DBObject manpage.

name

        my $name = $type->name();
        $type->name($name);

Returns or sets the name of this semantic type.

description

        my $description = $type->description();
        $type->description($description);

Returns or sets the description of this semantic type.

granularity

        my $granularity = $type->granularity();
        $type->granularity($granularity);

Returns or sets the granularity of this semantic type. Will be either 'G', 'D', 'I', or 'F'.

semantic_elements

        my @columns = $type->semantic_elements();
        my $column_iterator = $type->semantic_elements();

Returns or iterates, depending on context, a list of all of the Columns associated with this module_execution.

label

        # Get the label of this semantic type in the default language for this system
        my $label = $type->label();
        # Get the label of this semantic type in the specified language
        my $label = $type->label( $lang );
        
Looks in the configuration table for a default language. Returns a label
in that language if available. If not avaiable, returns the ST name.

lang_description

        # Get the description of this semantic type in the default language for this system
        my $description = $type->lang_description();
        # Get the description of this semantic type in the specified language
        my $description = $type->lang_description( $lang );
        
Looks in the configuration table for a default language. Returns a description
in that language if available. If not avaiable, returns the ST's description.

Back to Top


AUTHOR

Douglas Creager <dcreager@alum.mit.edu>, Open Microscopy Environment, MIT

Back to Top