-
Notifications
You must be signed in to change notification settings - Fork 0
/
DlexResource.java
104 lines (84 loc) · 2.55 KB
/
DlexResource.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
package com.dynamicpdf.api;
import java.io.InputStream;
/**
* Represents a Dlex resource object that is created using the DLEX file and a name.
*/
public class DlexResource extends Resource {
private String layoutDataResourceName;
private ResourceType type = ResourceType.DLEX;
/**
* Initializes a new instance of the <code>DlexResource</code> class
* with DLEX file path and resource name as parameters.
* @param dlexPath The dlex file path.
* @param resourceName The name of the resource.
*/
public DlexResource(String dlexPath, String resourceName) {
super(dlexPath, resourceName);
}
/**
* Initializes a new instance of the <code>DlexResource</code> class
* with DLEX file path as parameter.
* @param dlexPath The dlex file path.
*/
public DlexResource(String dlexPath) {
super(dlexPath, null);
}
/**
* Initializes a new instance of the <code>DlexResource</code> class
* with byte data of the DLEX file and resource name as parameters.
* @param value The byte array of the dlex file.
* @param resourceName The name of the resource.
*/
public DlexResource(byte[] value, String resourceName) {
super(value, resourceName);
}
/**
* Initializes a new instance of the <code>DlexResource</code> class
* with byte data of the DLEX file as parameter.
* @param value The byte array of the dlex file.
*/
public DlexResource(byte[] value) {
super(value, null);
}
/**
* Initializes a new instance of the <code>DlexResource</code> class
* with stream of the DLEX file and resource name as parameters.
* @param data The stream of the dlex file.
* @param resourceName The name of the resource.
*/
public DlexResource(InputStream data, String resourceName) {
super(data, resourceName);
}
/**
* Initializes a new instance of the <code>DlexResource</code> class
* with stream of the DLEX file as parameter.
* @param data The stream of the dlex file.
*/
public DlexResource(InputStream data) {
super(data, null);
}
ResourceType getType() {
return type;
}
String getFileExtension() {
return ".dlex";
}
String getMimeType() {
return "application/xml";
}
/**
* Gets the name for layout data resource.
* <p> The name for layout data resource. </p>
* @return layoutDataResourceName Gets the layout data resource.
*/
public String getLayoutDataResourceName() {
return layoutDataResourceName;
}
/**
* Sets the name for layout data resource.
* @param value The name for layout data resource.
*/
public void setLayoutDataResourceName(String value) {
layoutDataResourceName = value;
}
}