---
name: "GO::Model::Root"
section: "3pm"
platform: "linux"
package: "libgo-perl"
version: "0.15-10"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/GO::Model::Root"
---

# GO::Model::Root(3pm)

## NAME

```
  GO::Model::Root - base class for all GO::Model objects
```

## DESCRIPTION

base class for all GO::Model objects

## Constructors

### new

Constructor: Basically just calls \_initialize().  Most subclasses should not need to override new, but instead should override \_initialize().

If \_initialize() fails , the procedure will die

WARNING: This procedure will die if initialization is unsuccessful.   Use an eval statement to catch such exceptions.

### obj\_factory

```
  Usage   - $obj->obj_factory->create_new_term_object($h);
  Alias   - apph
  Returns - L<GO::ObjFactory>
  Args    - none
```

### sprint\_self

Prints out a description of the object to a string.

### dump

dumps the object (can be read back in with eval)

### namespace

```
  Usage   - print $term->namespace();     # getting the type
  Usage   - $term->namespace("molecular_function"); # setting the type
  Alias   - type
  Alias   - term_type
  Alias   - category
  Alias   - ontology
  Returns - string representing type
  Args    - string represnting type [optional]
```

The OBO namespace for the GO::Model::Term or GO::Model::Relationship

### \_cleanup

Called at object destruction time.  Should be overridden to perform cleanup tasks.
