public abstract class POIXMLFactory
extends java.lang.Object
POIXMLDocumentPart
Constructor and Description |
---|
POIXMLFactory() |
Modifier and Type | Method and Description |
---|---|
protected abstract POIXMLDocumentPart |
createDocumentPart(java.lang.Class<? extends POIXMLDocumentPart> cls,
java.lang.Class<?>[] classes,
java.lang.Object[] values)
Need to delegate instantiation to sub class because of constructor visibility
|
POIXMLDocumentPart |
createDocumentPart(POIXMLDocumentPart parent,
PackagePart part)
Create a POIXMLDocumentPart from existing package part and relation.
|
protected abstract POIXMLRelation |
getDescriptor(java.lang.String relationshipType)
returns the descriptor for the given relationship type
|
protected PackageRelationship |
getPackageRelationship(POIXMLDocumentPart parent,
PackagePart part)
Retrieves the package relationship of the child part within the parent
|
POIXMLDocumentPart |
newDocumentPart(POIXMLRelation descriptor)
Create a new POIXMLDocumentPart using the supplied descriptor.
|
public POIXMLDocumentPart createDocumentPart(POIXMLDocumentPart parent, PackagePart part)
POIXMLDocument.load(POIXMLFactory)
when parsing a documentparent
- parent partpart
- the PackagePart representing the created instanceprotected abstract POIXMLDocumentPart createDocumentPart(java.lang.Class<? extends POIXMLDocumentPart> cls, java.lang.Class<?>[] classes, java.lang.Object[] values) throws java.lang.SecurityException, java.lang.NoSuchMethodException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
cls
- the document class to be instantiatedclasses
- the classes of the constructor argumentsvalues
- the values of the constructor argumentsjava.lang.SecurityException
- thrown if the object can't be instantiatedjava.lang.NoSuchMethodException
- thrown if there is no constructor found for the given argumentsjava.lang.InstantiationException
- thrown if the object can't be instantiatedjava.lang.IllegalAccessException
- thrown if the object can't be instantiatedjava.lang.reflect.InvocationTargetException
- thrown if the object can't be instantiatedprotected abstract POIXMLRelation getDescriptor(java.lang.String relationshipType)
relationshipType
- the relationship type of the descriptorpublic POIXMLDocumentPart newDocumentPart(POIXMLRelation descriptor)
descriptor
- describes the object to createprotected PackageRelationship getPackageRelationship(POIXMLDocumentPart parent, PackagePart part)
parent
- the parent to search for the partpart
- the part to look forPOIXMLException
- if the relations are erroneous or the part is not relatedCopyright 2018 The Apache Software Foundation or its licensors, as applicable.