This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
With my understanding about your problem statement i suggest you can use HashMaps where a Key,Value pair could be <MainCategory,SubCategory> Where the SubCategory is of type HashMap. That means you will result in something like this.
like this. Still not clear. Take a look at this snippet.