]> gitweb.fperrin.net Git - Dictionary.git/blob - src/com/hughes/android/dictionary/DictionaryInfo.java
UI changes, (experiments), Arabic rendering changes, changing the way
[Dictionary.git] / src / com / hughes / android / dictionary / DictionaryInfo.java
1 // Copyright 2011 Google Inc. All Rights Reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 package com.hughes.android.dictionary;
16
17 import java.io.Serializable;
18
19 public class DictionaryInfo implements Serializable {
20   
21   private static final long serialVersionUID = -6850863377577700388L;
22   
23   // Stuff populated from the text file.
24   public final String[] langIsos = new String[2];
25   public String uncompressedFilename;
26   public long uncompressedSize;
27   public final int[] allTokenCounts = new int[2];
28   public final int[] mainTokenCounts = new int[2];
29
30   String name;  // Determined at runtime based on locale on device--user editable.
31   String localFile;  // Determined based on device's Environment.
32   String downloadUrl;
33   
34   @Override
35   public String toString() {
36     return name;
37   }
38
39   public String toTabSeparatedString() {
40     return String.format("%s\t%s\t%s\t%d\t%d\t%d\t%d\t%d", langIsos[0],
41         langIsos[1], uncompressedFilename, uncompressedSize,
42         mainTokenCounts[0], mainTokenCounts[1], allTokenCounts[0],
43         allTokenCounts[1]);
44   }
45   
46   
47 }