package org.grammaticalframework.reader;

/**
 * Concrete category are a maping from category names (abstract-categories)
 * to multiple, conjoint, concrete categories.
 * They are represented in the pgf binary by :
 *  - the name of the abstract category (ex: Adj)
 *  - the first concrete categoy (ex : C18)
 *  - the last corresponding concrete category (ex : C21)
 *  - a list of labels (names of fields in the pmcfg tuples)
 * Here we will keep only the indices.
 */
public class CncCat {
	private String name;
	private int firstFId;
	private int lastFId;
	private String[] labels;

public CncCat(String _name, int _firstFId, int _lastFId, String[] _labels)
{name = _name;
 firstFId = _firstFId;
 lastFId = _lastFId;
 labels = _labels;
}

public String toString()
{String ss = "Name : "+name+" , First id : "+firstFId+" , Last id : "+lastFId+"\n Labels :";
for(int i=0; i<labels.length; i++)
	ss+=(" "+labels[i]);
return ss;
}

public String getName() {return name;}
public int getFirstId() {return firstFId;}
public int getLastId() {return lastFId;}
public String[] getLabels() {return labels;}


}

@@ -487,17 +487,20 @@
 ncCat %7B%0A
-%09
+    
 private 
@@ -512,17 +512,20 @@
 g name;%0A
-%09
+    
 private 
@@ -531,28 +531,31 @@
  int firstFI
-d;%0A%09
+D;%0A    
 private int 
@@ -564,12 +564,17 @@
 stFI
-d;%0A%09
+D;%0A    //
 priv
@@ -595,16 +595,20 @@
 abels;%0A%0A
+    
 public C
@@ -673,18 +673,27 @@
 _labels)
-%0A%7B
+ %7B%0A        
 name = _
@@ -698,24 +698,31 @@
  _name;%0A
+       
  firstFI
 d = _fir
@@ -709,25 +709,25 @@
      firstFI
-d
+D
  = _firstFId
@@ -728,24 +728,31 @@
 rstFId;%0A
+       
  lastFI
-d
+D
  = _last
@@ -757,16 +757,25 @@
 stFId;%0A 
+       //
 labels =
@@ -784,19 +784,27 @@
 labels;%0A
-%7D%0A%0A
+    %7D%0A%0A    
 public S
@@ -823,173 +823,89 @@
 ng()
-%0A%7BString ss = %22Name : %22+name+%22 , First id : %22+firstFId+%22 , Last id : %22+lastFId+%22%5Cn Labels :%22;%0Afor(int i=0; i%3Clabels.length; i++)%0A%09ss+=(%22 %22+labels%5Bi%5D);%0Areturn ss;%0A%7D%0A%0A
+ %7B%0A        return name + %22 %5BC%22 + firstFID + %22 ... C%22 + lastFID + %22%5D%22;%0A    %7D%0A%0A    
 publ
@@ -921,24 +921,33 @@
  getName() %7B
+%0A        
 return name;
@@ -946,18 +946,27 @@
 rn name;
-%7D
 %0A
+    %7D%0A    
 public i
@@ -978,24 +978,33 @@
 tFirstId() %7B
+%0A        
 return first
@@ -1001,28 +1001,37 @@
 turn firstFI
-d;%7D%0A
+D;%0A    %7D%0A    
 public int g
@@ -1038,24 +1038,33 @@
 etLastId() %7B
+%0A        
 return lastF
@@ -1068,57 +1068,130 @@
 stFI
-d;%7D%0Apublic String%5B%5D getLabels() %7Breturn labels;%7D%0A%0A
+D;%0A    %7D%0A%0A    public int firstID() %7B%0A        return firstFID;%0A    %7D%0A    public int lastID() %7B%0A        return lastFID;%0A    %7D
 %0A%7D%0A

We don't need concrete categories' labels.