Class Entity<E extends Entity>

java.lang.Object
eu.bandm.tscore.base.Entity<E>
All Implemented Interfaces:
Translet.Parseable<E>
Direct Known Subclasses:
Accidental, Artikulation, Clef, ClefUsage, Color_rgb_8, DoppelHaken, FunctionalGender, FunctionalInterval, FunctionalKey, Haken, InterpolationKind, MixedNoteheadAddendum, OctaveRegister, Ornament, PitchModOctave, RelWert

public abstract class Entity<E extends Entity> extends Object implements Translet.Parseable<E>
Base class for all things which are in a certain multi-lingual catalog, and have a common parser for their symbolic appearance in scores, and which form a common semantic domain.

Attention
The type parameter of each subclass must be that subclass itself! It is needed to parametrize instantiation, of the above-mentioned catalog, parsers, etc. Eg.:
public class Articulation extends Entity <Articulation>
Every constructor requires the EntityCatalog into which the new Entity instance is stored. (So the relation from Entity to EntityCatalog is "many-to-one").
The basic architecture of tscore is multi lingual, based on the eu.bandm.tools.muli package. Therefore the different constructors may get more than one "name" argument, and there are different retrieve methods for names. Please note that a default for the language is defined one level above, namely by EntityCatalog.getDefaultLanguage().
  • Field Details

    • catalog

      protected EntityCatalog<E extends Entity> catalog
      The multi-lingual catalog in which this entitiy is contained.
    • documentations

      protected MuLi documentations
      The multi-lingual explanation texts for this entitiy.
  • Constructor Details

    • Entity

      public Entity(EntityCatalog<E> catalog)
      Creates a new entity with (possibly) multiple names in multiple languages. This constructor is special as it does not define any name, but the the names must be added afterwards by calling EntityCatalog.addEntityNames(Entity,MuLi), or sim.

      ATTENTION The uniqeness of the names of the different entities in one EntityCatalog (in the different languages or the same language) is not checked.

      Parameters:
      catalog - where to enter the new instance
    • Entity

      public Entity(EntityCatalog<E> catalog, Map<String,String> names)
      Creates a new entity with (possibly) multiple names in multiple languages. Further names can be added afterwards by calling EntityCatalog.addEntityNames(Entity,MuLi), or sim.

      ATTENTION The uniqeness of the names of the different entities in one EntityCatalog (in the different languages or even in the same language) is curently not checked.

      Parameters:
      catalog - where to enter the new instance
      names - mapping from language to name
    • Entity

      public Entity(EntityCatalog<E> catalog, String lang, String name)
      Creates a new entity with only one name. Further names can be added afterwards by calling EntityCatalog.addEntityNames(Entity,MuLi), or sim.

      ATTENTION The uniqeness of the names of the different entities in one EntityCatalog (in the different languages or the same language) is not checked.

      Parameters:
      catalog - where to enter the new instance
      lang - language of the name
      name - name of the entity
    • Entity

      public Entity(EntityCatalog<E> catalog, MuLi humanNames)
      Creates a new entity with (possibly) multiple names in multiple languages. Further names can be added afterwards by calling EntityCatalog.addEntityNames(Entity,MuLi), or sim.

      ATTENTION The uniqeness of the names of the different entities in one EntityCatalog (in the different languages or the same language) is not checked.

      Parameters:
      catalog - where to enter the new instance
      humanNames - mapping from language to name
  • Method Details