1 2 17 18 package org.apache.poi.hdf.model; 19 20 import org.apache.poi.hdf.event.HDFLowLevelParsingListener; 21 import org.apache.poi.hdf.model.util.BTreeSet; 22 23 import org.apache.poi.hdf.model.hdftypes.ChpxNode; 24 import org.apache.poi.hdf.model.hdftypes.PapxNode; 25 import org.apache.poi.hdf.model.hdftypes.SepxNode; 26 import org.apache.poi.hdf.model.hdftypes.TextPiece; 27 import org.apache.poi.hdf.model.hdftypes.DocumentProperties; 28 import org.apache.poi.hdf.model.hdftypes.FontTable; 29 import org.apache.poi.hdf.model.hdftypes.ListTables; 30 import org.apache.poi.hdf.model.hdftypes.StyleSheet; 31 32 33 public class HDFObjectModel implements HDFLowLevelParsingListener 34 { 35 36 37 private byte[] _mainDocument; 38 39 40 private DocumentProperties _dop; 41 42 private StyleSheet _styleSheet; 43 44 private ListTables _listTables; 45 46 private FontTable _fonts; 47 48 49 int _fcMin; 50 51 52 BTreeSet _text = new BTreeSet(); 53 54 BTreeSet _sections = new BTreeSet(); 55 56 BTreeSet _paragraphs = new BTreeSet(); 57 58 BTreeSet _characterRuns = new BTreeSet(); 59 60 public HDFObjectModel() 61 { 62 } 63 public void mainDocument(byte[] mainDocument) 64 { 65 _mainDocument = mainDocument; 66 } 67 public void tableStream(byte[] tableStream) 68 { 69 } 70 public void miscellaneous(int fcMin, int ccpText, int ccpFtn, int fcPlcfhdd, int lcbPlcfhdd) 71 { 72 _fcMin = fcMin; 73 } 74 public void document(DocumentProperties dop) 75 { 76 _dop = dop; 77 } 78 public void bodySection(SepxNode sepx) 79 { 80 _sections.add(sepx); 81 } 82 public void hdrSection(SepxNode sepx) 83 { 84 _sections.add(sepx); 85 } 86 public void endSections() 87 { 88 } 89 public void paragraph(PapxNode papx) 90 { 91 _paragraphs.add(papx); 92 } 93 public void characterRun(ChpxNode chpx) 94 { 95 _characterRuns.add(chpx); 96 } 97 public void text(TextPiece t) 98 { 99 _text.add(t); 100 } 101 public void fonts(FontTable fontTbl) 102 { 103 _fonts = fontTbl; 104 } 105 public void lists(ListTables listTbl) 106 { 107 _listTables = listTbl; 108 } 109 public void styleSheet(StyleSheet stsh) 110 { 111 _styleSheet = stsh; 112 } 113 } 114 | Popular Tags |