public abstract class POIXMLRelation extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
POIXMLRelation.NoArgConstructor |
static interface |
POIXMLRelation.PackagePartConstructor |
static interface |
POIXMLRelation.ParentPartConstructor |
| Modifier | Constructor and Description |
|---|---|
protected |
POIXMLRelation(String type,
String rel,
String defaultName)
Instantiates a POIXMLRelation.
|
protected |
POIXMLRelation(String type,
String rel,
String defaultName,
POIXMLRelation.NoArgConstructor noArgConstructor,
POIXMLRelation.PackagePartConstructor packagePartConstructor,
POIXMLRelation.ParentPartConstructor parentPartConstructor)
Instantiates a POIXMLRelation.
|
| Modifier and Type | Method and Description |
|---|---|
InputStream |
getContents(PackagePart corePart)
Fetches the InputStream to read the contents, based
of the specified core part, for which we are defined
as a suitable relationship
|
String |
getContentType()
Return the content type.
|
String |
getDefaultFileName()
Return the default part name.
|
String |
getFileName(int index)
Returns the filename for the nth one of these, e.g.
|
Integer |
getFileNameIndex(POIXMLDocumentPart part)
Returns the index of the filename within the package for the given part.
|
POIXMLRelation.NoArgConstructor |
getNoArgConstructor() |
POIXMLRelation.PackagePartConstructor |
getPackagePartConstructor() |
POIXMLRelation.ParentPartConstructor |
getParentPartConstructor() |
String |
getRelation()
Return the relationship, the kind of connection between a source part and a target part in a package.
|
protected POIXMLRelation(String type, String rel, String defaultName, POIXMLRelation.NoArgConstructor noArgConstructor, POIXMLRelation.PackagePartConstructor packagePartConstructor, POIXMLRelation.ParentPartConstructor parentPartConstructor)
type - content typerel - relationshipdefaultName - default item namenoArgConstructor - method used to construct instances of this relationship from scratchpackagePartConstructor - method used to construct instances of this relationship with a package partpublic String getContentType()
public String getRelation()
public String getDefaultFileName()
public String getFileName(int index)
index - the suffix for the document typepublic Integer getFileNameIndex(POIXMLDocumentPart part)
part - the part to read the suffix frompublic POIXMLRelation.NoArgConstructor getNoArgConstructor()
public POIXMLRelation.PackagePartConstructor getPackagePartConstructor()
public POIXMLRelation.ParentPartConstructor getParentPartConstructor()
public InputStream getContents(PackagePart corePart) throws IOException, InvalidFormatException
IOExceptionInvalidFormatException