Package org.takadb.editor.database.entities

Examples of org.takadb.editor.database.entities.CharacterEntity


  /*
   * Retrieve a clone of a DBSQLCharacter from the local database
   */
  public CharacterEntity getCharacter (Integer characterId) {
   
    CharacterEntity character = (CharacterEntity)characters.get (characterId);
   
    return (CharacterEntity)character.clone();

  }
View Full Code Here


    Iterator iter;

    ArrayList<CharacterEntity> allCharactersList = new ArrayList<CharacterEntity>();
    iter = characters.values().iterator();
    while (iter.hasNext()) {
      CharacterEntity character = (CharacterEntity)iter.next();
      allCharactersList.add ((CharacterEntity)character.clone());
    }

    return allCharactersList;

  }
View Full Code Here

    Iterator iter;
   
    iter = allCharactersList.iterator();
    while (iter.hasNext()) {
      CharacterEntity character = (CharacterEntity)iter.next();
      setCharacter (character);
    }

  }
View Full Code Here

   */
  public DBIdentifier findCharacterByJISCode (int jisCode) {

    Iterator iter = characters.values().iterator();
    while (iter.hasNext()) {
      CharacterEntity character = (CharacterEntity)iter.next();
      if (character.jaJisCode == jisCode) {
        return character.getIdentifier();
      }
    }
    return null;
  }
View Full Code Here

   */
  public DBIdentifier findCharacterByUCSCode (int ucsCode) {

    Iterator iter = characters.values().iterator();
    while (iter.hasNext()) {
      CharacterEntity character = (CharacterEntity)iter.next();
      if (character.jaUcsCode == ucsCode) {
        return character.getIdentifier();
      }
    }
    return null;
  }
View Full Code Here

   */
  public DBIdentifier findCharacterByJaElementId (int id) {

    Iterator iter = characters.values().iterator();
    while (iter.hasNext()) {
      CharacterEntity character = (CharacterEntity)iter.next();
      if (character.jaElementId == id) {
        return character.getIdentifier();
      }
    }
    return null;
  }
View Full Code Here

   */
  public int newCharacter() {
    // find the current biggest elementID
    int lMaxID = getMaxCharacterId();
    lMaxID++;
    CharacterEntity lNewEmptyCharacter = new CharacterEntity(lMaxID);
    characters.put(new Integer(lMaxID), lNewEmptyCharacter);
    return lMaxID;
  }
View Full Code Here

   * @param identifier
   * @return
   */
  public int cloneCharacter(int iId) {
    int lId = getMaxCharacterId()+1;
    CharacterEntity lCharacterToClone = getCharacter(new Integer(iId));
    CharacterEntity lNewCharacter = (CharacterEntity) lCharacterToClone.clone();
    lNewCharacter.characterId =  lId;
    //don't use set character as it makes a clone
    characters.put(new Integer(lId), lNewCharacter);
    return lId;
  }
View Full Code Here

        });
    lSortedCharacters.addAll(lCharacters);
   
    for (Iterator lIter = lSortedCharacters.iterator(); lIter.hasNext();)
    {
      CharacterEntity lCurChar = (CharacterEntity) lIter.next();
      GlyphAddress lCurAddress =  _GlyphMappingTable[lCurChar.jaElementId][1];
      lOut.print("\t" + lCurAddress._RecordID + " ");
      if (sVersion >= 5)
        lOut.print(lCurAddress._Offset + " ");
     
View Full Code Here

TOP

Related Classes of org.takadb.editor.database.entities.CharacterEntity

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.