org.docx4j.openpackaging
Class Base
java.lang.Object
org.docx4j.openpackaging.Base
- Direct Known Subclasses:
- Package, Part
public abstract class Base
- extends java.lang.Object
|
Constructor Summary |
Base()
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
partName
public PartName partName
- The part name. (required by the specification [M1.1])
Note that in docx4J, part names should be resolved,
before being set, so that they are absolute
(ie start with '/').
We will assume the Package has a part name of "/"
Base
public Base()
addTargetPart
public void addTargetPart(Part targetpart)
throws InvalidFormatException
- Convenience method to add a part to this Part's
relationships. The package must be set on this
part in order for this to work.
- Parameters:
targetpart - The part to add to this part's relationships
- Throws:
InvalidFormatException
getContentType
public java.lang.String getContentType()
getPackage
public abstract Package getPackage()
getPartName
public PartName getPartName()
- Returns:
- the uri
getRelationshipsPart
public RelationshipsPart getRelationshipsPart()
- Get the relationship part
- Returns:
- The relationship part name.
setContentType
public void setContentType(ContentType contentType)
setPartShortcut
public abstract boolean setPartShortcut(Part part,
java.lang.String relationshipType)
- Tell the source Part about this target Part, so the
source can use this part via a convenience method.
- Parameters:
part - relationshipType -
- Returns:
- true if the source Part does use the target Part
in a convenience method.
setRelationships
public void setRelationships(RelationshipsPart relationships)