2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.cdm
.io
.reference
.endnote
.in
;
12 import org
.apache
.log4j
.Logger
;
13 import org
.jdom
.Element
;
14 import org
.jdom
.Namespace
;
16 import eu
.etaxonomy
.cdm
.io
.common
.CdmImportBase
;
23 public abstract class EndNoteImportBase
extends CdmImportBase
<EndnoteImportConfigurator
, EndnoteImportState
> {
24 private static final Logger logger
= Logger
.getLogger(EndNoteImportBase
.class);
26 // protected abstract void doInvoke(EndnoteImportState state);
28 protected Element
getXmlElement(EndnoteImportConfigurator tcsConfig
){
29 Element root
= tcsConfig
.getSourceRoot();
31 if (! "xml".equals(root
.getName())){
32 logger
.error("Root element is not 'xml'");
35 if (tcsConfig
.getEndnoteNamespace() == null){
36 logger
.error("No namespace defined for tcs");
39 if (! tcsConfig
.getEndnoteNamespace().equals(root
.getNamespace())){
40 logger
.error("Wrong namespace for element 'xml'");
43 //TODO prevent multiple elements