01: /*
02: Copyright © 2007 Stefano Chizzolini. http://clown.stefanochizzolini.it
03:
04: Contributors:
05: * Stefano Chizzolini (original code developer, http://www.stefanochizzolini.it):
06: contributed code is Copyright © 2007 by Stefano Chizzolini.
07:
08: This file should be part of the source code distribution of "PDF Clown library"
09: (the Program): see the accompanying README files for more info.
10:
11: This Program is free software; you can redistribute it and/or modify it under
12: the terms of the GNU General Public License as published by the Free Software
13: Foundation; either version 2 of the License, or (at your option) any later version.
14:
15: This Program is distributed in the hope that it will be useful, but WITHOUT ANY
16: WARRANTY, either expressed or implied; without even the implied warranty of
17: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more details.
18:
19: You should have received a copy of the GNU General Public License along with this
20: Program (see README files); if not, go to the GNU website (http://www.gnu.org/).
21:
22: Redistribution and use, with or without modification, are permitted provided that such
23: redistributions retain the above copyright notice, license and disclaimer, along with
24: this list of conditions.
25: */
26:
27: package it.stefanochizzolini.clown.documents.interaction;
28:
29: import it.stefanochizzolini.clown.documents.Document;
30: import it.stefanochizzolini.clown.files.File;
31: import it.stefanochizzolini.clown.objects.PdfDictionary;
32: import it.stefanochizzolini.clown.objects.PdfDirectObject;
33: import it.stefanochizzolini.clown.objects.PdfIndirectObject;
34: import it.stefanochizzolini.clown.objects.PdfName;
35: import it.stefanochizzolini.clown.objects.PdfNameTree;
36: import it.stefanochizzolini.clown.objects.PdfReference;
37: import it.stefanochizzolini.clown.util.NotImplementedException;
38:
39: /**
40: Destinations name tree [PDF:1.6:3.6.3].
41:
42: @author Stefano Chizzolini
43: @version 0.0.4
44: @since 0.0.4
45: */
46: public class Destinations extends PdfNameTree<Destination> {
47: // <class>
48: // <dynamic>
49: // <constructors>
50: public Destinations(Document context) {
51: super (context);
52: }
53:
54: public Destinations(PdfDirectObject baseObject,
55: PdfIndirectObject container) {
56: super (baseObject, container);
57: }
58:
59: // </constructors>
60:
61: // <interface>
62: // <public>
63: @Override
64: public Destinations clone(Document context) {
65: throw new NotImplementedException();
66: }
67:
68: // </public>
69:
70: // <protected>
71: @Override
72: protected Destination wrap(PdfDirectObject baseObject,
73: PdfIndirectObject container) {
74: if (baseObject instanceof PdfReference) {
75: container = ((PdfReference) baseObject).getIndirectObject();
76: }
77:
78: return new Destination(((PdfDictionary) File
79: .resolve(baseObject)).get(PdfName.D), container);
80: }
81: // </protected>
82: // </interface>
83: // </dynamic>
84: // </class>
85: }
|