01: /* Copyright 2004 Ryan Ackley
02: *
03: * Licensed under the Apache License, Version 2.0 (the "License");
04: * you may not use this file except in compliance with the License.
05: * You may obtain a copy of the License at
06: *
07: * http://www.apache.org/licenses/LICENSE-2.0
08: *
09: * Unless required by applicable law or agreed to in writing, software
10: * distributed under the License is distributed on an "AS IS" BASIS,
11: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12: * See the License for the specific language governing permissions and
13: * limitations under the License.
14: */
15:
16: package org.textmining.text.extraction;
17:
18: /**
19: * This class stores info about the data structure describing a chunk of text
20: * in a Word document. Specifically, whether or not a Range of text uses
21: * unicode or Cp1252 encoding.
22: *
23: * @author Ryan Ackley
24: */
25:
26: class WordTextPiece {
27: private int _fcStart;
28: private boolean _usesUnicode;
29: private int _length;
30:
31: public WordTextPiece(int start, int length, boolean unicode) {
32: _usesUnicode = unicode;
33: _length = length;
34: _fcStart = start;
35: }
36:
37: public boolean usesUnicode() {
38: return _usesUnicode;
39: }
40:
41: public int getStart() {
42: return _fcStart;
43: }
44:
45: public int getLength() {
46: return _length;
47: }
48:
49: }
|