ValidatedConcept (Common API)

Overview - Common API - Client API - Admin API - Runtime API

ValidatedConcept

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.

Details

  • Extends Concept

  • Module common

See also

Method Summary

Name Returns Description
addArrayValue void Adds an array property value, validating that it does not violate the model
setPropertyValue void Sets a property, validating that it does not violate the model
validate void Validates the instance against its model

Inherited Method Summary

Supertype Name Returns Description
Concept isConcept boolean Determine if this typed is a concept
Typed getType string Get the type of the instance (a short name, not including namespace)
Typed getFullyQualifiedType string Get the fully-qualified type name of the instance (including namespace)
Typed getNamespace string Get the namespace of the instance
Typed instanceOf boolean Check to see if this instance is an instance of the specified fully qualified type name

Method Details

setPropertyValue

setPropertyValue( string propname, string value )

Sets a property, validating that it does not violate the model

Parameters

Name Type Mandatory Description
propName string Yes the name of the field
value string Yes the value of the property

addArrayValue

addArrayValue( string propname, string value )

Adds an array property value, validating that it does not violate the model

Parameters

Name Type Mandatory Description
propName string Yes the name of the field
value string Yes the value of the property

validate

validate( )

Validates the instance against its model.

Parameters

No parameters

Inherited methods

isConcept

boolean isConcept( )

Inherited from: Concept

Determine if this typed is a concept.

Returns

boolean - True if this typed is a concept, false if not.

Parameters

No parameters

getType

string getType( )

Inherited from: Typed

Get the type of the instance (a short name, not including namespace).

Returns

string - The type of this object

Parameters

No parameters

getFullyQualifiedType

string getFullyQualifiedType( )

Inherited from: Typed

Get the fully-qualified type name of the instance (including namespace).

Returns

string - The fully-qualified type name of this object

Parameters

No parameters

getNamespace

string getNamespace( )

Inherited from: Typed

Get the namespace of the instance.

Returns

string - The namespace of this object

Parameters

No parameters

instanceOf

boolean instanceOf( String fqt )

Inherited from: Typed

Check to see if this instance is an instance of the specified fully qualified type name.

Returns

boolean - True if this instance is an instance of the specified fully qualified type name, false otherwise.

Parameters

Name Type Mandatory Description
fqt String Yes The fully qualified type name.