OsidObject Pattern

The domain object itself — extend to hold your data and expose it through the OSID interface.

Overview

An OsidObject is the core value in a domain. It carries an Id, a display name, a description, and optionally a genus type. It also exposes OSID records — extension points that let consumers discover and use capabilities beyond the base interface. Extend AbstractOsidObject to add your domain-specific fields and override the display name and description accessors to source them from your data model.

Read the javadoc (or the source) for the abstract class you are extending to understand which values you must supply to construct a fully compliant OsidObject. Running your OsidObject through a Validator helps ensure you don't miss anything.

Javadoc Reference

net.okapia.osid.jamocha.spi

Class Declaration Pattern

public abstract class AbstractOsidObject
extends AbstractOsidObject
implements OsidObject

Constructor Pattern

AbstractOsidObject(Id id, OsidRecord[] records)
ParameterTypeDescription
id Id the unique identifier for this object
records OsidRecord[] extension records supported by this object instance

Key Override Pattern

public DisplayText getDisplayName()
public DisplayText getDescription()
public Type getGenusType()