java.lang.Objectcom.aspose.words.CustomPart
public class CustomPart
This class represents an OOXML part that is a target of an "unknown relationship".
All relationships not defined within ISO/IEC 29500 are considered "unknown relationships".
Unknown relationships are permitted within an Office Open XML document provided that they
conform to relationship markup guidelines. Microsoft Word preserves custom parts during open/save cycles. Some additional info can be found
here http://blogs.msdn.com/dmahugh/archive/2006/11/25/arbitrary-content-in-an-opc-package.aspx Aspose.Words also roundtrips custom parts and in addition, allows to programmatically access
such parts via the Do not confuse custom parts with Custom XML Data. Use
Constructor Summary |
---|
CustomPart()
Initializes an instance of this class. |
Property Getters/Setters Summary | ||
---|---|---|
java.lang.String | getContentType() | |
void | setContentType(java.lang.String value) | |
Specifies the content type of this custom part. | ||
byte[] | getData() | |
void | setData(byte[] value) | |
Contains the data of this custom part. | ||
boolean | isExternal() | |
void | isExternal(boolean value) | |
False if this custom part is stored inside the OOXML package. True if this custom part is an external target.
|
||
java.lang.String | getName() | |
void | setName(java.lang.String value) | |
Gets or sets this part's absolute name within the OOXML package or the target URL. | ||
java.lang.String | getRelationshipType() | |
void | setRelationshipType(java.lang.String value) | |
Gets or sets the relationship type from the parent part to this custom part. |
Method Summary | ||
---|---|---|
CustomPart | deepClone() | |
Makes a "deep enough" copy of the object.
Does not duplicate the bytes of the |
Constructor Detail |
---|
public CustomPart()
You can create
Property Getters/Setters Detail |
---|
getContentType/setContentType | |
public java.lang.String getContentType() / public void setContentType(java.lang.String value) |
This property is applicable only when false
.
The default value is an empty string. A valid value must be a non-empty string.
getData/setData | |
public byte[] getData() / public void setData(byte[] value) |
This property is applicable only when false
.
The default value is an empty byte array. The value cannot be null
.
isExternal/isExternal | |
public boolean isExternal() / public void isExternal(boolean value) |
False
if this custom part is stored inside the OOXML package. True
if this custom part is an external target.
The default value is false
.
getName/setName | |
public java.lang.String getName() / public void setName(java.lang.String value) |
If the relationship target is internal, then this property is the absolute part name within the package. If the relationship target is external, then this property is the target URL.
The default value is an empty string. A valid value must be a non-empty string.
getRelationshipType/setRelationshipType | |
public java.lang.String getRelationshipType() / public void setRelationshipType(java.lang.String value) |
The relationship type for a custom part must be "unknown" e.g. a custom relationship type, not one of the relationship types defined within ISO/IEC 29500.
The default value is an empty string. A valid value must be a non-empty string.
Method Detail |
---|
deepClone | |
public CustomPart deepClone() |