Class DefaultXMLDocumentFactory
- java.lang.Object
-
- gov.nist.secauto.decima.xml.document.DefaultXMLDocumentFactory
-
- All Implemented Interfaces:
ResourceResolver<MutableXMLDocument>,XMLDocumentFactory
public class DefaultXMLDocumentFactory extends Object implements XMLDocumentFactory
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classDefaultXMLDocumentFactory.CyclePreventingDocumentResolver
-
Constructor Summary
Constructors Constructor Description DefaultXMLDocumentFactory()DefaultXMLDocumentFactory(CachingStrategy<MutableXMLDocument> cachingStrategy)Constructs the XML document factory with the provided caching strategy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CachingStrategy<MutableXMLDocument>getCachingStrategy()LinkedList<DocumentPostProcessor<MutableXMLDocument>>getPostProcessors()org.jdom2.input.sax.SAXEnginegetSAXEngine()protected org.jdom2.input.sax.SAXEngineinitSAXEngine()XMLDocumentload(File location)XMLDocumentload(URL location)XMLDocumentload(URL location, File destinationFile)protected JDOMDocumentnewJDOMDocument(File file, URL originalLocation)protected JDOMDocumentnewJDOMDocument(org.jdom2.Document document, URL originalLocation)protected MutableXMLDocumentpostProcessXMLDocument(MutableXMLDocument subject, ResourceResolver<MutableXMLDocument> resolver)voidregisterPostProcessor(DocumentPostProcessor<MutableXMLDocument> processor)MutableXMLDocumentresolve(URL url)
-
-
-
Constructor Detail
-
DefaultXMLDocumentFactory
public DefaultXMLDocumentFactory()
-
DefaultXMLDocumentFactory
public DefaultXMLDocumentFactory(CachingStrategy<MutableXMLDocument> cachingStrategy)
Constructs the XML document factory with the provided caching strategy.- Parameters:
cachingStrategy- the strategy to use
-
-
Method Detail
-
initSAXEngine
protected org.jdom2.input.sax.SAXEngine initSAXEngine() throws org.jdom2.JDOMException- Throws:
org.jdom2.JDOMException
-
getCachingStrategy
public CachingStrategy<MutableXMLDocument> getCachingStrategy()
-
getSAXEngine
public org.jdom2.input.sax.SAXEngine getSAXEngine()
-
registerPostProcessor
public void registerPostProcessor(DocumentPostProcessor<MutableXMLDocument> processor)
-
getPostProcessors
public LinkedList<DocumentPostProcessor<MutableXMLDocument>> getPostProcessors()
-
newJDOMDocument
protected JDOMDocument newJDOMDocument(org.jdom2.Document document, URL originalLocation) throws DocumentException
- Throws:
DocumentException
-
newJDOMDocument
protected JDOMDocument newJDOMDocument(File file, URL originalLocation) throws DocumentException, FileNotFoundException
-
postProcessXMLDocument
protected MutableXMLDocument postProcessXMLDocument(MutableXMLDocument subject, ResourceResolver<MutableXMLDocument> resolver) throws DocumentException
- Throws:
DocumentException
-
load
public XMLDocument load(URL location) throws DocumentException
- Specified by:
loadin interfaceXMLDocumentFactory- Throws:
DocumentException
-
load
public XMLDocument load(URL location, File destinationFile) throws DocumentException
- Specified by:
loadin interfaceXMLDocumentFactory- Throws:
DocumentException
-
load
public XMLDocument load(File location) throws DocumentException, FileNotFoundException
- Specified by:
loadin interfaceXMLDocumentFactory- Throws:
DocumentExceptionFileNotFoundException
-
resolve
public MutableXMLDocument resolve(URL url) throws DocumentException
- Specified by:
resolvein interfaceResourceResolver<MutableXMLDocument>- Throws:
DocumentException
-
-