org.apache.sling.provisioning.model

## Class Model

- java.lang.Object
- - org.apache.sling.provisioning.model.Traceable
  - - org.apache.sling.provisioning.model.Model

    public class Model
    extends Traceable

A model is the central object. It consists of features.

### Constructor Summary

Constructors
Constructor and Description
`Model()`

### Method Summary

All Methods Instance Methods Concrete Methods
`Feature` `getFeature(String name)` Find the feature if available
`List<Feature>` `getFeatures()` Return all features.
`Feature` `getOrCreateFeature(String name)` Get or create the feature.
`String` `toString()`

### Methods inherited from class org.apache.sling.provisioning.model.Traceable

`getLocation, setLocation`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### Model

    public Model()

### Method Detail

#### getFeature

    public Feature getFeature(String name)

Find the feature if available

Parameters:
  `name` - The feature name
Returns:
  The feature or `null`.

#### getOrCreateFeature

    public Feature getOrCreateFeature(String name)

Get or create the feature.

Parameters:
  `name` - Feature name
Returns:
  The feature for the given name.

#### getFeatures

    public List<Feature> getFeatures()

Return all features. The returned list is modifiable and directly modifies the model.

Returns:
  The list of features.

#### toString

    public String toString()

Overrides:
  `toString` in class `Traceable`