001 /* 002 * Copyright 2011 The Kuali Foundation. 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 package org.kuali.ole; 017 018 import java.util.ArrayList; 019 import java.util.HashMap; 020 import java.util.List; 021 import java.util.Map; 022 023 /** 024 * Created by IntelliJ IDEA. 025 * User: pvsubrah 026 * Date: 9/8/11 027 * Time: 10:41 AM 028 * To change this template use File | Settings | File Templates. 029 */ 030 031 public class OleDocStoreData { 032 private String category; 033 private List<String> doctypes = new ArrayList<String>(); 034 private List<String> formats = new ArrayList<String>(); 035 private Map<String, List<String>> typeFormatMap = new HashMap<String, List<String>>(); 036 private Map<String, Integer> formatLevelsMap = new HashMap<String, Integer>(); 037 private Map<String, Map<String, Long>> typeFormatMapWithNodeCount = new HashMap<String, Map<String, Long>>(); 038 039 public String getCategory() { 040 return category; 041 } 042 043 public void setCategory(String category) { 044 this.category = category; 045 } 046 047 public Map<String, List<String>> getTypeFormatMap() { 048 return typeFormatMap; 049 } 050 051 public List<String> getDoctypes() { 052 return doctypes; 053 } 054 055 public void setDoctypes(List<String> doctypes) { 056 this.doctypes = doctypes; 057 } 058 059 public void addDocType(String docType) { 060 if (!this.doctypes.contains(docType)) { 061 this.doctypes.add(docType); 062 } 063 } 064 065 public void addFormat(String docType, String format) { 066 List<String> formatsList = null; 067 if (!this.typeFormatMap.containsKey(docType)) { 068 this.typeFormatMap.put(docType, new ArrayList<String>()); 069 } 070 071 formatsList = this.typeFormatMap.get(docType); 072 073 if (!formatsList.contains(format)) { 074 formatsList.add(format); 075 formats.add(format); 076 } 077 this.typeFormatMap.put(docType, formatsList); 078 } 079 080 public void addLevelInfoForFormat(String format, Integer levels) { 081 formatLevelsMap.put(format, levels); 082 } 083 084 public Map<String, Map<String, Long>> getTypeFormatMapWithNodeCount() { 085 return typeFormatMapWithNodeCount; 086 } 087 088 public void setTypeFormatMapWithNodeCount(Map<String, Map<String, Long>> typeFormatMapWithNodeCount) { 089 this.typeFormatMapWithNodeCount = typeFormatMapWithNodeCount; 090 } 091 092 public Map<String, Integer> getFormatLevelsMap() { 093 return formatLevelsMap; 094 } 095 096 public void setFormatLevelsMap(Map<String, Integer> formatLevelsMap) { 097 this.formatLevelsMap = formatLevelsMap; 098 } 099 100 public List<String> getFormats() { 101 return formats; 102 } 103 }