Class XMLImporterServiceImpl
- java.lang.Object
-
- org.nuxeo.ecm.platform.importer.xml.parser.XMLImporterServiceImpl
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringCONTENT_PROPERTYprotected BooleandeferSaveprotected Map<String,List<String>>deletedAttributesprotected Stack<DocumentModel>docsStackprotected Map<org.dom4j.Element,DocumentModel>elToDocprotected static StringFILE_NAME_PROPERTYprotected static StringFILE_PROPERTYstatic Loglogprotected static StringMIME_TYPE_PROPERTYprotected Map<String,Object>mvelCtxprotected ParserConfigRegistryregistryprotected DocumentModelrootDocprotected CoreSessionsessionprotected FileworkingDirectorystatic StringXML_IMPORTER_INITIALIZATION
-
Constructor Summary
Constructors Constructor Description XMLImporterServiceImpl(DocumentModel rootDoc, ParserConfigRegistry registry)XMLImporterServiceImpl(DocumentModel rootDoc, ParserConfigRegistry registry, Map<String,Object> mvelContext, boolean deferSave)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcreateNewDocument(org.dom4j.Element el, DocConfigDescriptor conf)protected List<AttributeConfigDescriptor>getAttributConfigs(org.dom4j.Element el)protected DocConfigDescriptorgetDocCreationConfig(org.dom4j.Element el)protected Map<String,Object>getMVELContext(org.dom4j.Element el)protected ParserConfigRegistrygetRegistry()List<DocumentModel>parse(File file)List<DocumentModel>parse(InputStream is)List<DocumentModel>parse(org.dom4j.Document doc)protected voidprocess(org.dom4j.Element el)protected voidprocessDocAttributes(DocumentModel doc, org.dom4j.Element el, AttributeConfigDescriptor conf)protected Objectresolve(org.dom4j.Element el, String xpr)protected ObjectresolveAndEvaluateXmlNode(org.dom4j.Element el, String xpr)protected BlobresolveBlob(org.dom4j.Element el, AttributeConfigDescriptor conf, String propertyName)protected ObjectresolveComplex(org.dom4j.Element el, AttributeConfigDescriptor conf)protected ObjectresolveMVEL(org.dom4j.Element el, String xpr)protected StringresolveName(org.dom4j.Element el, String xpr)protected StringresolvePath(org.dom4j.Element el, String xpr)protected ObjectresolveXP(org.dom4j.Element el, String xpr)
-
-
-
Field Detail
-
FILE_PROPERTY
protected static final String FILE_PROPERTY
- See Also:
- Constant Field Values
-
CONTENT_PROPERTY
protected static final String CONTENT_PROPERTY
- See Also:
- Constant Field Values
-
MIME_TYPE_PROPERTY
protected static final String MIME_TYPE_PROPERTY
- See Also:
- Constant Field Values
-
FILE_NAME_PROPERTY
protected static final String FILE_NAME_PROPERTY
- See Also:
- Constant Field Values
-
log
public static final Log log
-
XML_IMPORTER_INITIALIZATION
public static final String XML_IMPORTER_INITIALIZATION
- See Also:
- Constant Field Values
-
session
protected CoreSession session
-
rootDoc
protected DocumentModel rootDoc
-
docsStack
protected Stack<DocumentModel> docsStack
-
elToDoc
protected Map<org.dom4j.Element,DocumentModel> elToDoc
-
registry
protected ParserConfigRegistry registry
-
deferSave
protected Boolean deferSave
-
workingDirectory
protected File workingDirectory
-
-
Constructor Detail
-
XMLImporterServiceImpl
public XMLImporterServiceImpl(DocumentModel rootDoc, ParserConfigRegistry registry)
-
XMLImporterServiceImpl
public XMLImporterServiceImpl(DocumentModel rootDoc, ParserConfigRegistry registry, Map<String,Object> mvelContext, boolean deferSave)
-
-
Method Detail
-
getRegistry
protected ParserConfigRegistry getRegistry()
-
getDocCreationConfig
protected DocConfigDescriptor getDocCreationConfig(org.dom4j.Element el)
-
getAttributConfigs
protected List<AttributeConfigDescriptor> getAttributConfigs(org.dom4j.Element el)
-
parse
public List<DocumentModel> parse(InputStream is) throws IOException
- Throws:
IOException
-
parse
public List<DocumentModel> parse(File file) throws IOException
- Throws:
IOException
-
parse
public List<DocumentModel> parse(org.dom4j.Document doc)
-
resolveComplex
protected Object resolveComplex(org.dom4j.Element el, AttributeConfigDescriptor conf)
-
resolveBlob
protected Blob resolveBlob(org.dom4j.Element el, AttributeConfigDescriptor conf, String propertyName)
-
processDocAttributes
protected void processDocAttributes(DocumentModel doc, org.dom4j.Element el, AttributeConfigDescriptor conf)
-
resolveAndEvaluateXmlNode
protected Object resolveAndEvaluateXmlNode(org.dom4j.Element el, String xpr)
-
createNewDocument
protected void createNewDocument(org.dom4j.Element el, DocConfigDescriptor conf)
-
process
protected void process(org.dom4j.Element el)
-
-