Skip to content
This repository was archived by the owner on Dec 20, 2019. It is now read-only.

Bindings

Javier Torrente edited this page Jan 15, 2014 · 3 revisions

Bindings are set in bindings.json.

The format for this file is:

[package_schema_1, package_engine_1],
[SchemaClass1, EngineClass1],
[SchemaClass2, EngineClass2],
   
...
     
[package_schema_2, package_engine_2],
[SchemaClass3, EngineClass3],

Example:

[es.eucm.ead.schema.actors, es.eucm.ead.engine.actors],
[SceneElement, SceneElementActor]

This produce a binding event (transmitted to all BindingListeners registered in BindingLoader) relating schema class es.eucm.ead.schema.actors.SceneElement with engine class es.eucm.ead.engine.actors.SceneElementActor, and the alias "scenelement". Alias are always the name of the class in lowercase.

In bindings, the engine part is optional. If the engine part is not specified, the binding event (method BindingListener#bind(String alias, Class schemaClass, Class engineClass) is only called with the alias and the class. Example:

[es.eucm.ead.schema.behaviors],
[Behavior]

This produces a binding event relating the schema class es.eucm.ead.schema.behaviors.Behavior to the alias "behavior".

Clone this wiki locally