public abstract class Base extends Object
Modifier and Type | Field and Description |
---|---|
protected ContentType |
contentType |
protected static org.slf4j.Logger |
log |
PartName |
partName
Deprecated.
|
RelationshipsPart |
relationships
relationships - the package and each part can have one of these
See eg 11.
|
Constructor and Description |
---|
Base() |
Modifier and Type | Method and Description |
---|---|
Relationship |
addTargetPart(Part targetpart)
Convenience method to add a part to this Part's
relationships.
|
Relationship |
addTargetPart(Part targetpart,
RelationshipsPart.AddPartBehaviour mode)
Convenience method to add a part to this Part's
relationships.
|
Relationship |
addTargetPart(Part targetpart,
RelationshipsPart.AddPartBehaviour mode,
String proposedRelId)
Convenience method to add a part to this Part's
relationships.
|
Relationship |
addTargetPart(Part targetpart,
String proposedRelId)
Convenience method to add a part to this Part's
relationships.
|
String |
getContentType() |
abstract OpcPackage |
getPackage() |
PartName |
getPartName() |
RelationshipsPart |
getRelationshipsPart()
Get the relationship part.
|
RelationshipsPart |
getRelationshipsPart(boolean createIfAbsent)
Get the relationship part.
|
Object |
getUserData(String key) |
void |
reset()
Reinit fields so this pkg object can be re-used.
|
void |
setContentType(ContentType contentType) |
void |
setPartName(PartName partName) |
abstract boolean |
setPartShortcut(Part part,
String relationshipType)
Tell the source Part about this target Part, so the
source can use this part via a convenience method.
|
void |
setRelationships(RelationshipsPart relationships) |
void |
setUserData(String key,
Object value)
An object allowing the user of the docx4j
API to associate arbitrary data with this
package/part while the package is in memory.
|
protected static org.slf4j.Logger log
public RelationshipsPart relationships
protected ContentType contentType
@Deprecated public PartName partName
public abstract OpcPackage getPackage()
public void setUserData(String key, Object value)
key
- value
- public RelationshipsPart getRelationshipsPart()
public RelationshipsPart getRelationshipsPart(boolean createIfAbsent)
create
- whether to create it if it doesn't existpublic void setRelationships(RelationshipsPart relationships)
public String getContentType()
public void setContentType(ContentType contentType)
public void setPartName(PartName partName)
partName
- public PartName getPartName()
public abstract boolean setPartShortcut(Part part, String relationshipType)
part
- relationshipType
- public Relationship addTargetPart(Part targetpart, RelationshipsPart.AddPartBehaviour mode) throws InvalidFormatException
targetpart
- The part to add to this part's relationshipsmode
- whether to overwrite, rename or abort if the part name already existsproposedRelId
- InvalidFormatException
public Relationship addTargetPart(Part targetpart) throws InvalidFormatException
targetpart
- The part to add to this part's relationshipsInvalidFormatException
public Relationship addTargetPart(Part targetpart, String proposedRelId) throws InvalidFormatException
targetpart
- The part to add to this part's relationshipsInvalidFormatException
public Relationship addTargetPart(Part targetpart, RelationshipsPart.AddPartBehaviour mode, String proposedRelId) throws InvalidFormatException
targetpart
- The part to add to this part's relationshipsmode
- whether to overwrite, rename or abort if the part name already existsproposedRelId
- InvalidFormatException
public void reset()
Copyright © 2007-2019. All Rights Reserved.