Class XMLImporterServiceImpl
- java.lang.Object
-
- org.nuxeo.ecm.platform.importer.xml.parser.XMLImporterServiceImpl
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
CONTENT_PROPERTY
protected Boolean
deferSave
protected Map<String,List<String>>
deletedAttributes
protected Stack<DocumentModel>
docsStack
protected Map<org.dom4j.Element,DocumentModel>
elToDoc
protected static String
FILE_NAME_PROPERTY
protected static String
FILE_PROPERTY
static Log
log
protected static String
MIME_TYPE_PROPERTY
protected Map<String,Object>
mvelCtx
protected ParserConfigRegistry
registry
protected DocumentModel
rootDoc
protected CoreSession
session
protected File
workingDirectory
static String
XML_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 void
createNewDocument(org.dom4j.Element el, DocConfigDescriptor conf)
protected List<AttributeConfigDescriptor>
getAttributConfigs(org.dom4j.Element el)
protected DocConfigDescriptor
getDocCreationConfig(org.dom4j.Element el)
protected Map<String,Object>
getMVELContext(org.dom4j.Element el)
protected ParserConfigRegistry
getRegistry()
List<DocumentModel>
parse(File file)
List<DocumentModel>
parse(InputStream is)
List<DocumentModel>
parse(org.dom4j.Document doc)
protected void
process(org.dom4j.Element el)
protected void
processDocAttributes(DocumentModel doc, org.dom4j.Element el, AttributeConfigDescriptor conf)
protected Object
resolve(org.dom4j.Element el, String xpr)
protected Object
resolveAndEvaluateXmlNode(org.dom4j.Element el, String xpr)
protected Blob
resolveBlob(org.dom4j.Element el, AttributeConfigDescriptor conf, String propertyName)
protected Object
resolveComplex(org.dom4j.Element el, AttributeConfigDescriptor conf)
protected Object
resolveMVEL(org.dom4j.Element el, String xpr)
protected String
resolveName(org.dom4j.Element el, String xpr)
protected String
resolvePath(org.dom4j.Element el, String xpr)
protected Object
resolveXP(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)
-
-