Lines 41-48
Link Here
|
41 |
|
41 |
|
42 |
public static final String EXTENDED_PROPERTIES_REL_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties"; |
42 |
public static final String EXTENDED_PROPERTIES_REL_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties"; |
43 |
|
43 |
|
|
|
44 |
// OLE embeddings relation name |
44 |
public static final String OLE_OBJECT_REL_TYPE="http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject"; |
45 |
public static final String OLE_OBJECT_REL_TYPE="http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject"; |
45 |
|
46 |
|
|
|
47 |
// Embedded OPC documents relation name |
48 |
public static final String PACK_OBJECT_REL_TYPE="http://schemas.openxmlformats.org/officeDocument/2006/relationships/package"; |
49 |
|
46 |
/** The OPC Package */ |
50 |
/** The OPC Package */ |
47 |
private Package pkg; |
51 |
private Package pkg; |
48 |
|
52 |
|
Lines 57-63
Link Here
|
57 |
/** |
61 |
/** |
58 |
* The embedded OLE2 files in the OPC package |
62 |
* The embedded OLE2 files in the OPC package |
59 |
*/ |
63 |
*/ |
60 |
private List<PackagePart> embedds; |
64 |
protected List<PackagePart> embedds = new LinkedList<PackagePart>(); |
61 |
|
65 |
|
62 |
protected POIXMLDocument() {} |
66 |
protected POIXMLDocument() {} |
63 |
|
67 |
|
Lines 70-85
Link Here
|
70 |
|
74 |
|
71 |
// Get core part |
75 |
// Get core part |
72 |
this.corePart = this.pkg.getPart(coreDocRelationship); |
76 |
this.corePart = this.pkg.getPart(coreDocRelationship); |
73 |
|
77 |
|
74 |
// Get any embedded OLE2 documents |
|
|
75 |
this.embedds = new LinkedList<PackagePart>(); |
76 |
for(PackageRelationship rel : corePart.getRelationshipsByType(OLE_OBJECT_REL_TYPE)) { |
77 |
embedds.add(getTargetPart(rel)); |
78 |
} |
79 |
} catch (OpenXML4JException e) { |
78 |
} catch (OpenXML4JException e) { |
80 |
throw new IOException(e.toString()); |
79 |
throw new IOException(e.toString()); |
81 |
} |
80 |
} |
82 |
} |
81 |
} |
|
|
82 |
|
83 |
protected POIXMLDocument(String path) throws IOException { |
83 |
protected POIXMLDocument(String path) throws IOException { |
84 |
this(openPackage(path)); |
84 |
this(openPackage(path)); |
85 |
} |
85 |
} |