|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.knowceans.corpus.parsers.dpa.IptcCategories
public class IptcCategories
IptcCategories represents the IPTC document categorisation hierarchy.
| Field Summary | |
|---|---|
private static java.lang.Object[][] |
iptcCodes
|
(package private) java.util.Vector<java.lang.Integer> |
iptcIndex
|
(package private) java.util.HashMap<java.lang.Integer,java.lang.String> |
iptcMap
|
private static long |
serialVersionUID
|
| Constructor Summary | |
|---|---|
IptcCategories()
|
|
| Method Summary | |
|---|---|
java.lang.String |
decode(int iptcCode)
get description string for IPTC code |
java.lang.String |
decode(java.util.Vector<java.lang.Integer> a)
return a string description of the category ids in the argument. |
private int |
getLevel(int iptc)
returns the level of the IPTC code in the hierarchy, starting with 1. |
private int |
getLevelIptc(int iptc,
int level)
Get the IPTC code at the specified level |
int[] |
indexToHierarchy(int index,
boolean include)
returns the index of the argument and those indices that correspond to the superclasses in the IPTC hierarchy. |
int |
indexToIptc(int index)
get the IPTC category code of the index |
int[] |
indexToSubindices(int index,
int levels,
boolean include)
returns the indices of the direct subcategories of the index. |
int |
iptcCategoryCount()
|
int |
iptcToIndex(int iptc)
get the index of the IPTC category code |
static void |
main(java.lang.String[] args)
|
java.util.Vector<java.lang.Integer> |
subjects(java.lang.String sub)
get category ids (encoding) of the descriptors in the argument (space-separated). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final long serialVersionUID
java.util.HashMap<java.lang.Integer,java.lang.String> iptcMap
java.util.Vector<java.lang.Integer> iptcIndex
private static final java.lang.Object[][] iptcCodes
| Constructor Detail |
|---|
public IptcCategories()
| Method Detail |
|---|
public static void main(java.lang.String[] args)
public java.util.Vector<java.lang.Integer> subjects(java.lang.String sub)
ICategories
subjects in interface ICategoriespublic java.lang.String decode(java.util.Vector<java.lang.Integer> a)
ICategories
decode in interface ICategoriespublic java.lang.String decode(int iptcCode)
iptcCode -
public int iptcToIndex(int iptc)
iptc - code
public int iptcCategoryCount()
public int indexToIptc(int index)
index - code
public int[] indexToHierarchy(int index,
boolean include)
index -
public int[] indexToSubindices(int index,
int levels,
boolean include)
index - of category (root not yet implemented)levels - that should be consideredinclude - the argument.
private int getLevelIptc(int iptc,
int level)
iptc -
private int getLevel(int iptc)
iptc -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||