Class: Resource

composer-common. Resource


Resource is an instance that has a type. The type of the resource
specifies a set of properites (which themselves have types).



Type information in Composer is used to validate the structure of
Resource instances and for serialization.



Resources are used in Composer to represent Assets, Participants, Transactions and
other domain classes that can be serialized for long-term persistent storage.


new Resource(modelManager, ns, type, id)

This constructor should not be called directly.


Note: Only to be called by framework code. Applications should
retrieve instances from Factory

Parameters:
Name Type Description
modelManager ModelManager

The ModelManager for this instance

ns string

The namespace this instance.

type string

The type this instance.

id string

The identifier of this instance.

Source:
See:

Extends

  • Identifiable

Methods


isResource()

Determine if this identifiable is a resource.

Source:
Returns:

True if this identifiable is a resource,
false if not.

Type
boolean

toString()

Returns the string representation of this class

Source:
Returns:

the string representation of the class

Type
String