|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.poi.POIXMLFactory
public abstract class POIXMLFactory
Defines a factory API that enables sub-classes to create instances of POIXMLDocumentPart
Constructor Summary | |
---|---|
POIXMLFactory()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public POIXMLFactory()
Method Detail |
---|
public POIXMLDocumentPart createDocumentPart(POIXMLDocumentPart parent, PackagePart part)
POIXMLDocument.load(POIXMLFactory)
when parsing a document
parent
- parent partpart
- the PackagePart representing the created instance
protected 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 arguments
java.lang.SecurityException
- thrown if the object can't be instantiated
java.lang.NoSuchMethodException
- thrown if there is no constructor found for the given arguments
java.lang.InstantiationException
- thrown if the object can't be instantiated
java.lang.IllegalAccessException
- thrown if the object can't be instantiated
java.lang.reflect.InvocationTargetException
- thrown if the object can't be instantiatedprotected abstract POIXMLRelation getDescriptor(java.lang.String relationshipType)
relationshipType
- the relationship type of the descriptor
public POIXMLDocumentPart newDocumentPart(POIXMLRelation descriptor)
descriptor
- describes the object to create
protected PackageRelationship getPackageRelationship(POIXMLDocumentPart parent, PackagePart part)
parent
- the parent to search for the partpart
- the part to look for
POIXMLException
- if the relations are erroneous or the part is not related
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |