List of usage examples for org.dom4j Element remove
boolean remove(Text text);
Text
if the node is an immediate child of this element. From source file:hudson.model.Api.java
License:Open Source License
/** * Exposes the bean as XML./*from ww w . j av a2 s . c o m*/ */ public void doXml(StaplerRequest req, StaplerResponse rsp, @QueryParameter String xpath, @QueryParameter String wrapper, @QueryParameter String tree, @QueryParameter int depth) throws IOException, ServletException { setHeaders(rsp); String[] excludes = req.getParameterValues("exclude"); if (xpath == null && excludes == null) { // serve the whole thing rsp.serveExposedBean(req, bean, Flavor.XML); return; } StringWriter sw = new StringWriter(); // first write to String Model p = MODEL_BUILDER.get(bean.getClass()); TreePruner pruner = (tree != null) ? new NamedPathPruner(tree) : new ByDepth(1 - depth); p.writeTo(bean, pruner, Flavor.XML.createDataWriter(bean, sw)); // apply XPath FilteredFunctionContext functionContext = new FilteredFunctionContext(); Object result; try { Document dom = new SAXReader().read(new StringReader(sw.toString())); // apply exclusions if (excludes != null) { for (String exclude : excludes) { XPath xExclude = dom.createXPath(exclude); xExclude.setFunctionContext(functionContext); List<org.dom4j.Node> list = (List<org.dom4j.Node>) xExclude.selectNodes(dom); for (org.dom4j.Node n : list) { Element parent = n.getParent(); if (parent != null) parent.remove(n); } } } if (xpath == null) { result = dom; } else { XPath comp = dom.createXPath(xpath); comp.setFunctionContext(functionContext); List list = comp.selectNodes(dom); if (wrapper != null) { Element root = DocumentFactory.getInstance().createElement(wrapper); for (Object o : list) { if (o instanceof String) { root.addText(o.toString()); } else { root.add(((org.dom4j.Node) o).detach()); } } result = root; } else if (list.isEmpty()) { rsp.setStatus(HttpServletResponse.SC_NOT_FOUND); rsp.getWriter().print(Messages.Api_NoXPathMatch(xpath)); return; } else if (list.size() > 1) { rsp.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); rsp.getWriter().print(Messages.Api_MultipleMatch(xpath, list.size())); return; } else { result = list.get(0); } } } catch (DocumentException e) { LOGGER.log(Level.FINER, "Failed to do XPath/wrapper handling. XML is as follows:" + sw, e); throw new IOException("Failed to do XPath/wrapper handling. Turn on FINER logging to view XML.", e); } if (isSimpleOutput(result) && !permit(req)) { // simple output prohibited rsp.sendError(HttpURLConnection.HTTP_FORBIDDEN, "primitive XPath result sets forbidden; implement jenkins.security.SecureRequester"); return; } // switch to gzipped output OutputStream o = rsp.getCompressedOutputStream(req); try { if (isSimpleOutput(result)) { // simple output allowed rsp.setContentType("text/plain;charset=UTF-8"); String text = result instanceof CharacterData ? ((CharacterData) result).getText() : result.toString(); o.write(text.getBytes("UTF-8")); return; } // otherwise XML rsp.setContentType("application/xml;charset=UTF-8"); new XMLWriter(o).write(result); } finally { o.close(); } }
From source file:itensil.kb.web.KbServlet.java
License:Open Source License
/** * /save/*w ww. j a va2 s . c om*/ * * Output: * Wiki save XML * */ @SuppressWarnings("unchecked") @ContentType("text/xml") public void webSave(HttpServletRequest request, HttpServletResponse response) throws Exception { String uri = request.getParameter("uri"); if (!Check.isEmpty(uri)) { Document doc = XMLDocument.readStream(request.getInputStream()); Element reqRoot = doc.getRootElement(); if ("kb-save".equals(reqRoot.getName())) { List<Element> arts; boolean hasMods = false; RepositoryHelper.beginTransaction(); uri = RepositoryHelper.resolveUri(uri); MutableRepositoryNode node = (MutableRepositoryNode) RepositoryHelper.getNode(uri, true); String verStr = request.getParameter("version"); NodeVersion version = Check.isEmpty(verStr) ? new DefaultNodeVersion() : new DefaultNodeVersion(verStr, false); NodeContent content = node.getContent(version); Document kbDoc = XMLDocument.readStream(content.getStream()); Element kbRoot = kbDoc.getRootElement(); // creates arts = reqRoot.elements("create"); for (Element reqArt : arts) { Element kbArt = kbRoot.addElement("article"); kbArt.addAttribute("id", reqArt.attributeValue("id")); kbArt.addAttribute("refId", reqArt.attributeValue("refId")); kbArt.addAttribute("categories", reqArt.attributeValue("categories")); kbArt.addAttribute("createTime", reqArt.attributeValue("createTime")); kbArt.addAttribute("createBy", reqArt.attributeValue("createBy")); kbArt.addAttribute("modifyTime", reqArt.attributeValue("modifyTime")); kbArt.addAttribute("modifyBy", reqArt.attributeValue("modifyBy")); kbArt.addAttribute("layout", reqArt.attributeValue("layout")); kbArt.addText(reqArt.getText()); } // modifies arts = reqRoot.elements("modify"); hasMods = arts.size() > 0; for (Element reqArt : arts) { Element kbArt = getElementById(kbRoot, "article", reqArt.attributeValue("origId")); if (kbArt == null) { // try to recover client-proclaimed failed creates kbArt = kbRoot.addElement("article"); kbArt.addAttribute("createTime", reqArt.attributeValue("createTime")); kbArt.addAttribute("createBy", reqArt.attributeValue("createBy")); } kbArt.addAttribute("id", reqArt.attributeValue("id")); kbArt.addAttribute("refId", reqArt.attributeValue("refId")); kbArt.addAttribute("categories", reqArt.attributeValue("categories")); kbArt.addAttribute("modifyTime", reqArt.attributeValue("modifyTime")); kbArt.addAttribute("modifyBy", reqArt.attributeValue("modifyBy")); kbArt.addAttribute("layout", reqArt.attributeValue("layout")); kbArt.setText(reqArt.getText()); } // deletes arts = reqRoot.elements("delete"); hasMods = hasMods || arts.size() > 0; for (Element reqArt : arts) { Element kbArt = getElementById(kbRoot, "article", reqArt.attributeValue("id")); if (kbArt != null) { kbRoot.remove(kbArt); } } NodeProperties props = node.getProperties(version); byte buf[] = kbDoc.asXML().getBytes("UTF-8"); if (hasMods) { // no version on creates if (props != null) version = props.getVersion(); version = RepositoryHelper.nextVersion(node, version, version.isDefault()); } if (props != null) { if (hasMods) { props = new DefaultNodeProperties(version, props.getPropertyMap()); } else { version = props.getVersion(); } String modDate = PropertyHelper.dateString(new Date()); props.setValue("getlastmodified", modDate); props.setValue("getcontentlength", String.valueOf(buf.length)); props.setValue(PropertyHelper.itensilQName("modifier"), ((User) request.getUserPrincipal()).getUserId()); props.setValue("getetag", PropertyHelper.makeEtag(node.getUri(), version.getNumber(), modDate, buf.length)); node.setProperties(props); } NodeContent modContent = new DefaultNodeContent(buf, version); node.setContent(modContent); RepositoryHelper.commitTransaction(); } } else { throw new NotFoundException("[blank]"); } response.getWriter().print("<ok/>"); }
From source file:itensil.workflow.activities.web.ModelingServlet.java
License:Open Source License
/** * /setModel// w w w . j a va 2s. co m * * Takes an inputstream of an Flow XML Model + URI Meta XML * * Output: * Status Message */ @ContentType("text/xml") public void webSetModel(HttpServletRequest request, HttpServletResponse response) throws Exception { String uri = request.getParameter("uri"); String actId = request.getParameter("activity"); boolean forceVariation = "1".equals(request.getParameter("forceVar")); if (!Check.isEmpty(uri)) { RepositoryHelper.beginTransaction(); User user = (User) request.getUserPrincipal(); MutableRepositoryNode node = null; Document doc = XMLDocument.readStream(request.getInputStream()); String variation = ""; Activity actEnt = null; UserActivities uActivities = null; if (!Check.isEmpty(actId)) { uActivities = new UserActivities(user, HibernateUtil.getSession()); actEnt = uActivities.getActivity(actId); node = (MutableRepositoryNode) actEnt.getVariationNode(); if (node == null && forceVariation) { String actUri = RepositoryHelper .getAvailableUri(UriHelper.absoluteUri(actEnt.getNode().getUri(), "chart.flow")); uri = RepositoryHelper.resolveUri(uri); MutableRepositoryNode srcNode = RepositoryHelper.getNode(uri, true); node = (MutableRepositoryNode) srcNode.copy(actUri, false); variation = node.getNodeId(); actEnt.setVariationId(variation); HibernateUtil.getSession().update(actEnt); } else if (node != null) { variation = node.getNodeId(); } } if (node == null) { uri = RepositoryHelper.resolveUri(uri); node = RepositoryHelper.getNode(uri, true); } uri = RepositoryHelper.resolveUri(uri); // TODO add schema validation // propagate the icon MutableRepositoryNode parNode = (MutableRepositoryNode) node.getParent(); String icon = doc.valueOf("/flow/iw:type/@icon"); if (Check.isEmpty(icon)) icon = "def"; NodeProperties props = parNode.getProperties(new DefaultNodeVersion()); if (props == null) { props = new DefaultNodeProperties(new DefaultNodeVersion()); } String val = props.getValue(PropertyHelper.itensilQName("style")); String style = "icon:" + icon; if (!style.equals(val)) { props.setValue(PropertyHelper.itensilQName("style"), style); } props.setValue(PropertyHelper.defaultQName("getlastmodified"), PropertyHelper.dateString(new Date())); parNode.setProperties(props); FlowState flowState = actEnt != null ? actEnt.getFlow() : (FlowState) HibernateUtil.getSession().get(FlowState.class, parNode.getNodeId()); boolean isMeet = parNode.getUri().indexOf("/meeting/") > 0; if (flowState != null) { FlowModel flowMod = new FlowModel(); FlowSAXHandler hand = new FlowSAXHandler(flowMod); hand.parse(doc); if (Check.isEmpty(variation)) { CustValDataContentListener.modelStateSync(flowState, flowMod); HibernateUtil.getSession().update(flowState); } HashMap<String, String> idMap = new HashMap<String, String>(); ArrayList<String> newIds = new ArrayList<String>(); FlowModel.collectIdChanges(doc.getRootElement().element("steps"), idMap, newIds); List remElems = doc.getRootElement().elements("removed"); if (!remElems.isEmpty() || !idMap.isEmpty() || !newIds.isEmpty()) { if (uActivities == null) uActivities = new UserActivities(user, HibernateUtil.getSession()); Collection<Activity> flowActs = uActivities.getFlowActivities(flowState, variation, isMeet); if (!flowActs.isEmpty()) { for (Object obEl : remElems) { Element elm = (Element) obEl; flowState.removeActiveId(flowActs, elm.attributeValue("id"), elm.attributeValue("type")); } if (!idMap.isEmpty()) flowState.activateIdChanges(flowActs, idMap); if (!newIds.isEmpty()) uActivities.enterNewStarts(flowActs, flowState, flowMod, newIds); } } } Element root = doc.getRootElement(); Element pups = root.element("plan-updates"); if (pups != null) { if (uActivities != null && actEnt != null) { ActivityXML.updatePlans(pups, actEnt, uActivities, parNode); } root.remove(pups); } if (isMeet) { // check for a meeting element included in the model... Element meetRoot = root.element("meet"); if (meetRoot != null) { Activity activityEnt = uActivities.getFirstFlowActivity(flowState); saveDraft(request, activityEnt, RequestUtil.readParameterArrays(meetRoot, new String[] { "activity", "member", "mail", "body" }), true); root.remove(meetRoot); } } byte xb[] = doc.asXML().getBytes("UTF-8"); RepositoryHelper.createContent(node, new ByteArrayInputStream(xb), xb.length, "application/itensil-flow+xml"); RepositoryHelper.commitTransaction(); response.getWriter().print("<ok variation='" + variation + "'/>"); } else { throw new NotFoundException("[blank]"); } }
From source file:itensil.workflow.model.ModelingServlet.java
License:Open Source License
/** * /setModel/*from www. j av a 2 s . c om*/ * * Takes an inputstream of an Flow XML Model + URI Meta XML * * Output: * Status Message * */ @ContentType("text/xml") public void webSetModel(HttpServletRequest request, HttpServletResponse response) throws Exception { Document doc = XMLDocument.readStream(request.getInputStream()); if (LegacySupport.isLegacyModel(doc)) doc = LegacySupport.upgrade(doc); // filter meta Element root = doc.getRootElement(); Element meta = root.element("meta"); if (meta != null) { root.remove(meta); } // TODO app-specific saving... }
From source file:job.tot.xml.DOM4JConfiguration.java
License:Apache License
private void clearXmlProperty(String name) { String[] nodes = StringUtils.split(name, NODE_DELIMITER); String attName = null;// w ww . j ava 2s.com Element element = document.getRootElement(); for (int i = 0; i < nodes.length; i++) { String eName = nodes[i]; int index = eName.indexOf(ATTRIB_START_MARKER); if (index > -1) { attName = eName.substring(index + ATTRIB_START_MARKER.length(), eName.length() - 1); eName = eName.substring(0, index); } element = element.element(eName); if (element == null) { return; } } if (attName == null) { element.remove(element.element(nodes[nodes.length - 1])); } else { element.remove(element.attribute(attName)); } }
From source file:mesquite.minimal.Simplicity.Simplicity.java
License:Open Source License
public void renameSettingsFile(int i, String newName) { if (!MesquiteInteger.isCombinable(i) || i < 0 || i >= InterfaceManager.settingsFiles.size()) return;//from w w w . j a v a2s . c o m StringArray s = (StringArray) InterfaceManager.settingsFiles.elementAt(i); String path = s.getValue(PATH); String settingsXML = s.getValue(XML); Element root = XMLUtil.getRootXMLElementFromString("mesquite", settingsXML); if (root == null) return; Element element = root.element("simplicitySettings"); if (element != null) { Element versionElement = element.element("version"); if (versionElement == null) return; else { int version = MesquiteInteger.fromString(element.elementText("version")); boolean acceptableVersion = version == 1; if (acceptableVersion) { Element name = element.element("name"); Element settingsFile = DocumentHelper.createElement("mesquite"); Document doc = DocumentHelper.createDocument(settingsFile); Element hidden = DocumentHelper.createElement("simplicitySettings"); settingsFile.add(hidden); XMLUtil.addFilledElement(hidden, "version", "1"); XMLUtil.addFilledElement(hidden, "name", newName); Element hp = element.element("hiddenPackages"); element.remove(hp); hidden.add(hp); hp = element.element("hiddenMenuItems"); element.remove(hp); hidden.add(hp); hp = element.element("hiddenTools"); element.remove(hp); hidden.add(hp); s.setName(newName); MesquiteFile.putFileContents(path, XMLUtil.getDocumentAsXMLString(doc), false); } } } }
From source file:metadata_generator.rasterjob_0_1.RasterJob.java
License:Apache License
public void sGdalInfoInput_2Process(final java.util.Map<String, Object> globalMap) throws TalendException { globalMap.put("sGdalInfoInput_2_SUBPROCESS_STATE", 0); final boolean execStat = this.execStat; String iterateId = ""; String currentComponent = ""; java.util.Map<String, Object> resourceMap = new java.util.HashMap<String, Object>(); try {/*from w w w . ja v a 2 s . c o m*/ String currentMethodName = new java.lang.Exception().getStackTrace()[0].getMethodName(); boolean resumeIt = currentMethodName.equals(resumeEntryMethodName); if (resumeEntryMethodName == null || resumeIt || globalResumeTicket) {// start // the // resume globalResumeTicket = true; tFileInputDelimited_1Process(globalMap); fromActualFileStruct fromActualFile = new fromActualFileStruct(); iso19115Struct iso19115 = new iso19115Struct(); row2Struct row2 = new row2Struct(); row1Struct row1 = new row1Struct(); row1Struct row3 = row1; /** * [tAdvancedFileOutputXML_2 begin ] start */ ok_Hash.put("tAdvancedFileOutputXML_2", false); start_Hash.put("tAdvancedFileOutputXML_2", System.currentTimeMillis()); currentComponent = "tAdvancedFileOutputXML_2"; int tos_count_tAdvancedFileOutputXML_2 = 0; int nb_line_tAFOX_2 = 0; boolean needRoot_tAFOX_2 = true; String fileName_tAFOX_2 = (context.generateMetadataInSeparateDir ? context.metadataDir + "/" + new java.io.File(context.file).getName() : context.file) + "_md_iso19115-3_" + System.currentTimeMillis() + ".xml"; Boolean alreadyExistsFile_tAFOX_2 = new java.io.File(fileName_tAFOX_2).exists(); fileName_tAFOX_2 = new java.io.File(fileName_tAFOX_2).getAbsolutePath().replace("\\", "/"); String file_tAFOX_2 = ""; if (fileName_tAFOX_2.indexOf("/") < 0) { throw new IllegalArgumentException("not a correct file name."); } else { String tail_tAFOX_2 = fileName_tAFOX_2.substring(fileName_tAFOX_2.lastIndexOf("/")); file_tAFOX_2 = tail_tAFOX_2.lastIndexOf(".") > 0 ? fileName_tAFOX_2.substring(0, fileName_tAFOX_2.lastIndexOf(".")) : fileName_tAFOX_2; } java.io.File createFiletAFOX_2 = new java.io.File(fileName_tAFOX_2); if (!createFiletAFOX_2.exists()) { (new java.io.File(fileName_tAFOX_2.substring(0, fileName_tAFOX_2.lastIndexOf("/")))).mkdirs(); needRoot_tAFOX_2 = true; } java.util.List<java.util.List<String>> groupbyList_tAFOX_2 = new java.util.ArrayList<java.util.List<String>>(); java.util.Map<String, String> valueMap_tAFOX_2 = new java.util.HashMap<String, String>(); class NestXMLTool_tAFOX_2 { public void parseAndAdd(org.dom4j.Element nestRoot, String value) { try { org.dom4j.Document doc4Str = org.dom4j.DocumentHelper .parseText("<root>" + value + "</root>"); nestRoot.setContent(doc4Str.getRootElement().content()); } catch (java.lang.Exception e) { // e.printStackTrace(); nestRoot.setText(value); } } public void setText(org.dom4j.Element element, String value) { if (value.startsWith("<![CDATA[") && value.endsWith("]]>")) { String text = value.substring(9, value.length() - 3); element.addCDATA(text); } else { element.setText(value); } } public void appendContent(org.dom4j.Element element, org.dom4j.Document doc) { element.appendContent(doc); } public void replaceDefaultNameSpace(org.dom4j.Element nestRoot) { if (nestRoot != null) { boolean isDefaultNameSpaceAtRoot = "" .equals(nestRoot.getQName().getNamespace().getPrefix()); for (org.dom4j.Element tmp : (java.util.List<org.dom4j.Element>) nestRoot.elements()) { if (("").equals(tmp.getQName().getNamespace().getURI()) && ("").equals(tmp.getQName().getNamespace().getPrefix()) && isDefaultNameSpaceAtRoot) { tmp.setQName(org.dom4j.DocumentHelper.createQName(tmp.getName(), nestRoot.getQName().getNamespace())); } replaceDefaultNameSpace(tmp); } } } public void removeEmptyElement(org.dom4j.Element root) { if (root != null) { for (org.dom4j.Element tmp : (java.util.List<org.dom4j.Element>) root.elements()) { removeEmptyElement(tmp); } if (root.content().size() == 0 && root.attributes().size() == 0 && root.declaredNamespaces().size() == 0) { if (root.getParent() != null) { root.getParent().remove(root); } } } } /** * remove the whiteSpace Node between the elements when * appending the source file under dom4j * * @param root */ public void removeWhiteSpaceTextNode(org.dom4j.Element root) { if (root != null) { List<org.dom4j.Node> textNodes = new java.util.ArrayList<org.dom4j.Node>(); for (int i = 0; i < root.nodeCount(); i++) { if (root.node(i).getNodeType() == org.dom4j.Node.ELEMENT_NODE) { removeWhiteSpaceTextNode((org.dom4j.Element) root.node(i)); } else if (root.node(i).getNodeType() == org.dom4j.Node.TEXT_NODE) { textNodes.add(root.node(i)); } } if (root.nodeCount() > 1) { // when // root.nodeCount==1, // that means the text // node is the content // of the element for (org.dom4j.Node textNode : textNodes) { if (textNode.getText() == null || "".equals(textNode.getText().trim())) { root.remove(textNode); } } } } } } NestXMLTool_tAFOX_2 nestXMLTool_tAFOX_2 = new NestXMLTool_tAFOX_2(); // sort group root element for judgement of group java.util.List<org.dom4j.Element> groupElementList_tAFOX_2 = new java.util.ArrayList<org.dom4j.Element>(); org.dom4j.Element root4Group_tAFOX_2 = null; org.dom4j.Document doc_tAFOX_2 = null; doc_tAFOX_2 = org.dom4j.DocumentHelper.createDocument(); org.dom4j.io.OutputFormat format_tAFOX_2 = org.dom4j.io.OutputFormat.createPrettyPrint(); format_tAFOX_2.setTrimText(false); format_tAFOX_2.setEncoding("UTF-8"); int[] orders_tAFOX_2 = new int[1]; /** * [tAdvancedFileOutputXML_2 begin ] stop */ /** * [tLogRow_2 begin ] start */ ok_Hash.put("tLogRow_2", false); start_Hash.put("tLogRow_2", System.currentTimeMillis()); currentComponent = "tLogRow_2"; int tos_count_tLogRow_2 = 0; /** * [tLogRow_2 begin ] stop */ /** * [tExtractDelimitedFields_1 begin ] start */ ok_Hash.put("tExtractDelimitedFields_1", false); start_Hash.put("tExtractDelimitedFields_1", System.currentTimeMillis()); currentComponent = "tExtractDelimitedFields_1"; int tos_count_tExtractDelimitedFields_1 = 0; int nb_line_tExtractDelimitedFields_1 = 0; /** * [tExtractDelimitedFields_1 begin ] stop */ /** * [tNormalize_2 begin ] start */ ok_Hash.put("tNormalize_2", false); start_Hash.put("tNormalize_2", System.currentTimeMillis()); currentComponent = "tNormalize_2"; int tos_count_tNormalize_2 = 0; int nb_line_tNormalize_2 = 0; String tmp_tNormalize_2 = null; StringBuilder currentRecord_tNormalize_2 = null; String[] normalizeRecord_tNormalize_2 = null; java.util.Set<String> recordSet_tNormalize_2 = new java.util.HashSet<String>(); /** * [tNormalize_2 begin ] stop */ /** * [tMap_1 begin ] start */ ok_Hash.put("tMap_1", false); start_Hash.put("tMap_1", System.currentTimeMillis()); currentComponent = "tMap_1"; int tos_count_tMap_1 = 0; // ############################### // # Lookup's keys initialization org.talend.designer.components.lookup.memory.AdvancedMemoryLookup<propertiesStruct> tHash_Lookup_properties = (org.talend.designer.components.lookup.memory.AdvancedMemoryLookup<propertiesStruct>) ((org.talend.designer.components.lookup.memory.AdvancedMemoryLookup<propertiesStruct>) globalMap .get("tHash_Lookup_properties")); tHash_Lookup_properties.initGet(); propertiesStruct propertiesHashKey = new propertiesStruct(); propertiesStruct propertiesDefault = new propertiesStruct(); // ############################### // ############################### // # Vars initialization class Var__tMap_1__Struct { String filename; String filepath; String fileext; String dateStamp; String uuidbase; String mdUuid; String fcatUuid; String layerName; String east; String west; String south; String north; String mdIndividualName; String mdOrganisationName; String mdPositionName; String mdVoice; String mdDeliveryPoint; String mdCity; String mdAdministrativeArea; String mdPostalCode; String mdCountry; String mdEmail; String individualName; String organisationName; String positionName; String voice; String deliveryPoint; String city; String administrativeArea; String postalCode; String country; String email; String title; String srs; } Var__tMap_1__Struct Var__tMap_1 = new Var__tMap_1__Struct(); // ############################### // ############################### // # Outputs initialization iso19115Struct iso19115_tmp = new iso19115Struct(); // ############################### /** * [tMap_1 begin ] stop */ /** * [sGdalInfoInput_2 begin ] start */ ok_Hash.put("sGdalInfoInput_2", false); start_Hash.put("sGdalInfoInput_2", System.currentTimeMillis()); currentComponent = "sGdalInfoInput_2"; int tos_count_sGdalInfoInput_2 = 0; // Fixed number of line. Only one row to extract information. int nb_line_sGdalInfoInput_2 = 1; /* Initialize GDAL main variables */ org.gdal.gdal.Dataset dataset_sGdalInfoInput_2 = null; org.gdal.gdal.Driver driver_sGdalInfoInput_2 = null; org.gdal.osr.SpatialReference proj_sGdalInfoInput_2, latlon_sGdalInfoInput_2 = null; org.gdal.osr.CoordinateTransformation transform_sGdalInfoInput_2 = null; /* Initialize JTS main variables */ com.vividsolutions.jts.geom.GeometryFactory gFact_sGdalInfoInput_2 = new com.vividsolutions.jts.geom.GeometryFactory(); /* Initialize variables */ String srs_sGdalInfoInput_2 = null; org.opengis.referencing.crs.CoordinateReferenceSystem crs_sGdalInfoInput_2 = null; // Default SRS EPSG code, if none is found int epsg_code_sGdalInfoInput_2 = -1; String datasetName_sGdalInfoInput_2 = /** * Start field * sGdalInfoInput_2:FILENAME */ context.file/** End field sGdalInfoInput_2:FILENAME */ ; String FS_sGdalInfoInput_2 = /** * Start field * sGdalInfoInput_2:FIELD_SEPARATOR */ " | "/** End field sGdalInfoInput_2:FIELD_SEPARATOR */ ; int nbErrors_sGdalInfoInput_2 = 0; String errors_sGdalInfoInput_2 = ""; // Register all known configured GDAL drivers. try { org.gdal.gdal.gdal.AllRegister(); } catch (java.lang.UnsatisfiedLinkError e) { System.err.println( "In order to use GDAL/OGR in Talend, the java.library.path variable should point to GDAL library."); System.err.println( "To set this property, go to the Run view > Advanced settings > Use specific JVM Arguments"); System.err.println("and add a new argument:"); System.err.println(" -Djava.library.path=/path/to/gdal/swig/java"); System.err.println(""); e.printStackTrace(); // Aborting due to wrong GDAL driver configuration throw e; } // Open a GDAL dataset dataset_sGdalInfoInput_2 = org.gdal.gdal.gdal.Open(datasetName_sGdalInfoInput_2, org.gdal.gdalconst.gdalconstConstants.GA_ReadOnly); if (dataset_sGdalInfoInput_2 == null) { nbErrors_sGdalInfoInput_2++; errors_sGdalInfoInput_2 = "FAILURE: " + "Unable to open datasource `" + datasetName_sGdalInfoInput_2 + "' with the GDAL drivers. " + "Dataset is null : GDALOpen failed - " + org.gdal.gdal.gdal.GetLastErrorNo() + ". " + org.gdal.gdal.gdal.GetLastErrorMsg(); System.err.println(errors_sGdalInfoInput_2); for (int iDriver = 0; iDriver < org.gdal.gdal.gdal.GetDriverCount(); iDriver++) { System.err.println(" -> " + org.gdal.gdal.gdal.GetDriver(iDriver).getLongName()); } System.err.println("Drivers number " + org.gdal.gdal.gdal.GetDriverCount()); } else { // Get current GDAL driver driver_sGdalInfoInput_2 = dataset_sGdalInfoInput_2.GetDriver(); /* Handle Projection - lat/long transformation */ String projection_sGdalInfoInput_2 = dataset_sGdalInfoInput_2.GetProjectionRef(); if (projection_sGdalInfoInput_2 != null && projection_sGdalInfoInput_2.length() > 0) { proj_sGdalInfoInput_2 = new org.gdal.osr.SpatialReference(projection_sGdalInfoInput_2); if (proj_sGdalInfoInput_2 == null) { // No projection } else { srs_sGdalInfoInput_2 = proj_sGdalInfoInput_2.ExportToPrettyWkt(0); if ("EPSG".equals(proj_sGdalInfoInput_2.GetAuthorityName(null))) { epsg_code_sGdalInfoInput_2 = Integer .parseInt(proj_sGdalInfoInput_2.GetAuthorityCode(null)); try { crs_sGdalInfoInput_2 = org.geotools.referencing.CRS .decode("EPSG:" + epsg_code_sGdalInfoInput_2); } catch (Exception e) { System.err.println("Error trying to identify SRS from EPSG code. Error is: " + e.getMessage() + "."); } } else { // use WKT and init GeoTools CRS try { if (srs_sGdalInfoInput_2 != null) { crs_sGdalInfoInput_2 = org.geotools.referencing.CRS .parseWKT(srs_sGdalInfoInput_2); } } catch (Exception e) { System.err.println( "Error trying to identify SRS from WKT. Error is: " + e.getMessage()); } } latlon_sGdalInfoInput_2 = proj_sGdalInfoInput_2.CloneGeogCS(); } if (latlon_sGdalInfoInput_2 != null) { org.gdal.gdal.gdal.PushErrorHandler("CPLQuietErrorHandler"); transform_sGdalInfoInput_2 = new org.gdal.osr.CoordinateTransformation( proj_sGdalInfoInput_2, latlon_sGdalInfoInput_2); org.gdal.gdal.gdal.PopErrorHandler(); latlon_sGdalInfoInput_2.delete(); if (org.gdal.gdal.gdal.GetLastErrorMsg() .indexOf("Unable to load PROJ.4 library") != -1) { transform_sGdalInfoInput_2 = null; } } } /* Affine GeoTransform */ org.talend.sdi.geometry.Geometry geom_origin_sGdalInfoInput_2 = null; String pixel_size_sGdalInfoInput_2 = null; String geotransform_sGdalInfoInput_2 = null; double[] adfGeoTransform_sGdalInfoInput_2 = new double[6]; dataset_sGdalInfoInput_2.GetGeoTransform(adfGeoTransform_sGdalInfoInput_2); if (adfGeoTransform_sGdalInfoInput_2[2] == 0.0 && adfGeoTransform_sGdalInfoInput_2[4] == 0.0) { /* Create point origin */ com.vividsolutions.jts.geom.Coordinate origin_coord_sGdalInfoInput_2 = new com.vividsolutions.jts.geom.Coordinate( adfGeoTransform_sGdalInfoInput_2[0], adfGeoTransform_sGdalInfoInput_2[3]); geom_origin_sGdalInfoInput_2 = new org.talend.sdi.geometry.Geometry( (com.vividsolutions.jts.geom.Geometry) gFact_sGdalInfoInput_2 .createPoint(origin_coord_sGdalInfoInput_2)); /* Pixel size */ pixel_size_sGdalInfoInput_2 = adfGeoTransform_sGdalInfoInput_2[1] + "," + adfGeoTransform_sGdalInfoInput_2[5]; } else { geotransform_sGdalInfoInput_2 = adfGeoTransform_sGdalInfoInput_2[0] + ", " + adfGeoTransform_sGdalInfoInput_2[1] + ", " + adfGeoTransform_sGdalInfoInput_2[2] + "\n " + adfGeoTransform_sGdalInfoInput_2[3] + ", " + adfGeoTransform_sGdalInfoInput_2[4] + ", " + adfGeoTransform_sGdalInfoInput_2[5]; } /* Compute extent */ java.util.HashMap<String, double[]> corners_sGdalInfoInput_2 = new java.util.HashMap<String, double[]>( 5); double[] upper_left_corner_sGdalInfoInput_2 = { 0.0, 0.0 }; double[] lower_left_corner_sGdalInfoInput_2 = { 0.0, dataset_sGdalInfoInput_2.getRasterYSize() }; double[] upper_right_corner_sGdalInfoInput_2 = { dataset_sGdalInfoInput_2.getRasterXSize(), 0.0 }; double[] lower_right_corner_sGdalInfoInput_2 = { dataset_sGdalInfoInput_2.getRasterXSize(), dataset_sGdalInfoInput_2.getRasterYSize() }; double[] center_sGdalInfoInput_2 = { dataset_sGdalInfoInput_2.getRasterXSize() / 2.0, dataset_sGdalInfoInput_2.getRasterYSize() / 2.0 }; corners_sGdalInfoInput_2.put("upperLeft", upper_left_corner_sGdalInfoInput_2); corners_sGdalInfoInput_2.put("lowerLeft", lower_left_corner_sGdalInfoInput_2); corners_sGdalInfoInput_2.put("upperRight", upper_right_corner_sGdalInfoInput_2); corners_sGdalInfoInput_2.put("lowerRight", lower_right_corner_sGdalInfoInput_2); corners_sGdalInfoInput_2.put("center", center_sGdalInfoInput_2); java.util.HashMap<String, com.vividsolutions.jts.geom.Coordinate> geoXY_sGdalInfoInput_2 = new java.util.HashMap<String, com.vividsolutions.jts.geom.Coordinate>( 5); java.util.HashMap<String, com.vividsolutions.jts.geom.Coordinate> latlonXY_sGdalInfoInput_2 = new java.util.HashMap<String, com.vividsolutions.jts.geom.Coordinate>( 5); for (String corner_sGdalInfoInput_2 : corners_sGdalInfoInput_2.keySet()) { com.vividsolutions.jts.geom.Coordinate coord_sGdalInfoInput_2 = new com.vividsolutions.jts.geom.Coordinate(); if (adfGeoTransform_sGdalInfoInput_2[0] == 0 && adfGeoTransform_sGdalInfoInput_2[1] == 0 && adfGeoTransform_sGdalInfoInput_2[2] == 0 && adfGeoTransform_sGdalInfoInput_2[3] == 0 && adfGeoTransform_sGdalInfoInput_2[4] == 0 && adfGeoTransform_sGdalInfoInput_2[5] == 0) { coord_sGdalInfoInput_2.x = corners_sGdalInfoInput_2.get(corner_sGdalInfoInput_2)[0]; coord_sGdalInfoInput_2.y = corners_sGdalInfoInput_2.get(corner_sGdalInfoInput_2)[1]; } else { coord_sGdalInfoInput_2.x = adfGeoTransform_sGdalInfoInput_2[0] + adfGeoTransform_sGdalInfoInput_2[1] * corners_sGdalInfoInput_2.get(corner_sGdalInfoInput_2)[0] + adfGeoTransform_sGdalInfoInput_2[2] * corners_sGdalInfoInput_2.get(corner_sGdalInfoInput_2)[1]; coord_sGdalInfoInput_2.y = adfGeoTransform_sGdalInfoInput_2[3] + adfGeoTransform_sGdalInfoInput_2[4] * corners_sGdalInfoInput_2.get(corner_sGdalInfoInput_2)[0] + adfGeoTransform_sGdalInfoInput_2[5] * corners_sGdalInfoInput_2.get(corner_sGdalInfoInput_2)[1]; } geoXY_sGdalInfoInput_2.put(corner_sGdalInfoInput_2, coord_sGdalInfoInput_2); // lat/long transformation if (transform_sGdalInfoInput_2 != null) { double[] transPoint_sGdalInfoInput_2 = new double[3]; transform_sGdalInfoInput_2.TransformPoint(transPoint_sGdalInfoInput_2, coord_sGdalInfoInput_2.x, coord_sGdalInfoInput_2.y, 0); latlonXY_sGdalInfoInput_2.put(corner_sGdalInfoInput_2, new com.vividsolutions.jts.geom.Coordinate(transPoint_sGdalInfoInput_2[0], transPoint_sGdalInfoInput_2[1])); } } fromActualFile.driver = driver_sGdalInfoInput_2.getShortName() + "/" + driver_sGdalInfoInput_2.getLongName(); // Loop over associated files. String files_sGdalInfoInput_2 = null; java.util.Vector<String> fileList_sGdalInfoInput_2 = dataset_sGdalInfoInput_2.GetFileList(); boolean singleFile_sGdalInfoInput_2 = true; for (String file_sGdalInfoInput_2 : fileList_sGdalInfoInput_2) { if (singleFile_sGdalInfoInput_2) { files_sGdalInfoInput_2 = file_sGdalInfoInput_2; singleFile_sGdalInfoInput_2 = false; } else { files_sGdalInfoInput_2 += FS_sGdalInfoInput_2 + file_sGdalInfoInput_2; } } fromActualFile.files = files_sGdalInfoInput_2; fromActualFile.x_size = dataset_sGdalInfoInput_2.getRasterXSize(); fromActualFile.y_size = dataset_sGdalInfoInput_2.getRasterYSize(); fromActualFile.srs = srs_sGdalInfoInput_2; fromActualFile.epsg_code = epsg_code_sGdalInfoInput_2; fromActualFile.origin = geom_origin_sGdalInfoInput_2; fromActualFile.pixel_size = pixel_size_sGdalInfoInput_2; fromActualFile.geotransform = geotransform_sGdalInfoInput_2; // the center of the extent (Point) org.talend.sdi.geometry.Geometry geom_center_sGdalInfoInput_2 = new org.talend.sdi.geometry.Geometry( (com.vividsolutions.jts.geom.Geometry) gFact_sGdalInfoInput_2 .createPoint(geoXY_sGdalInfoInput_2.get("center"))); if (crs_sGdalInfoInput_2 != null) { geom_center_sGdalInfoInput_2.setCRS(crs_sGdalInfoInput_2); } fromActualFile.center = geom_center_sGdalInfoInput_2; // the geo extent (Polygon) com.vividsolutions.jts.geom.Coordinate[] geoCoords_sGdalInfoInput_2 = new com.vividsolutions.jts.geom.Coordinate[5]; geoCoords_sGdalInfoInput_2[0] = geoXY_sGdalInfoInput_2.get("upperLeft"); geoCoords_sGdalInfoInput_2[1] = geoXY_sGdalInfoInput_2.get("lowerLeft"); geoCoords_sGdalInfoInput_2[2] = geoXY_sGdalInfoInput_2.get("lowerRight"); geoCoords_sGdalInfoInput_2[3] = geoXY_sGdalInfoInput_2.get("upperRight"); geoCoords_sGdalInfoInput_2[4] = geoXY_sGdalInfoInput_2.get("upperLeft"); org.talend.sdi.geometry.Geometry geo_extent_sGdalInfoInput_2 = new org.talend.sdi.geometry.Geometry( (com.vividsolutions.jts.geom.Geometry) gFact_sGdalInfoInput_2.createPolygon( gFact_sGdalInfoInput_2.createLinearRing(geoCoords_sGdalInfoInput_2), null)); if (crs_sGdalInfoInput_2 != null) { geo_extent_sGdalInfoInput_2.setCRS(crs_sGdalInfoInput_2); } fromActualFile.geo_extent = geo_extent_sGdalInfoInput_2; // the lat/long extent (Polygon) org.talend.sdi.geometry.Geometry latlon_extent_sGdalInfoInput_2 = null; if (!latlonXY_sGdalInfoInput_2.isEmpty()) { com.vividsolutions.jts.geom.Coordinate[] latlonCoords_sGdalInfoInput_2 = new com.vividsolutions.jts.geom.Coordinate[5]; latlonCoords_sGdalInfoInput_2[0] = latlonXY_sGdalInfoInput_2.get("upperLeft"); latlonCoords_sGdalInfoInput_2[1] = latlonXY_sGdalInfoInput_2.get("lowerLeft"); latlonCoords_sGdalInfoInput_2[2] = latlonXY_sGdalInfoInput_2.get("lowerRight"); latlonCoords_sGdalInfoInput_2[3] = latlonXY_sGdalInfoInput_2.get("upperRight"); latlonCoords_sGdalInfoInput_2[4] = latlonXY_sGdalInfoInput_2.get("upperLeft"); latlon_extent_sGdalInfoInput_2 = new org.talend.sdi.geometry.Geometry( (com.vividsolutions.jts.geom.Geometry) gFact_sGdalInfoInput_2.createPolygon( gFact_sGdalInfoInput_2.createLinearRing(latlonCoords_sGdalInfoInput_2), null)); latlon_extent_sGdalInfoInput_2.setCRS(org.geotools.referencing.CRS.decode("EPSG:4326")); } fromActualFile.latlon_extent = latlon_extent_sGdalInfoInput_2; // Loop over the bands if any. String bandsInfo_sGdalInfoInput_2 = ""; for (int iBand_sGdalInfoInput_2 = 0; iBand_sGdalInfoInput_2 < dataset_sGdalInfoInput_2 .getRasterCount(); iBand_sGdalInfoInput_2++) { org.gdal.gdal.Band band_sGdalInfoInput_2 = dataset_sGdalInfoInput_2 .GetRasterBand(iBand_sGdalInfoInput_2 + 1); int[] blockXSize_sGdalInfoInput_2 = new int[1]; int[] blockYSize_sGdalInfoInput_2 = new int[1]; band_sGdalInfoInput_2.GetBlockSize(blockXSize_sGdalInfoInput_2, blockYSize_sGdalInfoInput_2); if (iBand_sGdalInfoInput_2 > 0) { bandsInfo_sGdalInfoInput_2 += FS_sGdalInfoInput_2; } bandsInfo_sGdalInfoInput_2 += "Band : " + (iBand_sGdalInfoInput_2 + 1) + " Block=" + blockXSize_sGdalInfoInput_2[0] + "x" + blockYSize_sGdalInfoInput_2[0] + " Type=" + org.gdal.gdal.gdal.GetDataTypeName(band_sGdalInfoInput_2.getDataType()) + ", ColorInterp=" + org.gdal.gdal.gdal.GetColorInterpretationName( band_sGdalInfoInput_2.GetRasterColorInterpretation()); } fromActualFile.bands = bandsInfo_sGdalInfoInput_2; /** * [sGdalInfoInput_2 begin ] stop */ /** * [sGdalInfoInput_2 main ] start */ currentComponent = "sGdalInfoInput_2"; tos_count_sGdalInfoInput_2++; /** * [sGdalInfoInput_2 main ] stop */ /** * [tMap_1 main ] start */ currentComponent = "tMap_1"; boolean hasCasePrimitiveKeyWithNull_tMap_1 = false; // ############################### // # Input tables (lookups) boolean rejectedInnerJoin_tMap_1 = false; boolean mainRowRejected_tMap_1 = false; // ///////////////////////////////////////////// // Starting Lookup Table "properties" // ///////////////////////////////////////////// boolean forceLoopproperties = false; propertiesStruct propertiesObjectFromLookup = null; if (!rejectedInnerJoin_tMap_1) { // G_TM_M_020 tHash_Lookup_properties.lookup(propertiesHashKey); if (!tHash_Lookup_properties.hasNext()) { // G_TM_M_090 forceLoopproperties = true; } // G_TM_M_090 } // G_TM_M_020 else { // G 20 - G 21 forceLoopproperties = true; } // G 21 propertiesStruct properties = null; while ((tHash_Lookup_properties != null && tHash_Lookup_properties.hasNext()) || forceLoopproperties) { // G_TM_M_043 // CALL close loop of lookup 'properties' propertiesStruct fromLookup_properties = null; properties = propertiesDefault; if (!forceLoopproperties) { // G 46 fromLookup_properties = tHash_Lookup_properties.next(); if (fromLookup_properties != null) { properties = fromLookup_properties; } if (!rejectedInnerJoin_tMap_1 && !( "geo".equals(properties.dataType) ) ) { // G 016 fromLookup_properties = null; properties = propertiesDefault; } // G 016 if (fromLookup_properties == null && !rejectedInnerJoin_tMap_1) { // G 017 continue; } // G 017 } // G 46 forceLoopproperties = false; // ############################### { // start of Var scope // ############################### // # Vars tables Var__tMap_1__Struct Var = Var__tMap_1; Var.filename = new java.io.File(context.file).getName(); Var.filepath = context.file; Var.fileext = Var.filename.substring(Var.filename.lastIndexOf(".") + 1); Var.dateStamp = TalendDate.formatDate("yyyy-MM-dd'T'HH:mm:ss", TalendDate.getCurrentDate()); Var.uuidbase = Var.filename; Var.mdUuid = Utility.sha256Digest(Var.uuidbase); Var.fcatUuid = Utility.sha256Digest(Var.uuidbase + "#iso19110"); Var.layerName = StringHandling.INDEX(Var.fileext, ".") > 0 ? (Var.filename.substring(0, Var.filename.indexOf(Var.fileext) - 1)) : (Var.filename); Var.east = fromActualFile.latlon_extent != null ? GeometryOperation.GETCOORDINATE(fromActualFile.latlon_extent, 2, "X") + "" : (context.defaultProjection != null ? GeometryOperation .GETCOORDINATE( GeometryOperation.PROJ(fromActualFile.geo_extent, context.defaultProjection, "EPSG:4326", false), 2, "X") + "" : context.defaultXMax); Var.west = fromActualFile.latlon_extent != null ? GeometryOperation.GETCOORDINATE(fromActualFile.latlon_extent, 0, "X") + "" : (context.defaultProjection != null ? GeometryOperation .GETCOORDINATE( GeometryOperation.PROJ(fromActualFile.geo_extent, context.defaultProjection, "EPSG:4326", false), 0, "X") + "" : context.defaultXMin); Var.south = fromActualFile.latlon_extent != null ? GeometryOperation.GETCOORDINATE(fromActualFile.latlon_extent, 2, "Y") + "" : (context.defaultProjection != null ? GeometryOperation .GETCOORDINATE( GeometryOperation.PROJ(fromActualFile.geo_extent, context.defaultProjection, "EPSG:4326", false), 2, "Y") + "" : context.defaultYMin); Var.north = fromActualFile.latlon_extent != null ? GeometryOperation.GETCOORDINATE(fromActualFile.latlon_extent, 0, "Y") + "" : (context.defaultProjection != null ? GeometryOperation .GETCOORDINATE( GeometryOperation.PROJ(fromActualFile.geo_extent, context.defaultProjection, "EPSG:4326", false), 0, "Y") + "" : context.defaultYMax); Var.mdIndividualName = ExtractorStringUtils.returnFirstNotNullOrBlank( context.mdIndividualName, properties.mdIndividualName); Var.mdOrganisationName = ExtractorStringUtils.returnFirstNotNullOrBlank( context.mdOrganisation, properties.mdOrganisationName); Var.mdPositionName = ExtractorStringUtils .returnFirstNotNullOrBlank(context.mdPositionName, properties.mdPositionName); Var.mdVoice = ExtractorStringUtils.returnFirstNotNullOrBlank(context.mdVoice, properties.mdVoice); Var.mdDeliveryPoint = ExtractorStringUtils .returnFirstNotNullOrBlank(context.mdDeliveryPoint, properties.mdDeliveryPoint); Var.mdCity = ExtractorStringUtils.returnFirstNotNullOrBlank(context.mdCity, properties.mdCity); Var.mdAdministrativeArea = ExtractorStringUtils.returnFirstNotNullOrBlank( context.mdAdministrativeArea, properties.mdAdministrativeArea); Var.mdPostalCode = ExtractorStringUtils.returnFirstNotNullOrBlank(context.mdPostalCode, properties.mdPostalCode); Var.mdCountry = ExtractorStringUtils.returnFirstNotNullOrBlank(context.mdCountry, properties.mdCountry); Var.mdEmail = ExtractorStringUtils.returnFirstNotNullOrBlank(context.mdEmail, properties.mdEmail); Var.individualName = ExtractorStringUtils .returnFirstNotNullOrBlank(context.individualName, properties.individualName); Var.organisationName = ExtractorStringUtils.returnFirstNotNullOrBlank( context.organisationName, properties.organisationName); Var.positionName = ExtractorStringUtils.returnFirstNotNullOrBlank(context.positionName, properties.positionName); Var.voice = ExtractorStringUtils.returnFirstNotNullOrBlank(context.voice, properties.voice); Var.deliveryPoint = ExtractorStringUtils .returnFirstNotNullOrBlank(context.deliveryPoint, properties.deliveryPoint); Var.city = ExtractorStringUtils.returnFirstNotNullOrBlank(context.city, properties.city); Var.administrativeArea = ExtractorStringUtils .returnFirstNotNullOrBlank(context.administrativeArea, properties.adminArea); Var.postalCode = ExtractorStringUtils.returnFirstNotNullOrBlank(context.postalCode, properties.postalCode); Var.country = ExtractorStringUtils.returnFirstNotNullOrBlank(context.country, properties.country); Var.email = ExtractorStringUtils.returnFirstNotNullOrBlank(context.email, properties.email); Var.title = context.titlePrefixRaster + Var.filename; Var.srs = fromActualFile.epsg_code == -1 ? context.defaultProjection : "EPSG:" + fromActualFile.epsg_code;// ############################### // ############################### // # Output tables iso19115 = null; // # Output table : 'iso19115' iso19115_tmp.mdIdentifier = Var.mdUuid; iso19115_tmp.mdLanguage = null; iso19115_tmp.mdCharacterSetCode = null; iso19115_tmp.ciRoleCode = null; iso19115_tmp.mdOrganisation = Var.mdOrganisationName; iso19115_tmp.mdVoice = Var.mdVoice; iso19115_tmp.mdIndividualName = Var.mdIndividualName; iso19115_tmp.mdPositionName = Var.mdPositionName; iso19115_tmp.mdDeliveryPoint = Var.mdDeliveryPoint; iso19115_tmp.mdCity = Var.mdCity; iso19115_tmp.mdAdministrativeArea = Var.mdAdministrativeArea; iso19115_tmp.mdPostalCode = Var.mdPostalCode; iso19115_tmp.mdCountry = Var.mdCountry; iso19115_tmp.mdEmail = Var.mdEmail; iso19115_tmp.mdDate = Var.dateStamp; iso19115_tmp.title = Var.title; iso19115_tmp.organisationName = Var.organisationName; iso19115_tmp.voice = Var.voice; iso19115_tmp.email = Var.email; iso19115_tmp.individualName = Var.individualName; iso19115_tmp.positionName = Var.positionName; iso19115_tmp.deliveryPoint = Var.deliveryPoint; iso19115_tmp.city = Var.city; iso19115_tmp.administrativeArea = Var.administrativeArea; iso19115_tmp.postalCode = Var.postalCode; iso19115_tmp.country = Var.country; iso19115_tmp.spatialRepresentationType = "grid"; iso19115_tmp.scaleDenominator = properties.scaleDenominator; iso19115_tmp.topicCategoryCode = properties.topicCategoryCode; iso19115_tmp.west = Var.west; iso19115_tmp.east = Var.east; iso19115_tmp.south = Var.south; iso19115_tmp.north = Var.north; iso19115_tmp.mdMaintenanceFrequencyCode = null; iso19115_tmp.keyword = properties.keyword; iso19115_tmp.keyword2 = null; iso19115_tmp.keyword1_theme = null; iso19115_tmp.keyword2_theme = properties.keyword2; iso19115_tmp.useConstraints = properties.useConstraints; iso19115_tmp.scopeCode = null; iso19115_tmp.lineage = null; iso19115_tmp.srs = Var.srs; iso19115_tmp.columnsDef = null; iso19115_tmp.layerName = null; iso19115_tmp.bands = fromActualFile.bands; iso19115 = iso19115_tmp; // ############################### } // end of Var scope rejectedInnerJoin_tMap_1 = false; tos_count_tMap_1++; /** * [tMap_1 main ] stop */ // Start of branch "iso19115" if (iso19115 != null) { /** * [tNormalize_2 main ] start */ currentComponent = "tNormalize_2"; normalizeRecord_tNormalize_2 = new String[1]; if (iso19115.bands != null) { if ("".equals(iso19115.bands)) { normalizeRecord_tNormalize_2[0] = ""; } else { normalizeRecord_tNormalize_2 = iso19115.bands.split("\\|", -1); } } int lastNoEmptyIndex_tNormalize_2 = normalizeRecord_tNormalize_2.length; for (int i_tNormalize_2 = 0; i_tNormalize_2 < lastNoEmptyIndex_tNormalize_2; i_tNormalize_2++) { if (normalizeRecord_tNormalize_2[i_tNormalize_2] != null) { normalizeRecord_tNormalize_2[i_tNormalize_2] = normalizeRecord_tNormalize_2[i_tNormalize_2] .trim(); } currentRecord_tNormalize_2 = new StringBuilder(); nb_line_tNormalize_2++; row2.mdIdentifier = iso19115.mdIdentifier; row2.mdLanguage = iso19115.mdLanguage; row2.mdCharacterSetCode = iso19115.mdCharacterSetCode; row2.ciRoleCode = iso19115.ciRoleCode; row2.mdOrganisation = iso19115.mdOrganisation; row2.mdVoice = iso19115.mdVoice; row2.mdIndividualName = iso19115.mdIndividualName; row2.mdPositionName = iso19115.mdPositionName; row2.mdDeliveryPoint = iso19115.mdDeliveryPoint; row2.mdCity = iso19115.mdCity; row2.mdAdministrativeArea = iso19115.mdAdministrativeArea; row2.mdPostalCode = iso19115.mdPostalCode; row2.mdCountry = iso19115.mdCountry; row2.mdEmail = iso19115.mdEmail; row2.mdDate = iso19115.mdDate; row2.title = iso19115.title; row2.organisationName = iso19115.organisationName; row2.voice = iso19115.voice; row2.email = iso19115.email; row2.individualName = iso19115.individualName; row2.positionName = iso19115.positionName; row2.deliveryPoint = iso19115.deliveryPoint; row2.city = iso19115.city; row2.administrativeArea = iso19115.administrativeArea; row2.postalCode = iso19115.postalCode; row2.country = iso19115.country; row2.spatialRepresentationType = iso19115.spatialRepresentationType; row2.scaleDenominator = iso19115.scaleDenominator; row2.topicCategoryCode = iso19115.topicCategoryCode; row2.west = iso19115.west; row2.east = iso19115.east; row2.south = iso19115.south; row2.north = iso19115.north; row2.mdMaintenanceFrequencyCode = iso19115.mdMaintenanceFrequencyCode; row2.keyword = iso19115.keyword; row2.keyword2 = iso19115.keyword2; row2.keyword1_theme = iso19115.keyword1_theme; row2.keyword2_theme = iso19115.keyword2_theme; row2.useConstraints = iso19115.useConstraints; row2.scopeCode = iso19115.scopeCode; row2.lineage = iso19115.lineage; row2.srs = iso19115.srs; row2.columnsDef = iso19115.columnsDef; row2.layerName = iso19115.layerName; row2.bands = normalizeRecord_tNormalize_2[i_tNormalize_2]; tos_count_tNormalize_2++; /** * [tNormalize_2 main ] stop */ /** * [tExtractDelimitedFields_1 main ] start */ currentComponent = "tExtractDelimitedFields_1"; row1 = null; row1 = new row1Struct(); String field_tExtractDelimitedFields_1 = row2.bands; String[] newFields_tExtractDelimitedFields_1 = new String[0]; if (field_tExtractDelimitedFields_1 != null) {// C_01 try { newFields_tExtractDelimitedFields_1 = field_tExtractDelimitedFields_1 .split(",", -1); int length_tExtractDelimitedFields_1 = newFields_tExtractDelimitedFields_1.length; for (int i_tExtractDelimitedFields_1 = 0; i_tExtractDelimitedFields_1 < length_tExtractDelimitedFields_1; i_tExtractDelimitedFields_1++) { newFields_tExtractDelimitedFields_1[i_tExtractDelimitedFields_1] = newFields_tExtractDelimitedFields_1[i_tExtractDelimitedFields_1] .trim(); } row1.mdIdentifier = row2.mdIdentifier; row1.mdLanguage = row2.mdLanguage; row1.mdCharacterSetCode = row2.mdCharacterSetCode; row1.ciRoleCode = row2.ciRoleCode; row1.mdOrganisation = row2.mdOrganisation; row1.mdVoice = row2.mdVoice; row1.mdIndividualName = row2.mdIndividualName; row1.mdPositionName = row2.mdPositionName; row1.mdDeliveryPoint = row2.mdDeliveryPoint; row1.mdCity = row2.mdCity; row1.mdAdministrativeArea = row2.mdAdministrativeArea; row1.mdPostalCode = row2.mdPostalCode; row1.mdCountry = row2.mdCountry; row1.mdEmail = row2.mdEmail; row1.mdDate = row2.mdDate; row1.title = row2.title; row1.organisationName = row2.organisationName; row1.voice = row2.voice; row1.email = row2.email; row1.individualName = row2.individualName; row1.positionName = row2.positionName; row1.deliveryPoint = row2.deliveryPoint; row1.city = row2.city; row1.administrativeArea = row2.administrativeArea; row1.postalCode = row2.postalCode; row1.country = row2.country; row1.spatialRepresentationType = row2.spatialRepresentationType; row1.scaleDenominator = row2.scaleDenominator; row1.topicCategoryCode = row2.topicCategoryCode; row1.west = row2.west; row1.east = row2.east; row1.south = row2.south; row1.north = row2.north; row1.mdMaintenanceFrequencyCode = row2.mdMaintenanceFrequencyCode; row1.keyword = row2.keyword; row1.keyword2 = row2.keyword2; row1.keyword1_theme = row2.keyword1_theme; row1.keyword2_theme = row2.keyword2_theme; row1.useConstraints = row2.useConstraints; row1.scopeCode = row2.scopeCode; row1.lineage = row2.lineage; row1.srs = row2.srs; row1.columnsDef = row2.columnsDef; row1.layerName = row2.layerName; row1.bands = row2.bands; String temp_tExtractDelimitedFields_1 = null; row1.bandName = 0 >= length_tExtractDelimitedFields_1 ? "" : newFields_tExtractDelimitedFields_1[0]; row1.bandColorInterpret = 1 >= length_tExtractDelimitedFields_1 ? "" : newFields_tExtractDelimitedFields_1[1]; nb_line_tExtractDelimitedFields_1++; } catch (java.lang.Exception ex_tExtractDelimitedFields_1) { System.err.println(ex_tExtractDelimitedFields_1.getMessage()); row1 = null; } tos_count_tExtractDelimitedFields_1++; /** * [tExtractDelimitedFields_1 main ] stop */ // Start of branch "row1" if (row1 != null) { /** * [tLogRow_2 main ] start */ currentComponent = "tLogRow_2"; row3 = row1; tos_count_tLogRow_2++; /** * [tLogRow_2 main ] stop */ /** * [tAdvancedFileOutputXML_2 main ] * start */ currentComponent = "tAdvancedFileOutputXML_2"; nb_line_tAFOX_2++; valueMap_tAFOX_2.clear(); valueMap_tAFOX_2.put("mdIdentifier", (row1.mdIdentifier != null ? row1.mdIdentifier.toString() : null)); valueMap_tAFOX_2.put("mdLanguage", (row1.mdLanguage != null ? row1.mdLanguage.toString() : "eng")); valueMap_tAFOX_2.put("mdCharacterSetCode", (row1.mdCharacterSetCode != null ? row1.mdCharacterSetCode.toString() : "utf-8")); valueMap_tAFOX_2.put("ciRoleCode", (row1.ciRoleCode != null ? row1.ciRoleCode.toString() : "pointOfContact")); valueMap_tAFOX_2.put("mdOrganisation", (row1.mdOrganisation != null ? row1.mdOrganisation.toString() : null)); valueMap_tAFOX_2.put("mdVoice", (row1.mdVoice != null ? row1.mdVoice.toString() : null)); valueMap_tAFOX_2.put("mdIndividualName", (row1.mdIndividualName != null ? row1.mdIndividualName.toString() : null)); valueMap_tAFOX_2.put("mdPositionName", (row1.mdPositionName != null ? row1.mdPositionName.toString() : null)); valueMap_tAFOX_2.put("mdDeliveryPoint", (row1.mdDeliveryPoint != null ? row1.mdDeliveryPoint.toString() : null)); valueMap_tAFOX_2.put("mdCity", (row1.mdCity != null ? row1.mdCity.toString() : null)); valueMap_tAFOX_2.put("mdAdministrativeArea", (row1.mdAdministrativeArea != null ? row1.mdAdministrativeArea.toString() : null)); valueMap_tAFOX_2.put("mdPostalCode", (row1.mdPostalCode != null ? row1.mdPostalCode.toString() : null)); valueMap_tAFOX_2.put("mdCountry", (row1.mdCountry != null ? row1.mdCountry.toString() : null)); valueMap_tAFOX_2.put("mdEmail", (row1.mdEmail != null ? row1.mdEmail.toString() : null)); valueMap_tAFOX_2.put("mdDate", (row1.mdDate != null ? row1.mdDate.toString() : null)); valueMap_tAFOX_2.put("title", (row1.title != null ? row1.title.toString() : null)); valueMap_tAFOX_2.put("organisationName", (row1.organisationName != null ? row1.organisationName.toString() : null)); valueMap_tAFOX_2.put("voice", (row1.voice != null ? row1.voice.toString() : null)); valueMap_tAFOX_2.put("email", (row1.email != null ? row1.email.toString() : null)); valueMap_tAFOX_2.put("individualName", (row1.individualName != null ? row1.individualName.toString() : null)); valueMap_tAFOX_2.put("positionName", (row1.positionName != null ? row1.positionName.toString() : null)); valueMap_tAFOX_2.put("deliveryPoint", (row1.deliveryPoint != null ? row1.deliveryPoint.toString() : null)); valueMap_tAFOX_2.put("city", (row1.city != null ? row1.city.toString() : null)); valueMap_tAFOX_2.put("administrativeArea", (row1.administrativeArea != null ? row1.administrativeArea.toString() : null)); valueMap_tAFOX_2.put("postalCode", (row1.postalCode != null ? row1.postalCode.toString() : null)); valueMap_tAFOX_2.put("country", (row1.country != null ? row1.country.toString() : null)); valueMap_tAFOX_2.put("spatialRepresentationType", (row1.spatialRepresentationType != null ? row1.spatialRepresentationType.toString() : "vector")); valueMap_tAFOX_2.put("scaleDenominator", (row1.scaleDenominator != null ? row1.scaleDenominator.toString() : null)); valueMap_tAFOX_2.put("topicCategoryCode", (row1.topicCategoryCode != null ? row1.topicCategoryCode.toString() : null)); valueMap_tAFOX_2.put("west", (row1.west != null ? row1.west.toString() : null)); valueMap_tAFOX_2.put("east", (row1.east != null ? row1.east.toString() : null)); valueMap_tAFOX_2.put("south", (row1.south != null ? row1.south.toString() : null)); valueMap_tAFOX_2.put("north", (row1.north != null ? row1.north.toString() : null)); valueMap_tAFOX_2.put("mdMaintenanceFrequencyCode", (row1.mdMaintenanceFrequencyCode != null ? row1.mdMaintenanceFrequencyCode.toString() : "asNeeded")); valueMap_tAFOX_2.put("keyword", (row1.keyword != null ? row1.keyword.toString() : null)); valueMap_tAFOX_2.put("keyword2", (row1.keyword2 != null ? row1.keyword2.toString() : null)); valueMap_tAFOX_2.put("keyword1_theme", (row1.keyword1_theme != null ? row1.keyword1_theme.toString() : "theme")); valueMap_tAFOX_2.put("keyword2_theme", (row1.keyword2_theme != null ? row1.keyword2_theme.toString() : "place")); valueMap_tAFOX_2.put("useConstraints", (row1.useConstraints != null ? row1.useConstraints.toString() : null)); valueMap_tAFOX_2.put("scopeCode", (row1.scopeCode != null ? row1.scopeCode.toString() : "dataset")); valueMap_tAFOX_2.put("lineage", (row1.lineage != null ? row1.lineage.toString() : null)); valueMap_tAFOX_2.put("srs", (row1.srs != null ? row1.srs.toString() : "WGS 1984")); valueMap_tAFOX_2.put("columnsDef", (row1.columnsDef != null ? row1.columnsDef.toString() : null)); valueMap_tAFOX_2.put("layerName", (row1.layerName != null ? row1.layerName.toString() : null)); valueMap_tAFOX_2.put("bands", (row1.bands != null ? row1.bands.toString() : null)); valueMap_tAFOX_2.put("bandName", (row1.bandName != null ? row1.bandName.toString() : null)); valueMap_tAFOX_2.put("bandColorInterpret", (row1.bandColorInterpret != null ? row1.bandColorInterpret.toString() : null)); org.dom4j.Element subTreeRootParent_tAFOX_2 = null; // build root xml tree if (needRoot_tAFOX_2) { needRoot_tAFOX_2 = false; if (orders_tAFOX_2.length > 0) { orders_tAFOX_2[0] = 0; } org.dom4j.Element root_tAFOX_2 = doc_tAFOX_2 .addElement("mdb:MD_Metadata"); root_tAFOX_2.addNamespace("xsi", TalendString.replaceSpecialCharForXML( "http://www.w3.org/2001/XMLSchema-instance")); root_tAFOX_2.addNamespace("cit", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19115/-3/cit/1.0")); root_tAFOX_2.addNamespace("dqm", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19157/-2/dqm/1.0")); root_tAFOX_2.addNamespace("gco", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19115/-3/gco/1.0")); root_tAFOX_2.addNamespace("gcx", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19115/-3/gcx/1.0")); root_tAFOX_2.addNamespace("gex", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19115/-3/gex/1.0")); root_tAFOX_2.addNamespace("gml", TalendString .replaceSpecialCharForXML("http://www.opengis.net/gml/3.2")); root_tAFOX_2.addNamespace("lan", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19115/-3/lan/1.0")); root_tAFOX_2.addNamespace("mcc", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19115/-3/mcc/1.0")); root_tAFOX_2.addNamespace("mco", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19115/-3/mco/1.0")); root_tAFOX_2.addNamespace("mdb", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19115/-3/mdb/1.0")); root_tAFOX_2.addNamespace("mmi", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19115/-3/mmi/1.0")); root_tAFOX_2.addNamespace("mrd", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19115/-3/mrd/1.0")); root_tAFOX_2.addNamespace("mri", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19115/-3/mri/1.0")); root_tAFOX_2.addNamespace("mrl", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19115/-3/mrl/1.0")); root_tAFOX_2.addNamespace("mrs", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19115/-3/mrs/1.0")); root_tAFOX_2.addNamespace("msr", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19115/-3/msr/1.0")); root_tAFOX_2.addNamespace("mrc", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19115/-3/mrc/1.0")); root_tAFOX_2.addNamespace("srv", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19115/-3/srv/2.0")); root_tAFOX_2.setName("mdb:MD_Metadata"); org.dom4j.Element root_0_tAFOX_2; if (root_tAFOX_2.getNamespaceForPrefix("mdb") == null) { root_0_tAFOX_2 = root_tAFOX_2.addElement("metadataIdentifier"); } else { root_0_tAFOX_2 = root_tAFOX_2.addElement("mdb:metadataIdentifier"); } root_0_tAFOX_2.setName("mdb:metadataIdentifier"); org.dom4j.Element root_0_0_tAFOX_2; if (root_0_tAFOX_2.getNamespaceForPrefix("mcc") == null) { root_0_0_tAFOX_2 = root_0_tAFOX_2.addElement("MD_Identifier"); } else { root_0_0_tAFOX_2 = root_0_tAFOX_2.addElement("mcc:MD_Identifier"); } root_0_0_tAFOX_2.setName("mcc:MD_Identifier"); org.dom4j.Element root_0_0_0_tAFOX_2; if (root_0_0_tAFOX_2.getNamespaceForPrefix("mcc") == null) { root_0_0_0_tAFOX_2 = root_0_0_tAFOX_2.addElement("code"); } else { root_0_0_0_tAFOX_2 = root_0_0_tAFOX_2.addElement("mcc:code"); } root_0_0_0_tAFOX_2.setName("mcc:code"); org.dom4j.Element root_0_0_0_0_tAFOX_2; if (root_0_0_0_tAFOX_2.getNamespaceForPrefix("gco") == null) { root_0_0_0_0_tAFOX_2 = root_0_0_0_tAFOX_2 .addElement("CharacterString"); } else { root_0_0_0_0_tAFOX_2 = root_0_0_0_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("mdIdentifier") != null) { nestXMLTool_tAFOX_2.setText(root_0_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("mdIdentifier")); } root_0_0_0_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_0_0_1_tAFOX_2; if (root_0_0_tAFOX_2.getNamespaceForPrefix("mcc") == null) { root_0_0_1_tAFOX_2 = root_0_0_tAFOX_2.addElement("codeSpace"); } else { root_0_0_1_tAFOX_2 = root_0_0_tAFOX_2.addElement("mcc:codeSpace"); } root_0_0_1_tAFOX_2.setName("mcc:codeSpace"); org.dom4j.Element root_0_0_1_0_tAFOX_2; if (root_0_0_1_tAFOX_2.getNamespaceForPrefix("gco") == null) { root_0_0_1_0_tAFOX_2 = root_0_0_1_tAFOX_2 .addElement("CharacterString"); } else { root_0_0_1_0_tAFOX_2 = root_0_0_1_tAFOX_2 .addElement("gco:CharacterString"); } nestXMLTool_tAFOX_2.parseAndAdd(root_0_0_1_0_tAFOX_2, "urn:uuid"); root_0_0_1_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_1_tAFOX_2; if (root_tAFOX_2.getNamespaceForPrefix("mdb") == null) { root_1_tAFOX_2 = root_tAFOX_2.addElement("defaultLocale"); } else { root_1_tAFOX_2 = root_tAFOX_2.addElement("mdb:defaultLocale"); } root_1_tAFOX_2.setName("mdb:defaultLocale"); org.dom4j.Element root_1_0_tAFOX_2; if (root_1_tAFOX_2.getNamespaceForPrefix("lan") == null) { root_1_0_tAFOX_2 = root_1_tAFOX_2.addElement("PT_Locale"); } else { root_1_0_tAFOX_2 = root_1_tAFOX_2.addElement("lan:PT_Locale"); } root_1_0_tAFOX_2.setName("lan:PT_Locale"); org.dom4j.Element root_1_0_0_tAFOX_2; if (root_1_0_tAFOX_2.getNamespaceForPrefix("lan") == null) { root_1_0_0_tAFOX_2 = root_1_0_tAFOX_2.addElement("language"); } else { root_1_0_0_tAFOX_2 = root_1_0_tAFOX_2.addElement("lan:language"); } root_1_0_0_tAFOX_2.setName("lan:language"); org.dom4j.Element root_1_0_0_0_tAFOX_2; if (root_1_0_0_tAFOX_2.getNamespaceForPrefix("lan") == null) { root_1_0_0_0_tAFOX_2 = root_1_0_0_tAFOX_2 .addElement("LanguageCode"); } else { root_1_0_0_0_tAFOX_2 = root_1_0_0_tAFOX_2 .addElement("lan:LanguageCode"); } root_1_0_0_0_tAFOX_2.addAttribute("codeList", "http://www.loc.gov/standards/iso639-2/"); if (valueMap_tAFOX_2.get("mdLanguage") != null) { root_1_0_0_0_tAFOX_2.addAttribute("codeListValue", valueMap_tAFOX_2.get("mdLanguage")); } root_1_0_0_0_tAFOX_2.setName("lan:LanguageCode"); org.dom4j.Element root_1_0_1_tAFOX_2; if (root_1_0_tAFOX_2.getNamespaceForPrefix("lan") == null) { root_1_0_1_tAFOX_2 = root_1_0_tAFOX_2 .addElement("characterEncoding"); } else { root_1_0_1_tAFOX_2 = root_1_0_tAFOX_2 .addElement("lan:characterEncoding"); } root_1_0_1_tAFOX_2.setName("lan:characterEncoding"); org.dom4j.Element root_1_0_1_0_tAFOX_2; if (root_1_0_1_tAFOX_2.getNamespaceForPrefix("lan") == null) { root_1_0_1_0_tAFOX_2 = root_1_0_1_tAFOX_2 .addElement("MD_CharacterSetCode"); } else { root_1_0_1_0_tAFOX_2 = root_1_0_1_tAFOX_2 .addElement("lan:MD_CharacterSetCode"); } root_1_0_1_0_tAFOX_2.addAttribute("codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#MD_CharacterSetCode"); if (valueMap_tAFOX_2.get("mdCharacterSetCode") != null) { root_1_0_1_0_tAFOX_2.addAttribute("codeListValue", valueMap_tAFOX_2.get("mdCharacterSetCode")); } root_1_0_1_0_tAFOX_2.setName("lan:MD_CharacterSetCode"); org.dom4j.Element root_2_tAFOX_2; if (root_tAFOX_2.getNamespaceForPrefix("mdb") == null) { root_2_tAFOX_2 = root_tAFOX_2.addElement("contact"); } else { root_2_tAFOX_2 = root_tAFOX_2.addElement("mdb:contact"); } root_2_tAFOX_2.setName("mdb:contact"); org.dom4j.Element root_2_0_tAFOX_2; if (root_2_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_2_0_tAFOX_2 = root_2_tAFOX_2.addElement("CI_Responsibility"); } else { root_2_0_tAFOX_2 = root_2_tAFOX_2 .addElement("cit:CI_Responsibility"); } root_2_0_tAFOX_2.setName("cit:CI_Responsibility"); org.dom4j.Element root_2_0_0_tAFOX_2; if (root_2_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_2_0_0_tAFOX_2 = root_2_0_tAFOX_2.addElement("role"); } else { root_2_0_0_tAFOX_2 = root_2_0_tAFOX_2.addElement("cit:role"); } root_2_0_0_tAFOX_2.setName("cit:role"); org.dom4j.Element root_2_0_0_0_tAFOX_2; if (root_2_0_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_2_0_0_0_tAFOX_2 = root_2_0_0_tAFOX_2.addElement("CI_RoleCode"); } else { root_2_0_0_0_tAFOX_2 = root_2_0_0_tAFOX_2 .addElement("cit:CI_RoleCode"); } root_2_0_0_0_tAFOX_2.addAttribute("codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#CI_RoleCode"); if (valueMap_tAFOX_2.get("ciRoleCode") != null) { root_2_0_0_0_tAFOX_2.addAttribute("codeListValue", valueMap_tAFOX_2.get("ciRoleCode")); } root_2_0_0_0_tAFOX_2.setName("cit:CI_RoleCode"); org.dom4j.Element root_2_0_1_tAFOX_2; if (root_2_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_2_0_1_tAFOX_2 = root_2_0_tAFOX_2.addElement("party"); } else { root_2_0_1_tAFOX_2 = root_2_0_tAFOX_2.addElement("cit:party"); } root_2_0_1_tAFOX_2.setName("cit:party"); org.dom4j.Element root_2_0_1_0_tAFOX_2; if (root_2_0_1_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_2_0_1_0_tAFOX_2 = root_2_0_1_tAFOX_2 .addElement("CI_Organisation"); } else { root_2_0_1_0_tAFOX_2 = root_2_0_1_tAFOX_2 .addElement("cit:CI_Organisation"); } root_2_0_1_0_tAFOX_2.setName("cit:CI_Organisation"); org.dom4j.Element root_2_0_1_0_0_tAFOX_2; if (root_2_0_1_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_2_0_1_0_0_tAFOX_2 = root_2_0_1_0_tAFOX_2.addElement("name"); } else { root_2_0_1_0_0_tAFOX_2 = root_2_0_1_0_tAFOX_2 .addElement("cit:name"); } root_2_0_1_0_0_tAFOX_2.setName("cit:name"); org.dom4j.Element root_2_0_1_0_0_0_tAFOX_2; if (root_2_0_1_0_0_tAFOX_2.getNamespaceForPrefix("gco") == null) { root_2_0_1_0_0_0_tAFOX_2 = root_2_0_1_0_0_tAFOX_2 .addElement("CharacterString"); } else { root_2_0_1_0_0_0_tAFOX_2 = root_2_0_1_0_0_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("mdOrganisation") != null) { nestXMLTool_tAFOX_2.setText(root_2_0_1_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("mdOrganisation")); } root_2_0_1_0_0_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_2_0_1_0_1_tAFOX_2; if (root_2_0_1_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_2_0_1_0_1_tAFOX_2 = root_2_0_1_0_tAFOX_2 .addElement("contactInfo"); } else { root_2_0_1_0_1_tAFOX_2 = root_2_0_1_0_tAFOX_2 .addElement("cit:contactInfo"); } root_2_0_1_0_1_tAFOX_2.setName("cit:contactInfo"); org.dom4j.Element root_2_0_1_0_1_0_tAFOX_2; if (root_2_0_1_0_1_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_2_0_1_0_1_0_tAFOX_2 = root_2_0_1_0_1_tAFOX_2 .addElement("CI_Contact"); } else { root_2_0_1_0_1_0_tAFOX_2 = root_2_0_1_0_1_tAFOX_2 .addElement("cit:CI_Contact"); } root_2_0_1_0_1_0_tAFOX_2.setName("cit:CI_Contact"); org.dom4j.Element root_2_0_1_0_1_0_0_tAFOX_2; if (root_2_0_1_0_1_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_2_0_1_0_1_0_0_tAFOX_2 = root_2_0_1_0_1_0_tAFOX_2 .addElement("phone"); } else { root_2_0_1_0_1_0_0_tAFOX_2 = root_2_0_1_0_1_0_tAFOX_2 .addElement("cit:phone"); } root_2_0_1_0_1_0_0_tAFOX_2.setName("cit:phone"); org.dom4j.Element root_2_0_1_0_1_0_0_0_tAFOX_2; if (root_2_0_1_0_1_0_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_2_0_1_0_1_0_0_0_tAFOX_2 = root_2_0_1_0_1_0_0_tAFOX_2 .addElement("CI_Telephone"); } else { root_2_0_1_0_1_0_0_0_tAFOX_2 = root_2_0_1_0_1_0_0_tAFOX_2 .addElement("cit:CI_Telephone"); } root_2_0_1_0_1_0_0_0_tAFOX_2.setName("cit:CI_Telephone"); org.dom4j.Element root_2_0_1_0_1_0_0_0_0_tAFOX_2; if (root_2_0_1_0_1_0_0_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_2_0_1_0_1_0_0_0_0_tAFOX_2 = root_2_0_1_0_1_0_0_0_tAFOX_2 .addElement("number"); } else { root_2_0_1_0_1_0_0_0_0_tAFOX_2 = root_2_0_1_0_1_0_0_0_tAFOX_2 .addElement("cit:number"); } root_2_0_1_0_1_0_0_0_0_tAFOX_2.setName("cit:number"); org.dom4j.Element root_2_0_1_0_1_0_0_0_0_0_tAFOX_2; if (root_2_0_1_0_1_0_0_0_0_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_2_0_1_0_1_0_0_0_0_0_tAFOX_2 = root_2_0_1_0_1_0_0_0_0_tAFOX_2 .addElement("CharacterString"); } else { root_2_0_1_0_1_0_0_0_0_0_tAFOX_2 = root_2_0_1_0_1_0_0_0_0_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("mdVoice") != null) { nestXMLTool_tAFOX_2.setText(root_2_0_1_0_1_0_0_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("mdVoice")); } root_2_0_1_0_1_0_0_0_0_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_2_0_1_0_1_0_0_0_1_tAFOX_2; if (root_2_0_1_0_1_0_0_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_2_0_1_0_1_0_0_0_1_tAFOX_2 = root_2_0_1_0_1_0_0_0_tAFOX_2 .addElement("numberType"); } else { root_2_0_1_0_1_0_0_0_1_tAFOX_2 = root_2_0_1_0_1_0_0_0_tAFOX_2 .addElement("cit:numberType"); } root_2_0_1_0_1_0_0_0_1_tAFOX_2.setName("cit:numberType"); org.dom4j.Element root_2_0_1_0_1_0_0_0_1_0_tAFOX_2; if (root_2_0_1_0_1_0_0_0_1_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_2_0_1_0_1_0_0_0_1_0_tAFOX_2 = root_2_0_1_0_1_0_0_0_1_tAFOX_2 .addElement("CI_TelephoneTypeCode"); } else { root_2_0_1_0_1_0_0_0_1_0_tAFOX_2 = root_2_0_1_0_1_0_0_0_1_tAFOX_2 .addElement("cit:CI_TelephoneTypeCode"); } root_2_0_1_0_1_0_0_0_1_0_tAFOX_2.addAttribute("codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/ML_gmxCodelists.xml#CI_TelephoneTypeCode"); root_2_0_1_0_1_0_0_0_1_0_tAFOX_2.addAttribute("codeListValue", "voice"); root_2_0_1_0_1_0_0_0_1_0_tAFOX_2.setName("cit:CI_TelephoneTypeCode"); org.dom4j.Element root_2_0_1_0_1_0_1_tAFOX_2; if (root_2_0_1_0_1_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_2_0_1_0_1_0_1_tAFOX_2 = root_2_0_1_0_1_0_tAFOX_2 .addElement("address"); } else { root_2_0_1_0_1_0_1_tAFOX_2 = root_2_0_1_0_1_0_tAFOX_2 .addElement("cit:address"); } root_2_0_1_0_1_0_1_tAFOX_2.setName("cit:address"); org.dom4j.Element root_2_0_1_0_1_0_1_0_tAFOX_2; if (root_2_0_1_0_1_0_1_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_2_0_1_0_1_0_1_0_tAFOX_2 = root_2_0_1_0_1_0_1_tAFOX_2 .addElement("CI_Address"); } else { root_2_0_1_0_1_0_1_0_tAFOX_2 = root_2_0_1_0_1_0_1_tAFOX_2 .addElement("cit:CI_Address"); } root_2_0_1_0_1_0_1_0_tAFOX_2.setName("cit:CI_Address"); org.dom4j.Element root_2_0_1_0_1_0_1_0_0_tAFOX_2; if (root_2_0_1_0_1_0_1_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_2_0_1_0_1_0_1_0_0_tAFOX_2 = root_2_0_1_0_1_0_1_0_tAFOX_2 .addElement("deliveryPoint"); } else { root_2_0_1_0_1_0_1_0_0_tAFOX_2 = root_2_0_1_0_1_0_1_0_tAFOX_2 .addElement("cit:deliveryPoint"); } root_2_0_1_0_1_0_1_0_0_tAFOX_2.setName("cit:deliveryPoint"); org.dom4j.Element root_2_0_1_0_1_0_1_0_0_0_tAFOX_2; if (root_2_0_1_0_1_0_1_0_0_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_2_0_1_0_1_0_1_0_0_0_tAFOX_2 = root_2_0_1_0_1_0_1_0_0_tAFOX_2 .addElement("CharacterString"); } else { root_2_0_1_0_1_0_1_0_0_0_tAFOX_2 = root_2_0_1_0_1_0_1_0_0_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("mdDeliveryPoint") != null) { nestXMLTool_tAFOX_2.setText(root_2_0_1_0_1_0_1_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("mdDeliveryPoint")); } root_2_0_1_0_1_0_1_0_0_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_2_0_1_0_1_0_1_0_1_tAFOX_2; if (root_2_0_1_0_1_0_1_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_2_0_1_0_1_0_1_0_1_tAFOX_2 = root_2_0_1_0_1_0_1_0_tAFOX_2 .addElement("city"); } else { root_2_0_1_0_1_0_1_0_1_tAFOX_2 = root_2_0_1_0_1_0_1_0_tAFOX_2 .addElement("cit:city"); } root_2_0_1_0_1_0_1_0_1_tAFOX_2.setName("cit:city"); org.dom4j.Element root_2_0_1_0_1_0_1_0_1_0_tAFOX_2; if (root_2_0_1_0_1_0_1_0_1_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_2_0_1_0_1_0_1_0_1_0_tAFOX_2 = root_2_0_1_0_1_0_1_0_1_tAFOX_2 .addElement("CharacterString"); } else { root_2_0_1_0_1_0_1_0_1_0_tAFOX_2 = root_2_0_1_0_1_0_1_0_1_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("mdCity") != null) { nestXMLTool_tAFOX_2.setText(root_2_0_1_0_1_0_1_0_1_0_tAFOX_2, valueMap_tAFOX_2.get("mdCity")); } root_2_0_1_0_1_0_1_0_1_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_2_0_1_0_1_0_1_0_2_tAFOX_2; if (root_2_0_1_0_1_0_1_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_2_0_1_0_1_0_1_0_2_tAFOX_2 = root_2_0_1_0_1_0_1_0_tAFOX_2 .addElement("administrativeArea"); } else { root_2_0_1_0_1_0_1_0_2_tAFOX_2 = root_2_0_1_0_1_0_1_0_tAFOX_2 .addElement("cit:administrativeArea"); } root_2_0_1_0_1_0_1_0_2_tAFOX_2.setName("cit:administrativeArea"); org.dom4j.Element root_2_0_1_0_1_0_1_0_2_0_tAFOX_2; if (root_2_0_1_0_1_0_1_0_2_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_2_0_1_0_1_0_1_0_2_0_tAFOX_2 = root_2_0_1_0_1_0_1_0_2_tAFOX_2 .addElement("CharacterString"); } else { root_2_0_1_0_1_0_1_0_2_0_tAFOX_2 = root_2_0_1_0_1_0_1_0_2_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("mdAdministrativeArea") != null) { nestXMLTool_tAFOX_2.setText(root_2_0_1_0_1_0_1_0_2_0_tAFOX_2, valueMap_tAFOX_2.get("mdAdministrativeArea")); } root_2_0_1_0_1_0_1_0_2_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_2_0_1_0_1_0_1_0_3_tAFOX_2; if (root_2_0_1_0_1_0_1_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_2_0_1_0_1_0_1_0_3_tAFOX_2 = root_2_0_1_0_1_0_1_0_tAFOX_2 .addElement("postalCode"); } else { root_2_0_1_0_1_0_1_0_3_tAFOX_2 = root_2_0_1_0_1_0_1_0_tAFOX_2 .addElement("cit:postalCode"); } root_2_0_1_0_1_0_1_0_3_tAFOX_2.setName("cit:postalCode"); org.dom4j.Element root_2_0_1_0_1_0_1_0_3_0_tAFOX_2; if (root_2_0_1_0_1_0_1_0_3_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_2_0_1_0_1_0_1_0_3_0_tAFOX_2 = root_2_0_1_0_1_0_1_0_3_tAFOX_2 .addElement("CharacterString"); } else { root_2_0_1_0_1_0_1_0_3_0_tAFOX_2 = root_2_0_1_0_1_0_1_0_3_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("mdPostalCode") != null) { nestXMLTool_tAFOX_2.setText(root_2_0_1_0_1_0_1_0_3_0_tAFOX_2, valueMap_tAFOX_2.get("mdPostalCode")); } root_2_0_1_0_1_0_1_0_3_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_2_0_1_0_1_0_1_0_4_tAFOX_2; if (root_2_0_1_0_1_0_1_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_2_0_1_0_1_0_1_0_4_tAFOX_2 = root_2_0_1_0_1_0_1_0_tAFOX_2 .addElement("country"); } else { root_2_0_1_0_1_0_1_0_4_tAFOX_2 = root_2_0_1_0_1_0_1_0_tAFOX_2 .addElement("cit:country"); } root_2_0_1_0_1_0_1_0_4_tAFOX_2.setName("cit:country"); org.dom4j.Element root_2_0_1_0_1_0_1_0_4_0_tAFOX_2; if (root_2_0_1_0_1_0_1_0_4_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_2_0_1_0_1_0_1_0_4_0_tAFOX_2 = root_2_0_1_0_1_0_1_0_4_tAFOX_2 .addElement("CharacterString"); } else { root_2_0_1_0_1_0_1_0_4_0_tAFOX_2 = root_2_0_1_0_1_0_1_0_4_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("mdCountry") != null) { nestXMLTool_tAFOX_2.setText(root_2_0_1_0_1_0_1_0_4_0_tAFOX_2, valueMap_tAFOX_2.get("mdCountry")); } root_2_0_1_0_1_0_1_0_4_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_2_0_1_0_1_0_1_0_5_tAFOX_2; if (root_2_0_1_0_1_0_1_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_2_0_1_0_1_0_1_0_5_tAFOX_2 = root_2_0_1_0_1_0_1_0_tAFOX_2 .addElement("electronicMailAddress"); } else { root_2_0_1_0_1_0_1_0_5_tAFOX_2 = root_2_0_1_0_1_0_1_0_tAFOX_2 .addElement("cit:electronicMailAddress"); } root_2_0_1_0_1_0_1_0_5_tAFOX_2.setName("cit:electronicMailAddress"); org.dom4j.Element root_2_0_1_0_1_0_1_0_5_0_tAFOX_2; if (root_2_0_1_0_1_0_1_0_5_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_2_0_1_0_1_0_1_0_5_0_tAFOX_2 = root_2_0_1_0_1_0_1_0_5_tAFOX_2 .addElement("CharacterString"); } else { root_2_0_1_0_1_0_1_0_5_0_tAFOX_2 = root_2_0_1_0_1_0_1_0_5_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("mdEmail") != null) { nestXMLTool_tAFOX_2.setText(root_2_0_1_0_1_0_1_0_5_0_tAFOX_2, valueMap_tAFOX_2.get("mdEmail")); } root_2_0_1_0_1_0_1_0_5_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_2_0_1_0_2_tAFOX_2; if (root_2_0_1_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_2_0_1_0_2_tAFOX_2 = root_2_0_1_0_tAFOX_2 .addElement("individual"); } else { root_2_0_1_0_2_tAFOX_2 = root_2_0_1_0_tAFOX_2 .addElement("cit:individual"); } root_2_0_1_0_2_tAFOX_2.setName("cit:individual"); org.dom4j.Element root_2_0_1_0_2_0_tAFOX_2; if (root_2_0_1_0_2_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_2_0_1_0_2_0_tAFOX_2 = root_2_0_1_0_2_tAFOX_2 .addElement("CI_Individual"); } else { root_2_0_1_0_2_0_tAFOX_2 = root_2_0_1_0_2_tAFOX_2 .addElement("cit:CI_Individual"); } root_2_0_1_0_2_0_tAFOX_2.setName("cit:CI_Individual"); org.dom4j.Element root_2_0_1_0_2_0_0_tAFOX_2; if (root_2_0_1_0_2_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_2_0_1_0_2_0_0_tAFOX_2 = root_2_0_1_0_2_0_tAFOX_2 .addElement("name"); } else { root_2_0_1_0_2_0_0_tAFOX_2 = root_2_0_1_0_2_0_tAFOX_2 .addElement("cit:name"); } root_2_0_1_0_2_0_0_tAFOX_2.setName("cit:name"); org.dom4j.Element root_2_0_1_0_2_0_0_0_tAFOX_2; if (root_2_0_1_0_2_0_0_tAFOX_2.getNamespaceForPrefix("gco") == null) { root_2_0_1_0_2_0_0_0_tAFOX_2 = root_2_0_1_0_2_0_0_tAFOX_2 .addElement("CharacterString"); } else { root_2_0_1_0_2_0_0_0_tAFOX_2 = root_2_0_1_0_2_0_0_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("mdIndividualName") != null) { nestXMLTool_tAFOX_2.setText(root_2_0_1_0_2_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("mdIndividualName")); } root_2_0_1_0_2_0_0_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_2_0_1_0_2_0_1_tAFOX_2; if (root_2_0_1_0_2_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_2_0_1_0_2_0_1_tAFOX_2 = root_2_0_1_0_2_0_tAFOX_2 .addElement("positionName"); } else { root_2_0_1_0_2_0_1_tAFOX_2 = root_2_0_1_0_2_0_tAFOX_2 .addElement("cit:positionName"); } root_2_0_1_0_2_0_1_tAFOX_2.setName("cit:positionName"); org.dom4j.Element root_2_0_1_0_2_0_1_0_tAFOX_2; if (root_2_0_1_0_2_0_1_tAFOX_2.getNamespaceForPrefix("gco") == null) { root_2_0_1_0_2_0_1_0_tAFOX_2 = root_2_0_1_0_2_0_1_tAFOX_2 .addElement("CharacterString"); } else { root_2_0_1_0_2_0_1_0_tAFOX_2 = root_2_0_1_0_2_0_1_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("mdPositionName") != null) { nestXMLTool_tAFOX_2.setText(root_2_0_1_0_2_0_1_0_tAFOX_2, valueMap_tAFOX_2.get("mdPositionName")); } root_2_0_1_0_2_0_1_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_3_tAFOX_2; if (root_tAFOX_2.getNamespaceForPrefix("mdb") == null) { root_3_tAFOX_2 = root_tAFOX_2.addElement("dateInfo"); } else { root_3_tAFOX_2 = root_tAFOX_2.addElement("mdb:dateInfo"); } root_3_tAFOX_2.setName("mdb:dateInfo"); org.dom4j.Element root_3_0_tAFOX_2; if (root_3_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_3_0_tAFOX_2 = root_3_tAFOX_2.addElement("CI_Date"); } else { root_3_0_tAFOX_2 = root_3_tAFOX_2.addElement("cit:CI_Date"); } root_3_0_tAFOX_2.setName("cit:CI_Date"); org.dom4j.Element root_3_0_0_tAFOX_2; if (root_3_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_3_0_0_tAFOX_2 = root_3_0_tAFOX_2.addElement("date"); } else { root_3_0_0_tAFOX_2 = root_3_0_tAFOX_2.addElement("cit:date"); } root_3_0_0_tAFOX_2.setName("cit:date"); org.dom4j.Element root_3_0_0_0_tAFOX_2; if (root_3_0_0_tAFOX_2.getNamespaceForPrefix("gco") == null) { root_3_0_0_0_tAFOX_2 = root_3_0_0_tAFOX_2.addElement("DateTime"); } else { root_3_0_0_0_tAFOX_2 = root_3_0_0_tAFOX_2 .addElement("gco:DateTime"); } if (valueMap_tAFOX_2.get("mdDate") != null) { nestXMLTool_tAFOX_2.setText(root_3_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("mdDate")); } root_3_0_0_0_tAFOX_2.setName("gco:DateTime"); org.dom4j.Element root_3_0_1_tAFOX_2; if (root_3_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_3_0_1_tAFOX_2 = root_3_0_tAFOX_2.addElement("dateType"); } else { root_3_0_1_tAFOX_2 = root_3_0_tAFOX_2.addElement("cit:dateType"); } root_3_0_1_tAFOX_2.setName("cit:dateType"); org.dom4j.Element root_3_0_1_0_tAFOX_2; if (root_3_0_1_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_3_0_1_0_tAFOX_2 = root_3_0_1_tAFOX_2 .addElement("CI_DateTypeCode"); } else { root_3_0_1_0_tAFOX_2 = root_3_0_1_tAFOX_2 .addElement("cit:CI_DateTypeCode"); } root_3_0_1_0_tAFOX_2.addAttribute("codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#CI_DateTypeCode"); root_3_0_1_0_tAFOX_2.addAttribute("codeListValue", "creation"); root_3_0_1_0_tAFOX_2.setName("cit:CI_DateTypeCode"); org.dom4j.Element root_4_tAFOX_2; if (root_tAFOX_2.getNamespaceForPrefix("mdb") == null) { root_4_tAFOX_2 = root_tAFOX_2.addElement("metadataStandard"); } else { root_4_tAFOX_2 = root_tAFOX_2.addElement("mdb:metadataStandard"); } root_4_tAFOX_2.setName("mdb:metadataStandard"); org.dom4j.Element root_4_0_tAFOX_2; if (root_4_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_4_0_tAFOX_2 = root_4_tAFOX_2.addElement("CI_Citation"); } else { root_4_0_tAFOX_2 = root_4_tAFOX_2.addElement("cit:CI_Citation"); } root_4_0_tAFOX_2.setName("cit:CI_Citation"); org.dom4j.Element root_4_0_0_tAFOX_2; if (root_4_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_4_0_0_tAFOX_2 = root_4_0_tAFOX_2.addElement("title"); } else { root_4_0_0_tAFOX_2 = root_4_0_tAFOX_2.addElement("cit:title"); } root_4_0_0_tAFOX_2.setName("cit:title"); org.dom4j.Element root_4_0_0_0_tAFOX_2; if (root_4_0_0_tAFOX_2.getNamespaceForPrefix("gco") == null) { root_4_0_0_0_tAFOX_2 = root_4_0_0_tAFOX_2 .addElement("CharacterString"); } else { root_4_0_0_0_tAFOX_2 = root_4_0_0_tAFOX_2 .addElement("gco:CharacterString"); } nestXMLTool_tAFOX_2.parseAndAdd(root_4_0_0_0_tAFOX_2, "ISO 19115-3"); root_4_0_0_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_5_tAFOX_2; if (root_tAFOX_2.getNamespaceForPrefix("mdb") == null) { root_5_tAFOX_2 = root_tAFOX_2.addElement("referenceSystemInfo"); } else { root_5_tAFOX_2 = root_tAFOX_2.addElement("mdb:referenceSystemInfo"); } root_5_tAFOX_2.setName("mdb:referenceSystemInfo"); org.dom4j.Element root_5_0_tAFOX_2; if (root_5_tAFOX_2.getNamespaceForPrefix("mrs") == null) { root_5_0_tAFOX_2 = root_5_tAFOX_2.addElement("MD_ReferenceSystem"); } else { root_5_0_tAFOX_2 = root_5_tAFOX_2 .addElement("mrs:MD_ReferenceSystem"); } root_5_0_tAFOX_2.setName("mrs:MD_ReferenceSystem"); org.dom4j.Element root_5_0_0_tAFOX_2; if (root_5_0_tAFOX_2.getNamespaceForPrefix("mrs") == null) { root_5_0_0_tAFOX_2 = root_5_0_tAFOX_2 .addElement("referenceSystemIdentifier"); } else { root_5_0_0_tAFOX_2 = root_5_0_tAFOX_2 .addElement("mrs:referenceSystemIdentifier"); } root_5_0_0_tAFOX_2.setName("mrs:referenceSystemIdentifier"); org.dom4j.Element root_5_0_0_0_tAFOX_2; if (root_5_0_0_tAFOX_2.getNamespaceForPrefix("mcc") == null) { root_5_0_0_0_tAFOX_2 = root_5_0_0_tAFOX_2 .addElement("MD_Identifier"); } else { root_5_0_0_0_tAFOX_2 = root_5_0_0_tAFOX_2 .addElement("mcc:MD_Identifier"); } root_5_0_0_0_tAFOX_2.setName("mcc:MD_Identifier"); org.dom4j.Element root_5_0_0_0_0_tAFOX_2; if (root_5_0_0_0_tAFOX_2.getNamespaceForPrefix("mcc") == null) { root_5_0_0_0_0_tAFOX_2 = root_5_0_0_0_tAFOX_2.addElement("code"); } else { root_5_0_0_0_0_tAFOX_2 = root_5_0_0_0_tAFOX_2 .addElement("mcc:code"); } root_5_0_0_0_0_tAFOX_2.setName("mcc:code"); org.dom4j.Element root_5_0_0_0_0_0_tAFOX_2; if (root_5_0_0_0_0_tAFOX_2.getNamespaceForPrefix("gco") == null) { root_5_0_0_0_0_0_tAFOX_2 = root_5_0_0_0_0_tAFOX_2 .addElement("CharacterString"); } else { root_5_0_0_0_0_0_tAFOX_2 = root_5_0_0_0_0_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("srs") != null) { nestXMLTool_tAFOX_2.setText(root_5_0_0_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("srs")); } root_5_0_0_0_0_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_6_tAFOX_2; if (root_tAFOX_2.getNamespaceForPrefix("mdb") == null) { root_6_tAFOX_2 = root_tAFOX_2.addElement("identificationInfo"); } else { root_6_tAFOX_2 = root_tAFOX_2.addElement("mdb:identificationInfo"); } root_6_tAFOX_2.setName("mdb:identificationInfo"); org.dom4j.Element root_6_0_tAFOX_2; if (root_6_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_tAFOX_2 = root_6_tAFOX_2 .addElement("MD_DataIdentification"); } else { root_6_0_tAFOX_2 = root_6_tAFOX_2 .addElement("mri:MD_DataIdentification"); } root_6_0_tAFOX_2.setName("mri:MD_DataIdentification"); org.dom4j.Element root_6_0_0_tAFOX_2; if (root_6_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_0_tAFOX_2 = root_6_0_tAFOX_2.addElement("citation"); } else { root_6_0_0_tAFOX_2 = root_6_0_tAFOX_2.addElement("mri:citation"); } root_6_0_0_tAFOX_2.setName("mri:citation"); org.dom4j.Element root_6_0_0_0_tAFOX_2; if (root_6_0_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_6_0_0_0_tAFOX_2 = root_6_0_0_tAFOX_2.addElement("CI_Citation"); } else { root_6_0_0_0_tAFOX_2 = root_6_0_0_tAFOX_2 .addElement("cit:CI_Citation"); } root_6_0_0_0_tAFOX_2.setName("cit:CI_Citation"); org.dom4j.Element root_6_0_0_0_0_tAFOX_2; if (root_6_0_0_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_6_0_0_0_0_tAFOX_2 = root_6_0_0_0_tAFOX_2.addElement("title"); } else { root_6_0_0_0_0_tAFOX_2 = root_6_0_0_0_tAFOX_2 .addElement("cit:title"); } root_6_0_0_0_0_tAFOX_2.setName("cit:title"); org.dom4j.Element root_6_0_0_0_0_0_tAFOX_2; if (root_6_0_0_0_0_tAFOX_2.getNamespaceForPrefix("gco") == null) { root_6_0_0_0_0_0_tAFOX_2 = root_6_0_0_0_0_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_0_0_0_0_tAFOX_2 = root_6_0_0_0_0_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("title") != null) { nestXMLTool_tAFOX_2.setText(root_6_0_0_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("title")); } root_6_0_0_0_0_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_6_0_0_0_1_tAFOX_2; if (root_6_0_0_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_6_0_0_0_1_tAFOX_2 = root_6_0_0_0_tAFOX_2.addElement("date"); } else { root_6_0_0_0_1_tAFOX_2 = root_6_0_0_0_tAFOX_2 .addElement("cit:date"); } root_6_0_0_0_1_tAFOX_2.setName("cit:date"); org.dom4j.Element root_6_0_0_0_1_0_tAFOX_2; if (root_6_0_0_0_1_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_6_0_0_0_1_0_tAFOX_2 = root_6_0_0_0_1_tAFOX_2 .addElement("CI_Date"); } else { root_6_0_0_0_1_0_tAFOX_2 = root_6_0_0_0_1_tAFOX_2 .addElement("cit:CI_Date"); } root_6_0_0_0_1_0_tAFOX_2.setName("cit:CI_Date"); org.dom4j.Element root_6_0_0_0_1_0_0_tAFOX_2; if (root_6_0_0_0_1_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_6_0_0_0_1_0_0_tAFOX_2 = root_6_0_0_0_1_0_tAFOX_2 .addElement("date"); } else { root_6_0_0_0_1_0_0_tAFOX_2 = root_6_0_0_0_1_0_tAFOX_2 .addElement("cit:date"); } root_6_0_0_0_1_0_0_tAFOX_2.setName("cit:date"); org.dom4j.Element root_6_0_0_0_1_0_0_0_tAFOX_2; if (root_6_0_0_0_1_0_0_tAFOX_2.getNamespaceForPrefix("gco") == null) { root_6_0_0_0_1_0_0_0_tAFOX_2 = root_6_0_0_0_1_0_0_tAFOX_2 .addElement("DateTime"); } else { root_6_0_0_0_1_0_0_0_tAFOX_2 = root_6_0_0_0_1_0_0_tAFOX_2 .addElement("gco:DateTime"); } if (valueMap_tAFOX_2.get("mdDate") != null) { nestXMLTool_tAFOX_2.setText(root_6_0_0_0_1_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("mdDate")); } root_6_0_0_0_1_0_0_0_tAFOX_2.setName("gco:DateTime"); org.dom4j.Element root_6_0_0_0_1_0_1_tAFOX_2; if (root_6_0_0_0_1_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_6_0_0_0_1_0_1_tAFOX_2 = root_6_0_0_0_1_0_tAFOX_2 .addElement("dateType"); } else { root_6_0_0_0_1_0_1_tAFOX_2 = root_6_0_0_0_1_0_tAFOX_2 .addElement("cit:dateType"); } root_6_0_0_0_1_0_1_tAFOX_2.setName("cit:dateType"); org.dom4j.Element root_6_0_0_0_1_0_1_0_tAFOX_2; if (root_6_0_0_0_1_0_1_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_6_0_0_0_1_0_1_0_tAFOX_2 = root_6_0_0_0_1_0_1_tAFOX_2 .addElement("CI_DateTypeCode"); } else { root_6_0_0_0_1_0_1_0_tAFOX_2 = root_6_0_0_0_1_0_1_tAFOX_2 .addElement("cit:CI_DateTypeCode"); } root_6_0_0_0_1_0_1_0_tAFOX_2.addAttribute("codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#CI_DateTypeCode"); root_6_0_0_0_1_0_1_0_tAFOX_2.addAttribute("codeListValue", "publication"); root_6_0_0_0_1_0_1_0_tAFOX_2.setName("cit:CI_DateTypeCode"); org.dom4j.Element root_6_0_0_0_2_tAFOX_2; if (root_6_0_0_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_tAFOX_2 = root_6_0_0_0_tAFOX_2 .addElement("citedResponsibleParty"); } else { root_6_0_0_0_2_tAFOX_2 = root_6_0_0_0_tAFOX_2 .addElement("cit:citedResponsibleParty"); } root_6_0_0_0_2_tAFOX_2.setName("cit:citedResponsibleParty"); org.dom4j.Element root_6_0_0_0_2_0_tAFOX_2; if (root_6_0_0_0_2_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_tAFOX_2 = root_6_0_0_0_2_tAFOX_2 .addElement("CI_Responsibility"); } else { root_6_0_0_0_2_0_tAFOX_2 = root_6_0_0_0_2_tAFOX_2 .addElement("cit:CI_Responsibility"); } root_6_0_0_0_2_0_tAFOX_2.setName("cit:CI_Responsibility"); org.dom4j.Element root_6_0_0_0_2_0_0_tAFOX_2; if (root_6_0_0_0_2_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_0_tAFOX_2 = root_6_0_0_0_2_0_tAFOX_2 .addElement("role"); } else { root_6_0_0_0_2_0_0_tAFOX_2 = root_6_0_0_0_2_0_tAFOX_2 .addElement("cit:role"); } root_6_0_0_0_2_0_0_tAFOX_2.setName("cit:role"); org.dom4j.Element root_6_0_0_0_2_0_0_0_tAFOX_2; if (root_6_0_0_0_2_0_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_0_0_tAFOX_2 = root_6_0_0_0_2_0_0_tAFOX_2 .addElement("CI_RoleCode"); } else { root_6_0_0_0_2_0_0_0_tAFOX_2 = root_6_0_0_0_2_0_0_tAFOX_2 .addElement("cit:CI_RoleCode"); } root_6_0_0_0_2_0_0_0_tAFOX_2.addAttribute("codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#CI_RoleCode"); root_6_0_0_0_2_0_0_0_tAFOX_2.addAttribute("codeListValue", "originator"); root_6_0_0_0_2_0_0_0_tAFOX_2.setName("cit:CI_RoleCode"); org.dom4j.Element root_6_0_0_0_2_0_1_tAFOX_2; if (root_6_0_0_0_2_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_1_tAFOX_2 = root_6_0_0_0_2_0_tAFOX_2 .addElement("party"); } else { root_6_0_0_0_2_0_1_tAFOX_2 = root_6_0_0_0_2_0_tAFOX_2 .addElement("cit:party"); } root_6_0_0_0_2_0_1_tAFOX_2.setName("cit:party"); org.dom4j.Element root_6_0_0_0_2_0_1_0_tAFOX_2; if (root_6_0_0_0_2_0_1_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_1_0_tAFOX_2 = root_6_0_0_0_2_0_1_tAFOX_2 .addElement("CI_Organisation"); } else { root_6_0_0_0_2_0_1_0_tAFOX_2 = root_6_0_0_0_2_0_1_tAFOX_2 .addElement("cit:CI_Organisation"); } root_6_0_0_0_2_0_1_0_tAFOX_2.setName("cit:CI_Organisation"); org.dom4j.Element root_6_0_0_0_2_0_1_0_0_tAFOX_2; if (root_6_0_0_0_2_0_1_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_1_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_tAFOX_2 .addElement("name"); } else { root_6_0_0_0_2_0_1_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_tAFOX_2 .addElement("cit:name"); } root_6_0_0_0_2_0_1_0_0_tAFOX_2.setName("cit:name"); org.dom4j.Element root_6_0_0_0_2_0_1_0_0_0_tAFOX_2; if (root_6_0_0_0_2_0_1_0_0_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_6_0_0_0_2_0_1_0_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_0_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_0_0_2_0_1_0_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_0_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("organisationName") != null) { nestXMLTool_tAFOX_2.setText(root_6_0_0_0_2_0_1_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("organisationName")); } root_6_0_0_0_2_0_1_0_0_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_6_0_0_0_2_0_1_0_1_tAFOX_2; if (root_6_0_0_0_2_0_1_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_1_0_1_tAFOX_2 = root_6_0_0_0_2_0_1_0_tAFOX_2 .addElement("contactInfo"); } else { root_6_0_0_0_2_0_1_0_1_tAFOX_2 = root_6_0_0_0_2_0_1_0_tAFOX_2 .addElement("cit:contactInfo"); } root_6_0_0_0_2_0_1_0_1_tAFOX_2.setName("cit:contactInfo"); org.dom4j.Element root_6_0_0_0_2_0_1_0_1_0_tAFOX_2; if (root_6_0_0_0_2_0_1_0_1_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_1_0_1_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_tAFOX_2 .addElement("CI_Contact"); } else { root_6_0_0_0_2_0_1_0_1_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_tAFOX_2 .addElement("cit:CI_Contact"); } root_6_0_0_0_2_0_1_0_1_0_tAFOX_2.setName("cit:CI_Contact"); org.dom4j.Element root_6_0_0_0_2_0_1_0_1_0_0_tAFOX_2; if (root_6_0_0_0_2_0_1_0_1_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_1_0_1_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_tAFOX_2 .addElement("phone"); } else { root_6_0_0_0_2_0_1_0_1_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_tAFOX_2 .addElement("cit:phone"); } root_6_0_0_0_2_0_1_0_1_0_0_tAFOX_2.setName("cit:phone"); org.dom4j.Element root_6_0_0_0_2_0_1_0_1_0_0_0_tAFOX_2; if (root_6_0_0_0_2_0_1_0_1_0_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_1_0_1_0_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_0_tAFOX_2 .addElement("CI_Telephone"); } else { root_6_0_0_0_2_0_1_0_1_0_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_0_tAFOX_2 .addElement("cit:CI_Telephone"); } root_6_0_0_0_2_0_1_0_1_0_0_0_tAFOX_2.setName("cit:CI_Telephone"); org.dom4j.Element root_6_0_0_0_2_0_1_0_1_0_0_0_0_tAFOX_2; if (root_6_0_0_0_2_0_1_0_1_0_0_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_1_0_1_0_0_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_0_0_tAFOX_2 .addElement("number"); } else { root_6_0_0_0_2_0_1_0_1_0_0_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_0_0_tAFOX_2 .addElement("cit:number"); } root_6_0_0_0_2_0_1_0_1_0_0_0_0_tAFOX_2.setName("cit:number"); org.dom4j.Element root_6_0_0_0_2_0_1_0_1_0_0_0_0_0_tAFOX_2; if (root_6_0_0_0_2_0_1_0_1_0_0_0_0_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_6_0_0_0_2_0_1_0_1_0_0_0_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_0_0_0_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_0_0_2_0_1_0_1_0_0_0_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_0_0_0_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("voice") != null) { nestXMLTool_tAFOX_2.setText( root_6_0_0_0_2_0_1_0_1_0_0_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("voice")); } root_6_0_0_0_2_0_1_0_1_0_0_0_0_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_6_0_0_0_2_0_1_0_1_0_0_0_1_tAFOX_2; if (root_6_0_0_0_2_0_1_0_1_0_0_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_1_0_1_0_0_0_1_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_0_0_tAFOX_2 .addElement("numberType"); } else { root_6_0_0_0_2_0_1_0_1_0_0_0_1_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_0_0_tAFOX_2 .addElement("cit:numberType"); } root_6_0_0_0_2_0_1_0_1_0_0_0_1_tAFOX_2.setName("cit:numberType"); org.dom4j.Element root_6_0_0_0_2_0_1_0_1_0_0_0_1_0_tAFOX_2; if (root_6_0_0_0_2_0_1_0_1_0_0_0_1_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_1_0_1_0_0_0_1_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_0_0_1_tAFOX_2 .addElement("CI_TelephoneTypeCode"); } else { root_6_0_0_0_2_0_1_0_1_0_0_0_1_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_0_0_1_tAFOX_2 .addElement("cit:CI_TelephoneTypeCode"); } root_6_0_0_0_2_0_1_0_1_0_0_0_1_0_tAFOX_2.addAttribute("codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/ML_gmxCodelists.xml#CI_TelephoneTypeCode"); root_6_0_0_0_2_0_1_0_1_0_0_0_1_0_tAFOX_2.addAttribute("codeListValue", "voice"); root_6_0_0_0_2_0_1_0_1_0_0_0_1_0_tAFOX_2 .setName("cit:CI_TelephoneTypeCode"); org.dom4j.Element root_6_0_0_0_2_0_1_0_1_0_1_tAFOX_2; if (root_6_0_0_0_2_0_1_0_1_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_1_0_1_0_1_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_tAFOX_2 .addElement("address"); } else { root_6_0_0_0_2_0_1_0_1_0_1_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_tAFOX_2 .addElement("cit:address"); } root_6_0_0_0_2_0_1_0_1_0_1_tAFOX_2.setName("cit:address"); org.dom4j.Element root_6_0_0_0_2_0_1_0_1_0_1_0_tAFOX_2; if (root_6_0_0_0_2_0_1_0_1_0_1_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_1_0_1_0_1_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_1_tAFOX_2 .addElement("CI_Address"); } else { root_6_0_0_0_2_0_1_0_1_0_1_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_1_tAFOX_2 .addElement("cit:CI_Address"); } root_6_0_0_0_2_0_1_0_1_0_1_0_tAFOX_2.setName("cit:CI_Address"); org.dom4j.Element root_6_0_0_0_2_0_1_0_1_0_1_0_0_tAFOX_2; if (root_6_0_0_0_2_0_1_0_1_0_1_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_1_0_1_0_1_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_1_0_tAFOX_2 .addElement("electronicMailAddress"); } else { root_6_0_0_0_2_0_1_0_1_0_1_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_1_0_tAFOX_2 .addElement("cit:electronicMailAddress"); } root_6_0_0_0_2_0_1_0_1_0_1_0_0_tAFOX_2 .setName("cit:electronicMailAddress"); org.dom4j.Element root_6_0_0_0_2_0_1_0_1_0_1_0_0_0_tAFOX_2; if (root_6_0_0_0_2_0_1_0_1_0_1_0_0_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_6_0_0_0_2_0_1_0_1_0_1_0_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_1_0_0_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_0_0_2_0_1_0_1_0_1_0_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_1_0_0_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("email") != null) { nestXMLTool_tAFOX_2.setText( root_6_0_0_0_2_0_1_0_1_0_1_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("email")); } root_6_0_0_0_2_0_1_0_1_0_1_0_0_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_6_0_0_0_2_0_1_0_2_tAFOX_2; if (root_6_0_0_0_2_0_1_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_1_0_2_tAFOX_2 = root_6_0_0_0_2_0_1_0_tAFOX_2 .addElement("individual"); } else { root_6_0_0_0_2_0_1_0_2_tAFOX_2 = root_6_0_0_0_2_0_1_0_tAFOX_2 .addElement("cit:individual"); } root_6_0_0_0_2_0_1_0_2_tAFOX_2.setName("cit:individual"); org.dom4j.Element root_6_0_0_0_2_0_1_0_2_0_tAFOX_2; if (root_6_0_0_0_2_0_1_0_2_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_1_0_2_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_2_tAFOX_2 .addElement("CI_Individual"); } else { root_6_0_0_0_2_0_1_0_2_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_2_tAFOX_2 .addElement("cit:CI_Individual"); } root_6_0_0_0_2_0_1_0_2_0_tAFOX_2.setName("cit:CI_Individual"); org.dom4j.Element root_6_0_0_0_2_0_1_0_2_0_0_tAFOX_2; if (root_6_0_0_0_2_0_1_0_2_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_1_0_2_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_2_0_tAFOX_2 .addElement("name"); } else { root_6_0_0_0_2_0_1_0_2_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_2_0_tAFOX_2 .addElement("cit:name"); } root_6_0_0_0_2_0_1_0_2_0_0_tAFOX_2.setName("cit:name"); org.dom4j.Element root_6_0_0_0_2_0_1_0_2_0_0_0_tAFOX_2; if (root_6_0_0_0_2_0_1_0_2_0_0_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_6_0_0_0_2_0_1_0_2_0_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_2_0_0_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_0_0_2_0_1_0_2_0_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_2_0_0_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("individualName") != null) { nestXMLTool_tAFOX_2.setText(root_6_0_0_0_2_0_1_0_2_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("individualName")); } root_6_0_0_0_2_0_1_0_2_0_0_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_6_0_1_tAFOX_2; if (root_6_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_1_tAFOX_2 = root_6_0_tAFOX_2.addElement("abstract"); } else { root_6_0_1_tAFOX_2 = root_6_0_tAFOX_2.addElement("mri:abstract"); } root_6_0_1_tAFOX_2.setName("mri:abstract"); org.dom4j.Element root_6_0_1_0_tAFOX_2; if (root_6_0_1_tAFOX_2.getNamespaceForPrefix("gco") == null) { root_6_0_1_0_tAFOX_2 = root_6_0_1_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_1_0_tAFOX_2 = root_6_0_1_tAFOX_2 .addElement("gco:CharacterString"); } root_6_0_1_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_6_0_2_tAFOX_2; if (root_6_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_2_tAFOX_2 = root_6_0_tAFOX_2.addElement("purpose"); } else { root_6_0_2_tAFOX_2 = root_6_0_tAFOX_2.addElement("mri:purpose"); } root_6_0_2_tAFOX_2.setName("mri:purpose"); org.dom4j.Element root_6_0_2_0_tAFOX_2; if (root_6_0_2_tAFOX_2.getNamespaceForPrefix("gco") == null) { root_6_0_2_0_tAFOX_2 = root_6_0_2_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_2_0_tAFOX_2 = root_6_0_2_tAFOX_2 .addElement("gco:CharacterString"); } root_6_0_2_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_6_0_3_tAFOX_2; if (root_6_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_3_tAFOX_2 = root_6_0_tAFOX_2.addElement("status"); } else { root_6_0_3_tAFOX_2 = root_6_0_tAFOX_2.addElement("mri:status"); } root_6_0_3_tAFOX_2.setName("mri:status"); org.dom4j.Element root_6_0_3_0_tAFOX_2; if (root_6_0_3_tAFOX_2.getNamespaceForPrefix("mcc") == null) { root_6_0_3_0_tAFOX_2 = root_6_0_3_tAFOX_2 .addElement("MD_ProgressCode"); } else { root_6_0_3_0_tAFOX_2 = root_6_0_3_tAFOX_2 .addElement("mcc:MD_ProgressCode"); } root_6_0_3_0_tAFOX_2.addAttribute("codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#MD_ProgressCode"); root_6_0_3_0_tAFOX_2.addAttribute("codeListValue", "completed"); root_6_0_3_0_tAFOX_2.setName("mcc:MD_ProgressCode"); org.dom4j.Element root_6_0_4_tAFOX_2; if (root_6_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_4_tAFOX_2 = root_6_0_tAFOX_2.addElement("pointOfContact"); } else { root_6_0_4_tAFOX_2 = root_6_0_tAFOX_2 .addElement("mri:pointOfContact"); } root_6_0_4_tAFOX_2.setName("mri:pointOfContact"); org.dom4j.Element root_6_0_4_0_tAFOX_2; if (root_6_0_4_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_6_0_4_0_tAFOX_2 = root_6_0_4_tAFOX_2 .addElement("CI_Responsibility"); } else { root_6_0_4_0_tAFOX_2 = root_6_0_4_tAFOX_2 .addElement("cit:CI_Responsibility"); } root_6_0_4_0_tAFOX_2.setName("cit:CI_Responsibility"); org.dom4j.Element root_6_0_4_0_0_tAFOX_2; if (root_6_0_4_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_6_0_4_0_0_tAFOX_2 = root_6_0_4_0_tAFOX_2.addElement("role"); } else { root_6_0_4_0_0_tAFOX_2 = root_6_0_4_0_tAFOX_2 .addElement("cit:role"); } root_6_0_4_0_0_tAFOX_2.setName("cit:role"); org.dom4j.Element root_6_0_4_0_0_0_tAFOX_2; if (root_6_0_4_0_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_6_0_4_0_0_0_tAFOX_2 = root_6_0_4_0_0_tAFOX_2 .addElement("CI_RoleCode"); } else { root_6_0_4_0_0_0_tAFOX_2 = root_6_0_4_0_0_tAFOX_2 .addElement("cit:CI_RoleCode"); } root_6_0_4_0_0_0_tAFOX_2.addAttribute("codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#CI_RoleCode"); root_6_0_4_0_0_0_tAFOX_2.addAttribute("codeListValue", "originator"); root_6_0_4_0_0_0_tAFOX_2.setName("cit:CI_RoleCode"); org.dom4j.Element root_6_0_4_0_1_tAFOX_2; if (root_6_0_4_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_6_0_4_0_1_tAFOX_2 = root_6_0_4_0_tAFOX_2.addElement("party"); } else { root_6_0_4_0_1_tAFOX_2 = root_6_0_4_0_tAFOX_2 .addElement("cit:party"); } root_6_0_4_0_1_tAFOX_2.setName("cit:party"); org.dom4j.Element root_6_0_4_0_1_0_tAFOX_2; if (root_6_0_4_0_1_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_6_0_4_0_1_0_tAFOX_2 = root_6_0_4_0_1_tAFOX_2 .addElement("CI_Organisation"); } else { root_6_0_4_0_1_0_tAFOX_2 = root_6_0_4_0_1_tAFOX_2 .addElement("cit:CI_Organisation"); } root_6_0_4_0_1_0_tAFOX_2.setName("cit:CI_Organisation"); org.dom4j.Element root_6_0_4_0_1_0_0_tAFOX_2; if (root_6_0_4_0_1_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_6_0_4_0_1_0_0_tAFOX_2 = root_6_0_4_0_1_0_tAFOX_2 .addElement("name"); } else { root_6_0_4_0_1_0_0_tAFOX_2 = root_6_0_4_0_1_0_tAFOX_2 .addElement("cit:name"); } root_6_0_4_0_1_0_0_tAFOX_2.setName("cit:name"); org.dom4j.Element root_6_0_4_0_1_0_0_0_tAFOX_2; if (root_6_0_4_0_1_0_0_tAFOX_2.getNamespaceForPrefix("gco") == null) { root_6_0_4_0_1_0_0_0_tAFOX_2 = root_6_0_4_0_1_0_0_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_4_0_1_0_0_0_tAFOX_2 = root_6_0_4_0_1_0_0_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("organisationName") != null) { nestXMLTool_tAFOX_2.setText(root_6_0_4_0_1_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("organisationName")); } root_6_0_4_0_1_0_0_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_6_0_4_0_1_0_1_tAFOX_2; if (root_6_0_4_0_1_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_6_0_4_0_1_0_1_tAFOX_2 = root_6_0_4_0_1_0_tAFOX_2 .addElement("contactInfo"); } else { root_6_0_4_0_1_0_1_tAFOX_2 = root_6_0_4_0_1_0_tAFOX_2 .addElement("cit:contactInfo"); } root_6_0_4_0_1_0_1_tAFOX_2.setName("cit:contactInfo"); org.dom4j.Element root_6_0_4_0_1_0_1_0_tAFOX_2; if (root_6_0_4_0_1_0_1_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_6_0_4_0_1_0_1_0_tAFOX_2 = root_6_0_4_0_1_0_1_tAFOX_2 .addElement("CI_Contact"); } else { root_6_0_4_0_1_0_1_0_tAFOX_2 = root_6_0_4_0_1_0_1_tAFOX_2 .addElement("cit:CI_Contact"); } root_6_0_4_0_1_0_1_0_tAFOX_2.setName("cit:CI_Contact"); org.dom4j.Element root_6_0_4_0_1_0_1_0_0_tAFOX_2; if (root_6_0_4_0_1_0_1_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_6_0_4_0_1_0_1_0_0_tAFOX_2 = root_6_0_4_0_1_0_1_0_tAFOX_2 .addElement("address"); } else { root_6_0_4_0_1_0_1_0_0_tAFOX_2 = root_6_0_4_0_1_0_1_0_tAFOX_2 .addElement("cit:address"); } root_6_0_4_0_1_0_1_0_0_tAFOX_2.setName("cit:address"); org.dom4j.Element root_6_0_4_0_1_0_1_0_0_0_tAFOX_2; if (root_6_0_4_0_1_0_1_0_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_tAFOX_2 .addElement("CI_Address"); } else { root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_tAFOX_2 .addElement("cit:CI_Address"); } root_6_0_4_0_1_0_1_0_0_0_tAFOX_2.setName("cit:CI_Address"); org.dom4j.Element root_6_0_4_0_1_0_1_0_0_0_0_tAFOX_2; if (root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_4_0_1_0_1_0_0_0_0_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 .addElement("deliveryPoint"); } else { root_6_0_4_0_1_0_1_0_0_0_0_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 .addElement("cit:deliveryPoint"); } root_6_0_4_0_1_0_1_0_0_0_0_tAFOX_2.setName("cit:deliveryPoint"); org.dom4j.Element root_6_0_4_0_1_0_1_0_0_0_0_0_tAFOX_2; if (root_6_0_4_0_1_0_1_0_0_0_0_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_6_0_4_0_1_0_1_0_0_0_0_0_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_0_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_4_0_1_0_1_0_0_0_0_0_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_0_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("deliveryPoint") != null) { nestXMLTool_tAFOX_2.setText(root_6_0_4_0_1_0_1_0_0_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("deliveryPoint")); } root_6_0_4_0_1_0_1_0_0_0_0_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_6_0_4_0_1_0_1_0_0_0_1_tAFOX_2; if (root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_4_0_1_0_1_0_0_0_1_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 .addElement("city"); } else { root_6_0_4_0_1_0_1_0_0_0_1_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 .addElement("cit:city"); } root_6_0_4_0_1_0_1_0_0_0_1_tAFOX_2.setName("cit:city"); org.dom4j.Element root_6_0_4_0_1_0_1_0_0_0_1_0_tAFOX_2; if (root_6_0_4_0_1_0_1_0_0_0_1_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_6_0_4_0_1_0_1_0_0_0_1_0_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_1_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_4_0_1_0_1_0_0_0_1_0_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_1_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("city") != null) { nestXMLTool_tAFOX_2.setText(root_6_0_4_0_1_0_1_0_0_0_1_0_tAFOX_2, valueMap_tAFOX_2.get("city")); } root_6_0_4_0_1_0_1_0_0_0_1_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_6_0_4_0_1_0_1_0_0_0_2_tAFOX_2; if (root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_4_0_1_0_1_0_0_0_2_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 .addElement("administrativeArea"); } else { root_6_0_4_0_1_0_1_0_0_0_2_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 .addElement("cit:administrativeArea"); } root_6_0_4_0_1_0_1_0_0_0_2_tAFOX_2.setName("cit:administrativeArea"); org.dom4j.Element root_6_0_4_0_1_0_1_0_0_0_2_0_tAFOX_2; if (root_6_0_4_0_1_0_1_0_0_0_2_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_6_0_4_0_1_0_1_0_0_0_2_0_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_2_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_4_0_1_0_1_0_0_0_2_0_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_2_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("administrativeArea") != null) { nestXMLTool_tAFOX_2.setText(root_6_0_4_0_1_0_1_0_0_0_2_0_tAFOX_2, valueMap_tAFOX_2.get("administrativeArea")); } root_6_0_4_0_1_0_1_0_0_0_2_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_6_0_4_0_1_0_1_0_0_0_3_tAFOX_2; if (root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_4_0_1_0_1_0_0_0_3_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 .addElement("postalCode"); } else { root_6_0_4_0_1_0_1_0_0_0_3_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 .addElement("cit:postalCode"); } root_6_0_4_0_1_0_1_0_0_0_3_tAFOX_2.setName("cit:postalCode"); org.dom4j.Element root_6_0_4_0_1_0_1_0_0_0_3_0_tAFOX_2; if (root_6_0_4_0_1_0_1_0_0_0_3_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_6_0_4_0_1_0_1_0_0_0_3_0_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_3_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_4_0_1_0_1_0_0_0_3_0_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_3_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("postalCode") != null) { nestXMLTool_tAFOX_2.setText(root_6_0_4_0_1_0_1_0_0_0_3_0_tAFOX_2, valueMap_tAFOX_2.get("postalCode")); } root_6_0_4_0_1_0_1_0_0_0_3_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_6_0_4_0_1_0_1_0_0_0_4_tAFOX_2; if (root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_4_0_1_0_1_0_0_0_4_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 .addElement("country"); } else { root_6_0_4_0_1_0_1_0_0_0_4_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 .addElement("cit:country"); } root_6_0_4_0_1_0_1_0_0_0_4_tAFOX_2.setName("cit:country"); org.dom4j.Element root_6_0_4_0_1_0_1_0_0_0_4_0_tAFOX_2; if (root_6_0_4_0_1_0_1_0_0_0_4_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_6_0_4_0_1_0_1_0_0_0_4_0_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_4_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_4_0_1_0_1_0_0_0_4_0_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_4_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("country") != null) { nestXMLTool_tAFOX_2.setText(root_6_0_4_0_1_0_1_0_0_0_4_0_tAFOX_2, valueMap_tAFOX_2.get("country")); } root_6_0_4_0_1_0_1_0_0_0_4_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_6_0_4_0_1_0_1_0_0_0_5_tAFOX_2; if (root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_4_0_1_0_1_0_0_0_5_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 .addElement("electronicMailAddress"); } else { root_6_0_4_0_1_0_1_0_0_0_5_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 .addElement("cit:electronicMailAddress"); } root_6_0_4_0_1_0_1_0_0_0_5_tAFOX_2.setName("cit:electronicMailAddress"); org.dom4j.Element root_6_0_4_0_1_0_1_0_0_0_5_0_tAFOX_2; if (root_6_0_4_0_1_0_1_0_0_0_5_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_6_0_4_0_1_0_1_0_0_0_5_0_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_5_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_4_0_1_0_1_0_0_0_5_0_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_5_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("email") != null) { nestXMLTool_tAFOX_2.setText(root_6_0_4_0_1_0_1_0_0_0_5_0_tAFOX_2, valueMap_tAFOX_2.get("email")); } root_6_0_4_0_1_0_1_0_0_0_5_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_6_0_4_0_1_0_2_tAFOX_2; if (root_6_0_4_0_1_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_6_0_4_0_1_0_2_tAFOX_2 = root_6_0_4_0_1_0_tAFOX_2 .addElement("individual"); } else { root_6_0_4_0_1_0_2_tAFOX_2 = root_6_0_4_0_1_0_tAFOX_2 .addElement("cit:individual"); } root_6_0_4_0_1_0_2_tAFOX_2.setName("cit:individual"); org.dom4j.Element root_6_0_4_0_1_0_2_0_tAFOX_2; if (root_6_0_4_0_1_0_2_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_6_0_4_0_1_0_2_0_tAFOX_2 = root_6_0_4_0_1_0_2_tAFOX_2 .addElement("CI_Individual"); } else { root_6_0_4_0_1_0_2_0_tAFOX_2 = root_6_0_4_0_1_0_2_tAFOX_2 .addElement("cit:CI_Individual"); } root_6_0_4_0_1_0_2_0_tAFOX_2.setName("cit:CI_Individual"); org.dom4j.Element root_6_0_4_0_1_0_2_0_0_tAFOX_2; if (root_6_0_4_0_1_0_2_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_6_0_4_0_1_0_2_0_0_tAFOX_2 = root_6_0_4_0_1_0_2_0_tAFOX_2 .addElement("name"); } else { root_6_0_4_0_1_0_2_0_0_tAFOX_2 = root_6_0_4_0_1_0_2_0_tAFOX_2 .addElement("cit:name"); } root_6_0_4_0_1_0_2_0_0_tAFOX_2.setName("cit:name"); org.dom4j.Element root_6_0_4_0_1_0_2_0_0_0_tAFOX_2; if (root_6_0_4_0_1_0_2_0_0_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_6_0_4_0_1_0_2_0_0_0_tAFOX_2 = root_6_0_4_0_1_0_2_0_0_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_4_0_1_0_2_0_0_0_tAFOX_2 = root_6_0_4_0_1_0_2_0_0_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("individualName") != null) { nestXMLTool_tAFOX_2.setText(root_6_0_4_0_1_0_2_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("individualName")); } root_6_0_4_0_1_0_2_0_0_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_6_0_4_0_1_0_2_0_1_tAFOX_2; if (root_6_0_4_0_1_0_2_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_6_0_4_0_1_0_2_0_1_tAFOX_2 = root_6_0_4_0_1_0_2_0_tAFOX_2 .addElement("positionName"); } else { root_6_0_4_0_1_0_2_0_1_tAFOX_2 = root_6_0_4_0_1_0_2_0_tAFOX_2 .addElement("cit:positionName"); } root_6_0_4_0_1_0_2_0_1_tAFOX_2.setName("cit:positionName"); org.dom4j.Element root_6_0_4_0_1_0_2_0_1_0_tAFOX_2; if (root_6_0_4_0_1_0_2_0_1_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_6_0_4_0_1_0_2_0_1_0_tAFOX_2 = root_6_0_4_0_1_0_2_0_1_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_4_0_1_0_2_0_1_0_tAFOX_2 = root_6_0_4_0_1_0_2_0_1_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("positionName") != null) { nestXMLTool_tAFOX_2.setText(root_6_0_4_0_1_0_2_0_1_0_tAFOX_2, valueMap_tAFOX_2.get("positionName")); } root_6_0_4_0_1_0_2_0_1_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_6_0_5_tAFOX_2; if (root_6_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_5_tAFOX_2 = root_6_0_tAFOX_2 .addElement("spatialRepresentationType"); } else { root_6_0_5_tAFOX_2 = root_6_0_tAFOX_2 .addElement("mri:spatialRepresentationType"); } root_6_0_5_tAFOX_2.setName("mri:spatialRepresentationType"); org.dom4j.Element root_6_0_5_0_tAFOX_2; if (root_6_0_5_tAFOX_2.getNamespaceForPrefix("mcc") == null) { root_6_0_5_0_tAFOX_2 = root_6_0_5_tAFOX_2 .addElement("MD_SpatialRepresentationTypeCode"); } else { root_6_0_5_0_tAFOX_2 = root_6_0_5_tAFOX_2 .addElement("mcc:MD_SpatialRepresentationTypeCode"); } root_6_0_5_0_tAFOX_2.addAttribute("codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/ML_gmxCodelists.xml#MD_SpatialRepresentationTypeCode"); if (valueMap_tAFOX_2.get("spatialRepresentationType") != null) { root_6_0_5_0_tAFOX_2.addAttribute("codeListValue", valueMap_tAFOX_2.get("spatialRepresentationType")); } root_6_0_5_0_tAFOX_2.setName("mcc:MD_SpatialRepresentationTypeCode"); org.dom4j.Element root_6_0_6_tAFOX_2; if (root_6_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_6_tAFOX_2 = root_6_0_tAFOX_2 .addElement("spatialResolution"); } else { root_6_0_6_tAFOX_2 = root_6_0_tAFOX_2 .addElement("mri:spatialResolution"); } root_6_0_6_tAFOX_2.setName("mri:spatialResolution"); org.dom4j.Element root_6_0_6_0_tAFOX_2; if (root_6_0_6_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_6_0_tAFOX_2 = root_6_0_6_tAFOX_2 .addElement("MD_Resolution"); } else { root_6_0_6_0_tAFOX_2 = root_6_0_6_tAFOX_2 .addElement("mri:MD_Resolution"); } root_6_0_6_0_tAFOX_2.setName("mri:MD_Resolution"); org.dom4j.Element root_6_0_6_0_0_tAFOX_2; if (root_6_0_6_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_6_0_0_tAFOX_2 = root_6_0_6_0_tAFOX_2 .addElement("equivalentScale"); } else { root_6_0_6_0_0_tAFOX_2 = root_6_0_6_0_tAFOX_2 .addElement("mri:equivalentScale"); } root_6_0_6_0_0_tAFOX_2.setName("mri:equivalentScale"); org.dom4j.Element root_6_0_6_0_0_0_tAFOX_2; if (root_6_0_6_0_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_6_0_0_0_tAFOX_2 = root_6_0_6_0_0_tAFOX_2 .addElement("MD_RepresentativeFraction"); } else { root_6_0_6_0_0_0_tAFOX_2 = root_6_0_6_0_0_tAFOX_2 .addElement("mri:MD_RepresentativeFraction"); } root_6_0_6_0_0_0_tAFOX_2.setName("mri:MD_RepresentativeFraction"); org.dom4j.Element root_6_0_6_0_0_0_0_tAFOX_2; if (root_6_0_6_0_0_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_6_0_0_0_0_tAFOX_2 = root_6_0_6_0_0_0_tAFOX_2 .addElement("denominator"); } else { root_6_0_6_0_0_0_0_tAFOX_2 = root_6_0_6_0_0_0_tAFOX_2 .addElement("mri:denominator"); } root_6_0_6_0_0_0_0_tAFOX_2.setName("mri:denominator"); org.dom4j.Element root_6_0_7_tAFOX_2; if (root_6_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_7_tAFOX_2 = root_6_0_tAFOX_2.addElement("topicCategory"); } else { root_6_0_7_tAFOX_2 = root_6_0_tAFOX_2 .addElement("mri:topicCategory"); } root_6_0_7_tAFOX_2.setName("mri:topicCategory"); org.dom4j.Element root_6_0_8_tAFOX_2; if (root_6_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_8_tAFOX_2 = root_6_0_tAFOX_2.addElement("extent"); } else { root_6_0_8_tAFOX_2 = root_6_0_tAFOX_2.addElement("mri:extent"); } root_6_0_8_tAFOX_2.setName("mri:extent"); org.dom4j.Element root_6_0_8_0_tAFOX_2; if (root_6_0_8_tAFOX_2.getNamespaceForPrefix("gex") == null) { root_6_0_8_0_tAFOX_2 = root_6_0_8_tAFOX_2.addElement("EX_Extent"); } else { root_6_0_8_0_tAFOX_2 = root_6_0_8_tAFOX_2 .addElement("gex:EX_Extent"); } root_6_0_8_0_tAFOX_2.setName("gex:EX_Extent"); org.dom4j.Element root_6_0_8_0_0_tAFOX_2; if (root_6_0_8_0_tAFOX_2.getNamespaceForPrefix("gex") == null) { root_6_0_8_0_0_tAFOX_2 = root_6_0_8_0_tAFOX_2 .addElement("temporalElement"); } else { root_6_0_8_0_0_tAFOX_2 = root_6_0_8_0_tAFOX_2 .addElement("gex:temporalElement"); } root_6_0_8_0_0_tAFOX_2.setName("gex:temporalElement"); org.dom4j.Element root_6_0_8_0_0_0_tAFOX_2; if (root_6_0_8_0_0_tAFOX_2.getNamespaceForPrefix("gex") == null) { root_6_0_8_0_0_0_tAFOX_2 = root_6_0_8_0_0_tAFOX_2 .addElement("EX_TemporalExtent"); } else { root_6_0_8_0_0_0_tAFOX_2 = root_6_0_8_0_0_tAFOX_2 .addElement("gex:EX_TemporalExtent"); } root_6_0_8_0_0_0_tAFOX_2.setName("gex:EX_TemporalExtent"); org.dom4j.Element root_6_0_8_0_0_0_0_tAFOX_2; if (root_6_0_8_0_0_0_tAFOX_2.getNamespaceForPrefix("gex") == null) { root_6_0_8_0_0_0_0_tAFOX_2 = root_6_0_8_0_0_0_tAFOX_2 .addElement("extent"); } else { root_6_0_8_0_0_0_0_tAFOX_2 = root_6_0_8_0_0_0_tAFOX_2 .addElement("gex:extent"); } root_6_0_8_0_0_0_0_tAFOX_2.setName("gex:extent"); org.dom4j.Element root_6_0_8_0_0_0_0_0_tAFOX_2; if (root_6_0_8_0_0_0_0_tAFOX_2.getNamespaceForPrefix("gml") == null) { root_6_0_8_0_0_0_0_0_tAFOX_2 = root_6_0_8_0_0_0_0_tAFOX_2 .addElement("TimePeriod"); } else { root_6_0_8_0_0_0_0_0_tAFOX_2 = root_6_0_8_0_0_0_0_tAFOX_2 .addElement("gml:TimePeriod"); } root_6_0_8_0_0_0_0_0_tAFOX_2.addAttribute("gml:id", "A1234"); root_6_0_8_0_0_0_0_0_tAFOX_2.setName("gml:TimePeriod"); org.dom4j.Element root_6_0_8_0_0_0_0_0_0_tAFOX_2; if (root_6_0_8_0_0_0_0_0_tAFOX_2.getNamespaceForPrefix("gml") == null) { root_6_0_8_0_0_0_0_0_0_tAFOX_2 = root_6_0_8_0_0_0_0_0_tAFOX_2 .addElement("beginPosition"); } else { root_6_0_8_0_0_0_0_0_0_tAFOX_2 = root_6_0_8_0_0_0_0_0_tAFOX_2 .addElement("gml:beginPosition"); } root_6_0_8_0_0_0_0_0_0_tAFOX_2.setName("gml:beginPosition"); org.dom4j.Element root_6_0_8_0_0_0_0_0_1_tAFOX_2; if (root_6_0_8_0_0_0_0_0_tAFOX_2.getNamespaceForPrefix("gml") == null) { root_6_0_8_0_0_0_0_0_1_tAFOX_2 = root_6_0_8_0_0_0_0_0_tAFOX_2 .addElement("endPosition"); } else { root_6_0_8_0_0_0_0_0_1_tAFOX_2 = root_6_0_8_0_0_0_0_0_tAFOX_2 .addElement("gml:endPosition"); } root_6_0_8_0_0_0_0_0_1_tAFOX_2.setName("gml:endPosition"); org.dom4j.Element root_6_0_9_tAFOX_2; if (root_6_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_9_tAFOX_2 = root_6_0_tAFOX_2.addElement("extent"); } else { root_6_0_9_tAFOX_2 = root_6_0_tAFOX_2.addElement("mri:extent"); } root_6_0_9_tAFOX_2.setName("mri:extent"); org.dom4j.Element root_6_0_9_0_tAFOX_2; if (root_6_0_9_tAFOX_2.getNamespaceForPrefix("gex") == null) { root_6_0_9_0_tAFOX_2 = root_6_0_9_tAFOX_2.addElement("EX_Extent"); } else { root_6_0_9_0_tAFOX_2 = root_6_0_9_tAFOX_2 .addElement("gex:EX_Extent"); } root_6_0_9_0_tAFOX_2.setName("gex:EX_Extent"); org.dom4j.Element root_6_0_9_0_0_tAFOX_2; if (root_6_0_9_0_tAFOX_2.getNamespaceForPrefix("gex") == null) { root_6_0_9_0_0_tAFOX_2 = root_6_0_9_0_tAFOX_2 .addElement("geographicElement"); } else { root_6_0_9_0_0_tAFOX_2 = root_6_0_9_0_tAFOX_2 .addElement("gex:geographicElement"); } root_6_0_9_0_0_tAFOX_2.setName("gex:geographicElement"); org.dom4j.Element root_6_0_9_0_0_0_tAFOX_2; if (root_6_0_9_0_0_tAFOX_2.getNamespaceForPrefix("gex") == null) { root_6_0_9_0_0_0_tAFOX_2 = root_6_0_9_0_0_tAFOX_2 .addElement("EX_GeographicBoundingBox"); } else { root_6_0_9_0_0_0_tAFOX_2 = root_6_0_9_0_0_tAFOX_2 .addElement("gex:EX_GeographicBoundingBox"); } root_6_0_9_0_0_0_tAFOX_2.setName("gex:EX_GeographicBoundingBox"); org.dom4j.Element root_6_0_9_0_0_0_0_tAFOX_2; if (root_6_0_9_0_0_0_tAFOX_2.getNamespaceForPrefix("gex") == null) { root_6_0_9_0_0_0_0_tAFOX_2 = root_6_0_9_0_0_0_tAFOX_2 .addElement("westBoundLongitude"); } else { root_6_0_9_0_0_0_0_tAFOX_2 = root_6_0_9_0_0_0_tAFOX_2 .addElement("gex:westBoundLongitude"); } root_6_0_9_0_0_0_0_tAFOX_2.setName("gex:westBoundLongitude"); org.dom4j.Element root_6_0_9_0_0_0_0_0_tAFOX_2; if (root_6_0_9_0_0_0_0_tAFOX_2.getNamespaceForPrefix("gco") == null) { root_6_0_9_0_0_0_0_0_tAFOX_2 = root_6_0_9_0_0_0_0_tAFOX_2 .addElement("Decimal"); } else { root_6_0_9_0_0_0_0_0_tAFOX_2 = root_6_0_9_0_0_0_0_tAFOX_2 .addElement("gco:Decimal"); } if (valueMap_tAFOX_2.get("west") != null) { nestXMLTool_tAFOX_2.setText(root_6_0_9_0_0_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("west")); } root_6_0_9_0_0_0_0_0_tAFOX_2.setName("gco:Decimal"); org.dom4j.Element root_6_0_9_0_0_0_1_tAFOX_2; if (root_6_0_9_0_0_0_tAFOX_2.getNamespaceForPrefix("gex") == null) { root_6_0_9_0_0_0_1_tAFOX_2 = root_6_0_9_0_0_0_tAFOX_2 .addElement("eastBoundLongitude"); } else { root_6_0_9_0_0_0_1_tAFOX_2 = root_6_0_9_0_0_0_tAFOX_2 .addElement("gex:eastBoundLongitude"); } root_6_0_9_0_0_0_1_tAFOX_2.setName("gex:eastBoundLongitude"); org.dom4j.Element root_6_0_9_0_0_0_1_0_tAFOX_2; if (root_6_0_9_0_0_0_1_tAFOX_2.getNamespaceForPrefix("gco") == null) { root_6_0_9_0_0_0_1_0_tAFOX_2 = root_6_0_9_0_0_0_1_tAFOX_2 .addElement("Decimal"); } else { root_6_0_9_0_0_0_1_0_tAFOX_2 = root_6_0_9_0_0_0_1_tAFOX_2 .addElement("gco:Decimal"); } if (valueMap_tAFOX_2.get("east") != null) { nestXMLTool_tAFOX_2.setText(root_6_0_9_0_0_0_1_0_tAFOX_2, valueMap_tAFOX_2.get("east")); } root_6_0_9_0_0_0_1_0_tAFOX_2.setName("gco:Decimal"); org.dom4j.Element root_6_0_9_0_0_0_2_tAFOX_2; if (root_6_0_9_0_0_0_tAFOX_2.getNamespaceForPrefix("gex") == null) { root_6_0_9_0_0_0_2_tAFOX_2 = root_6_0_9_0_0_0_tAFOX_2 .addElement("southBoundLatitude"); } else { root_6_0_9_0_0_0_2_tAFOX_2 = root_6_0_9_0_0_0_tAFOX_2 .addElement("gex:southBoundLatitude"); } root_6_0_9_0_0_0_2_tAFOX_2.setName("gex:southBoundLatitude"); org.dom4j.Element root_6_0_9_0_0_0_2_0_tAFOX_2; if (root_6_0_9_0_0_0_2_tAFOX_2.getNamespaceForPrefix("gco") == null) { root_6_0_9_0_0_0_2_0_tAFOX_2 = root_6_0_9_0_0_0_2_tAFOX_2 .addElement("Decimal"); } else { root_6_0_9_0_0_0_2_0_tAFOX_2 = root_6_0_9_0_0_0_2_tAFOX_2 .addElement("gco:Decimal"); } if (valueMap_tAFOX_2.get("south") != null) { nestXMLTool_tAFOX_2.setText(root_6_0_9_0_0_0_2_0_tAFOX_2, valueMap_tAFOX_2.get("south")); } root_6_0_9_0_0_0_2_0_tAFOX_2.setName("gco:Decimal"); org.dom4j.Element root_6_0_9_0_0_0_3_tAFOX_2; if (root_6_0_9_0_0_0_tAFOX_2.getNamespaceForPrefix("gex") == null) { root_6_0_9_0_0_0_3_tAFOX_2 = root_6_0_9_0_0_0_tAFOX_2 .addElement("northBoundLatitude"); } else { root_6_0_9_0_0_0_3_tAFOX_2 = root_6_0_9_0_0_0_tAFOX_2 .addElement("gex:northBoundLatitude"); } root_6_0_9_0_0_0_3_tAFOX_2.setName("gex:northBoundLatitude"); org.dom4j.Element root_6_0_9_0_0_0_3_0_tAFOX_2; if (root_6_0_9_0_0_0_3_tAFOX_2.getNamespaceForPrefix("gco") == null) { root_6_0_9_0_0_0_3_0_tAFOX_2 = root_6_0_9_0_0_0_3_tAFOX_2 .addElement("Decimal"); } else { root_6_0_9_0_0_0_3_0_tAFOX_2 = root_6_0_9_0_0_0_3_tAFOX_2 .addElement("gco:Decimal"); } if (valueMap_tAFOX_2.get("north") != null) { nestXMLTool_tAFOX_2.setText(root_6_0_9_0_0_0_3_0_tAFOX_2, valueMap_tAFOX_2.get("north")); } root_6_0_9_0_0_0_3_0_tAFOX_2.setName("gco:Decimal"); org.dom4j.Element root_6_0_10_tAFOX_2; if (root_6_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_10_tAFOX_2 = root_6_0_tAFOX_2 .addElement("resourceMaintenance"); } else { root_6_0_10_tAFOX_2 = root_6_0_tAFOX_2 .addElement("mri:resourceMaintenance"); } root_6_0_10_tAFOX_2.setName("mri:resourceMaintenance"); org.dom4j.Element root_6_0_10_0_tAFOX_2; if (root_6_0_10_tAFOX_2.getNamespaceForPrefix("mmi") == null) { root_6_0_10_0_tAFOX_2 = root_6_0_10_tAFOX_2 .addElement("MD_MaintenanceInformation"); } else { root_6_0_10_0_tAFOX_2 = root_6_0_10_tAFOX_2 .addElement("mmi:MD_MaintenanceInformation"); } root_6_0_10_0_tAFOX_2.setName("mmi:MD_MaintenanceInformation"); org.dom4j.Element root_6_0_10_0_0_tAFOX_2; if (root_6_0_10_0_tAFOX_2.getNamespaceForPrefix("mmi") == null) { root_6_0_10_0_0_tAFOX_2 = root_6_0_10_0_tAFOX_2 .addElement("maintenanceAndUpdateFrequency"); } else { root_6_0_10_0_0_tAFOX_2 = root_6_0_10_0_tAFOX_2 .addElement("mmi:maintenanceAndUpdateFrequency"); } root_6_0_10_0_0_tAFOX_2.setName("mmi:maintenanceAndUpdateFrequency"); org.dom4j.Element root_6_0_10_0_0_0_tAFOX_2; if (root_6_0_10_0_0_tAFOX_2.getNamespaceForPrefix("mmi") == null) { root_6_0_10_0_0_0_tAFOX_2 = root_6_0_10_0_0_tAFOX_2 .addElement("MD_MaintenanceFrequencyCode"); } else { root_6_0_10_0_0_0_tAFOX_2 = root_6_0_10_0_0_tAFOX_2 .addElement("mmi:MD_MaintenanceFrequencyCode"); } root_6_0_10_0_0_0_tAFOX_2.addAttribute("codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#MD_MaintenanceFrequencyCode"); root_6_0_10_0_0_0_tAFOX_2.addAttribute("codeListValue", "asNeeded"); root_6_0_10_0_0_0_tAFOX_2.setName("mmi:MD_MaintenanceFrequencyCode"); org.dom4j.Element root_6_0_11_tAFOX_2; if (root_6_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_11_tAFOX_2 = root_6_0_tAFOX_2 .addElement("descriptiveKeywords"); } else { root_6_0_11_tAFOX_2 = root_6_0_tAFOX_2 .addElement("mri:descriptiveKeywords"); } root_6_0_11_tAFOX_2.setName("mri:descriptiveKeywords"); org.dom4j.Element root_6_0_11_0_tAFOX_2; if (root_6_0_11_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_11_0_tAFOX_2 = root_6_0_11_tAFOX_2 .addElement("MD_Keywords"); } else { root_6_0_11_0_tAFOX_2 = root_6_0_11_tAFOX_2 .addElement("mri:MD_Keywords"); } root_6_0_11_0_tAFOX_2.setName("mri:MD_Keywords"); org.dom4j.Element root_6_0_11_0_0_tAFOX_2; if (root_6_0_11_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_11_0_0_tAFOX_2 = root_6_0_11_0_tAFOX_2 .addElement("keyword"); } else { root_6_0_11_0_0_tAFOX_2 = root_6_0_11_0_tAFOX_2 .addElement("mri:keyword"); } root_6_0_11_0_0_tAFOX_2.setName("mri:keyword"); org.dom4j.Element root_6_0_11_0_0_0_tAFOX_2; if (root_6_0_11_0_0_tAFOX_2.getNamespaceForPrefix("gco") == null) { root_6_0_11_0_0_0_tAFOX_2 = root_6_0_11_0_0_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_11_0_0_0_tAFOX_2 = root_6_0_11_0_0_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("keyword") != null) { nestXMLTool_tAFOX_2.setText(root_6_0_11_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("keyword")); } root_6_0_11_0_0_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_6_0_11_0_1_tAFOX_2; if (root_6_0_11_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_11_0_1_tAFOX_2 = root_6_0_11_0_tAFOX_2.addElement("type"); } else { root_6_0_11_0_1_tAFOX_2 = root_6_0_11_0_tAFOX_2 .addElement("mri:type"); } root_6_0_11_0_1_tAFOX_2.setName("mri:type"); org.dom4j.Element root_6_0_11_0_1_0_tAFOX_2; if (root_6_0_11_0_1_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_11_0_1_0_tAFOX_2 = root_6_0_11_0_1_tAFOX_2 .addElement("MD_KeywordTypeCode"); } else { root_6_0_11_0_1_0_tAFOX_2 = root_6_0_11_0_1_tAFOX_2 .addElement("mri:MD_KeywordTypeCode"); } root_6_0_11_0_1_0_tAFOX_2.addAttribute("codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#MD_KeywordTypeCode"); if (valueMap_tAFOX_2.get("keyword1_theme") != null) { root_6_0_11_0_1_0_tAFOX_2.addAttribute("codeListValue", valueMap_tAFOX_2.get("keyword1_theme")); } root_6_0_11_0_1_0_tAFOX_2.setName("mri:MD_KeywordTypeCode"); org.dom4j.Element root_6_0_12_tAFOX_2; if (root_6_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_12_tAFOX_2 = root_6_0_tAFOX_2 .addElement("descriptiveKeywords"); } else { root_6_0_12_tAFOX_2 = root_6_0_tAFOX_2 .addElement("mri:descriptiveKeywords"); } root_6_0_12_tAFOX_2.setName("mri:descriptiveKeywords"); org.dom4j.Element root_6_0_12_0_tAFOX_2; if (root_6_0_12_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_12_0_tAFOX_2 = root_6_0_12_tAFOX_2 .addElement("MD_Keywords"); } else { root_6_0_12_0_tAFOX_2 = root_6_0_12_tAFOX_2 .addElement("mri:MD_Keywords"); } root_6_0_12_0_tAFOX_2.setName("mri:MD_Keywords"); org.dom4j.Element root_6_0_12_0_0_tAFOX_2; if (root_6_0_12_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_12_0_0_tAFOX_2 = root_6_0_12_0_tAFOX_2 .addElement("keyword"); } else { root_6_0_12_0_0_tAFOX_2 = root_6_0_12_0_tAFOX_2 .addElement("mri:keyword"); } root_6_0_12_0_0_tAFOX_2.setName("mri:keyword"); org.dom4j.Element root_6_0_12_0_0_0_tAFOX_2; if (root_6_0_12_0_0_tAFOX_2.getNamespaceForPrefix("gco") == null) { root_6_0_12_0_0_0_tAFOX_2 = root_6_0_12_0_0_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_12_0_0_0_tAFOX_2 = root_6_0_12_0_0_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("keyword2") != null) { nestXMLTool_tAFOX_2.setText(root_6_0_12_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("keyword2")); } root_6_0_12_0_0_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_6_0_12_0_1_tAFOX_2; if (root_6_0_12_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_12_0_1_tAFOX_2 = root_6_0_12_0_tAFOX_2.addElement("type"); } else { root_6_0_12_0_1_tAFOX_2 = root_6_0_12_0_tAFOX_2 .addElement("mri:type"); } root_6_0_12_0_1_tAFOX_2.setName("mri:type"); org.dom4j.Element root_6_0_12_0_1_0_tAFOX_2; if (root_6_0_12_0_1_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_12_0_1_0_tAFOX_2 = root_6_0_12_0_1_tAFOX_2 .addElement("MD_KeywordTypeCode"); } else { root_6_0_12_0_1_0_tAFOX_2 = root_6_0_12_0_1_tAFOX_2 .addElement("mri:MD_KeywordTypeCode"); } root_6_0_12_0_1_0_tAFOX_2.addAttribute("codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#MD_KeywordTypeCode"); if (valueMap_tAFOX_2.get("keyword2_theme") != null) { root_6_0_12_0_1_0_tAFOX_2.addAttribute("codeListValue", valueMap_tAFOX_2.get("keyword2_theme")); } root_6_0_12_0_1_0_tAFOX_2.setName("mri:MD_KeywordTypeCode"); org.dom4j.Element root_6_0_13_tAFOX_2; if (root_6_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_13_tAFOX_2 = root_6_0_tAFOX_2 .addElement("resourceConstraints"); } else { root_6_0_13_tAFOX_2 = root_6_0_tAFOX_2 .addElement("mri:resourceConstraints"); } root_6_0_13_tAFOX_2.setName("mri:resourceConstraints"); org.dom4j.Element root_6_0_13_0_tAFOX_2; if (root_6_0_13_tAFOX_2.getNamespaceForPrefix("mco") == null) { root_6_0_13_0_tAFOX_2 = root_6_0_13_tAFOX_2 .addElement("MD_LegalConstraints"); } else { root_6_0_13_0_tAFOX_2 = root_6_0_13_tAFOX_2 .addElement("mco:MD_LegalConstraints"); } root_6_0_13_0_tAFOX_2.setName("mco:MD_LegalConstraints"); org.dom4j.Element root_6_0_13_0_0_tAFOX_2; if (root_6_0_13_0_tAFOX_2.getNamespaceForPrefix("mco") == null) { root_6_0_13_0_0_tAFOX_2 = root_6_0_13_0_tAFOX_2 .addElement("accessConstraints"); } else { root_6_0_13_0_0_tAFOX_2 = root_6_0_13_0_tAFOX_2 .addElement("mco:accessConstraints"); } root_6_0_13_0_0_tAFOX_2.setName("mco:accessConstraints"); org.dom4j.Element root_6_0_13_0_0_0_tAFOX_2; if (root_6_0_13_0_0_tAFOX_2.getNamespaceForPrefix("mco") == null) { root_6_0_13_0_0_0_tAFOX_2 = root_6_0_13_0_0_tAFOX_2 .addElement("MD_RestrictionCode"); } else { root_6_0_13_0_0_0_tAFOX_2 = root_6_0_13_0_0_tAFOX_2 .addElement("mco:MD_RestrictionCode"); } root_6_0_13_0_0_0_tAFOX_2.addAttribute("codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#MD_RestrictionCode"); root_6_0_13_0_0_0_tAFOX_2.addAttribute("codeListValue", "copyright"); root_6_0_13_0_0_0_tAFOX_2.setName("mco:MD_RestrictionCode"); org.dom4j.Element root_6_0_13_0_1_tAFOX_2; if (root_6_0_13_0_tAFOX_2.getNamespaceForPrefix("mco") == null) { root_6_0_13_0_1_tAFOX_2 = root_6_0_13_0_tAFOX_2 .addElement("useConstraints"); } else { root_6_0_13_0_1_tAFOX_2 = root_6_0_13_0_tAFOX_2 .addElement("mco:useConstraints"); } root_6_0_13_0_1_tAFOX_2.setName("mco:useConstraints"); org.dom4j.Element root_6_0_13_0_1_0_tAFOX_2; if (root_6_0_13_0_1_tAFOX_2.getNamespaceForPrefix("mco") == null) { root_6_0_13_0_1_0_tAFOX_2 = root_6_0_13_0_1_tAFOX_2 .addElement("MD_RestrictionCode"); } else { root_6_0_13_0_1_0_tAFOX_2 = root_6_0_13_0_1_tAFOX_2 .addElement("mco:MD_RestrictionCode"); } root_6_0_13_0_1_0_tAFOX_2.addAttribute("codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#MD_RestrictionCode"); root_6_0_13_0_1_0_tAFOX_2.addAttribute("codeListValue", "otherRestrictions"); root_6_0_13_0_1_0_tAFOX_2.setName("mco:MD_RestrictionCode"); org.dom4j.Element root_6_0_13_0_2_tAFOX_2; if (root_6_0_13_0_tAFOX_2.getNamespaceForPrefix("mco") == null) { root_6_0_13_0_2_tAFOX_2 = root_6_0_13_0_tAFOX_2 .addElement("otherConstraints"); } else { root_6_0_13_0_2_tAFOX_2 = root_6_0_13_0_tAFOX_2 .addElement("mco:otherConstraints"); } root_6_0_13_0_2_tAFOX_2.setName("mco:otherConstraints"); org.dom4j.Element root_6_0_13_0_2_0_tAFOX_2; if (root_6_0_13_0_2_tAFOX_2.getNamespaceForPrefix("gco") == null) { root_6_0_13_0_2_0_tAFOX_2 = root_6_0_13_0_2_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_13_0_2_0_tAFOX_2 = root_6_0_13_0_2_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("useConstraints") != null) { nestXMLTool_tAFOX_2.setText(root_6_0_13_0_2_0_tAFOX_2, valueMap_tAFOX_2.get("useConstraints")); } root_6_0_13_0_2_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_6_0_14_tAFOX_2; if (root_6_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_14_tAFOX_2 = root_6_0_tAFOX_2.addElement("defaultLocale"); } else { root_6_0_14_tAFOX_2 = root_6_0_tAFOX_2 .addElement("mri:defaultLocale"); } root_6_0_14_tAFOX_2.setName("mri:defaultLocale"); org.dom4j.Element root_6_0_14_0_tAFOX_2; if (root_6_0_14_tAFOX_2.getNamespaceForPrefix("lan") == null) { root_6_0_14_0_tAFOX_2 = root_6_0_14_tAFOX_2.addElement("PT_Locale"); } else { root_6_0_14_0_tAFOX_2 = root_6_0_14_tAFOX_2 .addElement("lan:PT_Locale"); } root_6_0_14_0_tAFOX_2.setName("lan:PT_Locale"); org.dom4j.Element root_6_0_14_0_0_tAFOX_2; if (root_6_0_14_0_tAFOX_2.getNamespaceForPrefix("lan") == null) { root_6_0_14_0_0_tAFOX_2 = root_6_0_14_0_tAFOX_2 .addElement("language"); } else { root_6_0_14_0_0_tAFOX_2 = root_6_0_14_0_tAFOX_2 .addElement("lan:language"); } root_6_0_14_0_0_tAFOX_2.setName("lan:language"); org.dom4j.Element root_6_0_14_0_0_0_tAFOX_2; if (root_6_0_14_0_0_tAFOX_2.getNamespaceForPrefix("lan") == null) { root_6_0_14_0_0_0_tAFOX_2 = root_6_0_14_0_0_tAFOX_2 .addElement("LanguageCode"); } else { root_6_0_14_0_0_0_tAFOX_2 = root_6_0_14_0_0_tAFOX_2 .addElement("lan:LanguageCode"); } root_6_0_14_0_0_0_tAFOX_2.addAttribute("codeList", "http://www.loc.gov/standards/iso639-2/"); if (valueMap_tAFOX_2.get("mdLanguage") != null) { root_6_0_14_0_0_0_tAFOX_2.addAttribute("codeListValue", valueMap_tAFOX_2.get("mdLanguage")); } root_6_0_14_0_0_0_tAFOX_2.setName("lan:LanguageCode"); org.dom4j.Element root_6_0_14_0_1_tAFOX_2; if (root_6_0_14_0_tAFOX_2.getNamespaceForPrefix("lan") == null) { root_6_0_14_0_1_tAFOX_2 = root_6_0_14_0_tAFOX_2 .addElement("characterEncoding"); } else { root_6_0_14_0_1_tAFOX_2 = root_6_0_14_0_tAFOX_2 .addElement("lan:characterEncoding"); } root_6_0_14_0_1_tAFOX_2.setName("lan:characterEncoding"); org.dom4j.Element root_6_0_14_0_1_0_tAFOX_2; if (root_6_0_14_0_1_tAFOX_2.getNamespaceForPrefix("lan") == null) { root_6_0_14_0_1_0_tAFOX_2 = root_6_0_14_0_1_tAFOX_2 .addElement("MD_CharacterSetCode"); } else { root_6_0_14_0_1_0_tAFOX_2 = root_6_0_14_0_1_tAFOX_2 .addElement("lan:MD_CharacterSetCode"); } root_6_0_14_0_1_0_tAFOX_2.addAttribute("codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#MD_CharacterSetCode"); if (valueMap_tAFOX_2.get("mdCharacterSetCode") != null) { root_6_0_14_0_1_0_tAFOX_2.addAttribute("codeListValue", valueMap_tAFOX_2.get("mdCharacterSetCode")); } root_6_0_14_0_1_0_tAFOX_2.setName("lan:MD_CharacterSetCode"); org.dom4j.Element root_6_0_15_tAFOX_2; if (root_6_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_15_tAFOX_2 = root_6_0_tAFOX_2 .addElement("supplementalInformation"); } else { root_6_0_15_tAFOX_2 = root_6_0_tAFOX_2 .addElement("mri:supplementalInformation"); } root_6_0_15_tAFOX_2.setName("mri:supplementalInformation"); org.dom4j.Element root_6_0_15_0_tAFOX_2; if (root_6_0_15_tAFOX_2.getNamespaceForPrefix("gco") == null) { root_6_0_15_0_tAFOX_2 = root_6_0_15_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_15_0_tAFOX_2 = root_6_0_15_tAFOX_2 .addElement("gco:CharacterString"); } root_6_0_15_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_7_tAFOX_2; if (root_tAFOX_2.getNamespaceForPrefix("mdb") == null) { root_7_tAFOX_2 = root_tAFOX_2.addElement("contentInfo"); } else { root_7_tAFOX_2 = root_tAFOX_2.addElement("mdb:contentInfo"); } root_7_tAFOX_2.setName("mdb:contentInfo"); org.dom4j.Element root_7_0_tAFOX_2; if (root_7_tAFOX_2.getNamespaceForPrefix("mrc") == null) { root_7_0_tAFOX_2 = root_7_tAFOX_2 .addElement("MD_CoverageDescription"); } else { root_7_0_tAFOX_2 = root_7_tAFOX_2 .addElement("mrc:MD_CoverageDescription"); } subTreeRootParent_tAFOX_2 = root_7_0_tAFOX_2; root_7_0_tAFOX_2.setName("mrc:MD_CoverageDescription"); org.dom4j.Element root_7_0_0_tAFOX_2; if (root_7_0_tAFOX_2.getNamespaceForPrefix("mrc") == null) { root_7_0_0_tAFOX_2 = root_7_0_tAFOX_2 .addElement("attributeDescription"); } else { root_7_0_0_tAFOX_2 = root_7_0_tAFOX_2 .addElement("mrc:attributeDescription"); } root_7_0_0_tAFOX_2.setName("mrc:attributeDescription"); org.dom4j.Element root_7_0_0_0_tAFOX_2; if (root_7_0_0_tAFOX_2.getNamespaceForPrefix("gco") == null) { root_7_0_0_0_tAFOX_2 = root_7_0_0_tAFOX_2.addElement("RecordType"); } else { root_7_0_0_0_tAFOX_2 = root_7_0_0_tAFOX_2 .addElement("gco:RecordType"); } nestXMLTool_tAFOX_2.parseAndAdd(root_7_0_0_0_tAFOX_2, "Raster bands"); root_7_0_0_0_tAFOX_2.setName("gco:RecordType"); org.dom4j.Element root_8_tAFOX_2; if (root_tAFOX_2.getNamespaceForPrefix("mdb") == null) { root_8_tAFOX_2 = root_tAFOX_2.addElement("distributionInfo"); } else { root_8_tAFOX_2 = root_tAFOX_2.addElement("mdb:distributionInfo"); } root_8_tAFOX_2.setName("mdb:distributionInfo"); org.dom4j.Element root_8_0_tAFOX_2; if (root_8_tAFOX_2.getNamespaceForPrefix("mrd") == null) { root_8_0_tAFOX_2 = root_8_tAFOX_2.addElement("MD_Distribution"); } else { root_8_0_tAFOX_2 = root_8_tAFOX_2.addElement("mrd:MD_Distribution"); } root_8_0_tAFOX_2.setName("mrd:MD_Distribution"); org.dom4j.Element root_8_0_0_tAFOX_2; if (root_8_0_tAFOX_2.getNamespaceForPrefix("mrd") == null) { root_8_0_0_tAFOX_2 = root_8_0_tAFOX_2.addElement("transferOptions"); } else { root_8_0_0_tAFOX_2 = root_8_0_tAFOX_2 .addElement("mrd:transferOptions"); } root_8_0_0_tAFOX_2.setName("mrd:transferOptions"); org.dom4j.Element root_8_0_0_0_tAFOX_2; if (root_8_0_0_tAFOX_2.getNamespaceForPrefix("mrd") == null) { root_8_0_0_0_tAFOX_2 = root_8_0_0_tAFOX_2 .addElement("MD_DigitalTransferOptions"); } else { root_8_0_0_0_tAFOX_2 = root_8_0_0_tAFOX_2 .addElement("mrd:MD_DigitalTransferOptions"); } root_8_0_0_0_tAFOX_2.setName("mrd:MD_DigitalTransferOptions"); org.dom4j.Element root_9_tAFOX_2; if (root_tAFOX_2.getNamespaceForPrefix("mdb") == null) { root_9_tAFOX_2 = root_tAFOX_2.addElement("resourceLineage"); } else { root_9_tAFOX_2 = root_tAFOX_2.addElement("mdb:resourceLineage"); } root_9_tAFOX_2.setName("mdb:resourceLineage"); org.dom4j.Element root_9_0_tAFOX_2; if (root_9_tAFOX_2.getNamespaceForPrefix("mrl") == null) { root_9_0_tAFOX_2 = root_9_tAFOX_2.addElement("LI_Lineage"); } else { root_9_0_tAFOX_2 = root_9_tAFOX_2.addElement("mrl:LI_Lineage"); } root_9_0_tAFOX_2.setName("mrl:LI_Lineage"); org.dom4j.Element root_9_0_0_tAFOX_2; if (root_9_0_tAFOX_2.getNamespaceForPrefix("mrl") == null) { root_9_0_0_tAFOX_2 = root_9_0_tAFOX_2.addElement("statement"); } else { root_9_0_0_tAFOX_2 = root_9_0_tAFOX_2.addElement("mrl:statement"); } root_9_0_0_tAFOX_2.addAttribute("gco:nilReason", "missing"); root_9_0_0_tAFOX_2.setName("mrl:statement"); org.dom4j.Element root_9_0_0_0_tAFOX_2; if (root_9_0_0_tAFOX_2.getNamespaceForPrefix("gco") == null) { root_9_0_0_0_tAFOX_2 = root_9_0_0_tAFOX_2 .addElement("CharacterString"); } else { root_9_0_0_0_tAFOX_2 = root_9_0_0_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("lineage") != null) { nestXMLTool_tAFOX_2.setText(root_9_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("lineage")); } root_9_0_0_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_9_0_1_tAFOX_2; if (root_9_0_tAFOX_2.getNamespaceForPrefix("mrl") == null) { root_9_0_1_tAFOX_2 = root_9_0_tAFOX_2.addElement("scope"); } else { root_9_0_1_tAFOX_2 = root_9_0_tAFOX_2.addElement("mrl:scope"); } root_9_0_1_tAFOX_2.setName("mrl:scope"); org.dom4j.Element root_9_0_1_0_tAFOX_2; if (root_9_0_1_tAFOX_2.getNamespaceForPrefix("mcc") == null) { root_9_0_1_0_tAFOX_2 = root_9_0_1_tAFOX_2.addElement("MD_Scope"); } else { root_9_0_1_0_tAFOX_2 = root_9_0_1_tAFOX_2 .addElement("mcc:MD_Scope"); } root_9_0_1_0_tAFOX_2.setName("mcc:MD_Scope"); org.dom4j.Element root_9_0_1_0_0_tAFOX_2; if (root_9_0_1_0_tAFOX_2.getNamespaceForPrefix("mcc") == null) { root_9_0_1_0_0_tAFOX_2 = root_9_0_1_0_tAFOX_2.addElement("level"); } else { root_9_0_1_0_0_tAFOX_2 = root_9_0_1_0_tAFOX_2 .addElement("mcc:level"); } root_9_0_1_0_0_tAFOX_2.setName("mcc:level"); org.dom4j.Element root_9_0_1_0_0_0_tAFOX_2; if (root_9_0_1_0_0_tAFOX_2.getNamespaceForPrefix("mcc") == null) { root_9_0_1_0_0_0_tAFOX_2 = root_9_0_1_0_0_tAFOX_2 .addElement("MD_ScopeCode"); } else { root_9_0_1_0_0_0_tAFOX_2 = root_9_0_1_0_0_tAFOX_2 .addElement("mcc:MD_ScopeCode"); } root_9_0_1_0_0_0_tAFOX_2.addAttribute("codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/ML_gmxCodelists.xml#MD_ScopeCode"); if (valueMap_tAFOX_2.get("scopeCode") != null) { root_9_0_1_0_0_0_tAFOX_2.addAttribute("codeListValue", valueMap_tAFOX_2.get("scopeCode")); } root_9_0_1_0_0_0_tAFOX_2.setName("mcc:MD_ScopeCode"); root4Group_tAFOX_2 = subTreeRootParent_tAFOX_2; } else { subTreeRootParent_tAFOX_2 = root4Group_tAFOX_2; } // build group xml tree // build loop xml tree org.dom4j.Element loop_tAFOX_2; if (subTreeRootParent_tAFOX_2.getNamespaceForPrefix("mrc") == null) { loop_tAFOX_2 = org.dom4j.DocumentHelper.createElement("attributeGroup"); } else { loop_tAFOX_2 = org.dom4j.DocumentHelper .createElement("mrc:attributeGroup"); } if (orders_tAFOX_2[0] == 0) { orders_tAFOX_2[0] = 1; } if (1 < orders_tAFOX_2.length) { orders_tAFOX_2[1] = 0; } subTreeRootParent_tAFOX_2.elements().add(orders_tAFOX_2[0]++, loop_tAFOX_2); loop_tAFOX_2.setName("mrc:attributeGroup"); org.dom4j.Element loop_0_tAFOX_2; if (loop_tAFOX_2.getNamespaceForPrefix("mrc") == null) { loop_0_tAFOX_2 = loop_tAFOX_2.addElement("MD_AttributeGroup"); } else { loop_0_tAFOX_2 = loop_tAFOX_2.addElement("mrc:MD_AttributeGroup"); } loop_0_tAFOX_2.setName("mrc:MD_AttributeGroup"); org.dom4j.Element loop_0_0_tAFOX_2; if (loop_0_tAFOX_2.getNamespaceForPrefix("mrc") == null) { loop_0_0_tAFOX_2 = loop_0_tAFOX_2.addElement("contentType"); } else { loop_0_0_tAFOX_2 = loop_0_tAFOX_2.addElement("mrc:contentType"); } loop_0_0_tAFOX_2.setName("mrc:contentType"); org.dom4j.Element loop_0_0_0_tAFOX_2; if (loop_0_0_tAFOX_2.getNamespaceForPrefix("mrc") == null) { loop_0_0_0_tAFOX_2 = loop_0_0_tAFOX_2 .addElement("MD_CoverageContentTypeCode"); } else { loop_0_0_0_tAFOX_2 = loop_0_0_tAFOX_2 .addElement("mrc:MD_CoverageContentTypeCode"); } loop_0_0_0_tAFOX_2.addAttribute("codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/ML_gmxCodelists.xml#MD_CoverageContentTypeCode"); loop_0_0_0_tAFOX_2.addAttribute("codeListValue", "image"); loop_0_0_0_tAFOX_2.setName("mrc:MD_CoverageContentTypeCode"); org.dom4j.Element loop_0_1_tAFOX_2; if (loop_0_tAFOX_2.getNamespaceForPrefix("mrc") == null) { loop_0_1_tAFOX_2 = loop_0_tAFOX_2.addElement("attribute"); } else { loop_0_1_tAFOX_2 = loop_0_tAFOX_2.addElement("mrc:attribute"); } loop_0_1_tAFOX_2.setName("mrc:attribute"); org.dom4j.Element loop_0_1_0_tAFOX_2; if (loop_0_1_tAFOX_2.getNamespaceForPrefix("mrc") == null) { loop_0_1_0_tAFOX_2 = loop_0_1_tAFOX_2.addElement("MD_Band"); } else { loop_0_1_0_tAFOX_2 = loop_0_1_tAFOX_2.addElement("mrc:MD_Band"); } loop_0_1_0_tAFOX_2.setName("mrc:MD_Band"); org.dom4j.Element loop_0_1_0_0_tAFOX_2; if (loop_0_1_0_tAFOX_2.getNamespaceForPrefix("mrc") == null) { loop_0_1_0_0_tAFOX_2 = loop_0_1_0_tAFOX_2.addElement("name"); } else { loop_0_1_0_0_tAFOX_2 = loop_0_1_0_tAFOX_2.addElement("mrc:name"); } loop_0_1_0_0_tAFOX_2.setName("mrc:name"); org.dom4j.Element loop_0_1_0_0_0_tAFOX_2; if (loop_0_1_0_0_tAFOX_2.getNamespaceForPrefix("mcc") == null) { loop_0_1_0_0_0_tAFOX_2 = loop_0_1_0_0_tAFOX_2 .addElement("MD_Identifier"); } else { loop_0_1_0_0_0_tAFOX_2 = loop_0_1_0_0_tAFOX_2 .addElement("mcc:MD_Identifier"); } loop_0_1_0_0_0_tAFOX_2.setName("mcc:MD_Identifier"); org.dom4j.Element loop_0_1_0_0_0_0_tAFOX_2; if (loop_0_1_0_0_0_tAFOX_2.getNamespaceForPrefix("mcc") == null) { loop_0_1_0_0_0_0_tAFOX_2 = loop_0_1_0_0_0_tAFOX_2.addElement("code"); } else { loop_0_1_0_0_0_0_tAFOX_2 = loop_0_1_0_0_0_tAFOX_2 .addElement("mcc:code"); } loop_0_1_0_0_0_0_tAFOX_2.setName("mcc:code"); org.dom4j.Element loop_0_1_0_0_0_0_0_tAFOX_2; if (loop_0_1_0_0_0_0_tAFOX_2.getNamespaceForPrefix("gco") == null) { loop_0_1_0_0_0_0_0_tAFOX_2 = loop_0_1_0_0_0_0_tAFOX_2 .addElement("CharacterString"); } else { loop_0_1_0_0_0_0_0_tAFOX_2 = loop_0_1_0_0_0_0_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("bandName") != null) { nestXMLTool_tAFOX_2.setText(loop_0_1_0_0_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("bandName")); } loop_0_1_0_0_0_0_0_tAFOX_2.setName("gco:CharacterString"); tos_count_tAdvancedFileOutputXML_2++; /** * [tAdvancedFileOutputXML_2 main ] stop */ } // End of branch "row1" } // C_01 // end for } } // End of branch "iso19115" } // close loop of lookup 'properties' // G_TM_M_043 /** * [sGdalInfoInput_2 end ] start */ currentComponent = "sGdalInfoInput_2"; // Delete current GDAL dataset dataset_sGdalInfoInput_2.delete(); } // Optional org.gdal.gdal.gdal.GDALDestroyDriverManager(); globalMap.put("sGdalInfoInput_2_NB_LINE", nb_line_sGdalInfoInput_2); globalMap.put("sGdalInfoInput_2_NB_ERRORS", nbErrors_sGdalInfoInput_2); globalMap.put("sGdalInfoInput_2_ERRORS", errors_sGdalInfoInput_2); ok_Hash.put("sGdalInfoInput_2", true); end_Hash.put("sGdalInfoInput_2", System.currentTimeMillis()); if (((Integer) globalMap.get("sGdalInfoInput_2_NB_ERRORS")) > 0) { tWarn_1Process(globalMap); } if (((Integer) globalMap.get("sGdalInfoInput_2_NB_ERRORS")) > 0) { tDie_1Process(globalMap); } /** * [sGdalInfoInput_2 end ] stop */ /** * [tMap_1 end ] start */ currentComponent = "tMap_1"; // ############################### // # Lookup hashes releasing if (tHash_Lookup_properties != null) { tHash_Lookup_properties.endGet(); } globalMap.remove("tHash_Lookup_properties"); // ############################### ok_Hash.put("tMap_1", true); end_Hash.put("tMap_1", System.currentTimeMillis()); /** * [tMap_1 end ] stop */ /** * [tNormalize_2 end ] start */ currentComponent = "tNormalize_2"; globalMap.put("tNormalize_2_NB_LINE", nb_line_tNormalize_2); ok_Hash.put("tNormalize_2", true); end_Hash.put("tNormalize_2", System.currentTimeMillis()); /** * [tNormalize_2 end ] stop */ /** * [tExtractDelimitedFields_1 end ] start */ currentComponent = "tExtractDelimitedFields_1"; globalMap.put("tExtractDelimitedFields_1_NB_LINE", nb_line_tExtractDelimitedFields_1); ok_Hash.put("tExtractDelimitedFields_1", true); end_Hash.put("tExtractDelimitedFields_1", System.currentTimeMillis()); /** * [tExtractDelimitedFields_1 end ] stop */ /** * [tLogRow_2 end ] start */ currentComponent = "tLogRow_2"; ok_Hash.put("tLogRow_2", true); end_Hash.put("tLogRow_2", System.currentTimeMillis()); /** * [tLogRow_2 end ] stop */ /** * [tAdvancedFileOutputXML_2 end ] start */ currentComponent = "tAdvancedFileOutputXML_2"; java.io.FileOutputStream stream_tAFOX_2 = new java.io.FileOutputStream(fileName_tAFOX_2); org.dom4j.io.XMLWriter output_tAFOX_2 = new org.dom4j.io.XMLWriter(stream_tAFOX_2, format_tAFOX_2); if (doc_tAFOX_2.getRootElement() != null) { nestXMLTool_tAFOX_2.replaceDefaultNameSpace(doc_tAFOX_2.getRootElement()); output_tAFOX_2.write(doc_tAFOX_2); } output_tAFOX_2.close(); globalMap.put("tAdvancedFileOutputXML_2_NB_LINE", nb_line_tAFOX_2); ok_Hash.put("tAdvancedFileOutputXML_2", true); end_Hash.put("tAdvancedFileOutputXML_2", System.currentTimeMillis()); /** * [tAdvancedFileOutputXML_2 end ] stop */ } // end the resume } catch (java.lang.Exception e) { TalendException te = new TalendException(e, currentComponent, globalMap); throw te; } catch (java.lang.Error error) { throw error; } finally { // free memory for "tMap_1" globalMap.remove("tHash_Lookup_properties"); try { /** * [sGdalInfoInput_2 finally ] start */ currentComponent = "sGdalInfoInput_2"; /** * [sGdalInfoInput_2 finally ] stop */ /** * [tMap_1 finally ] start */ currentComponent = "tMap_1"; /** * [tMap_1 finally ] stop */ /** * [tNormalize_2 finally ] start */ currentComponent = "tNormalize_2"; /** * [tNormalize_2 finally ] stop */ /** * [tExtractDelimitedFields_1 finally ] start */ currentComponent = "tExtractDelimitedFields_1"; /** * [tExtractDelimitedFields_1 finally ] stop */ /** * [tLogRow_2 finally ] start */ currentComponent = "tLogRow_2"; /** * [tLogRow_2 finally ] stop */ /** * [tAdvancedFileOutputXML_2 finally ] start */ currentComponent = "tAdvancedFileOutputXML_2"; /** * [tAdvancedFileOutputXML_2 finally ] stop */ } catch (java.lang.Exception e) { // ignore } catch (java.lang.Error error) { // ignore } resourceMap = null; } globalMap.put("sGdalInfoInput_2_SUBPROCESS_STATE", 1); }
From source file:metadata_generator.vectorjob_0_1.VectorJob.java
License:Apache License
public void sOGRInfoInput_1Process(final java.util.Map<String, Object> globalMap) throws TalendException { globalMap.put("sOGRInfoInput_1_SUBPROCESS_STATE", 0); final boolean execStat = this.execStat; String iterateId = ""; String currentComponent = ""; java.util.Map<String, Object> resourceMap = new java.util.HashMap<String, Object>(); try {// ww w .ja va2 s . c o m String currentMethodName = new java.lang.Exception().getStackTrace()[0].getMethodName(); boolean resumeIt = currentMethodName.equals(resumeEntryMethodName); if (resumeEntryMethodName == null || resumeIt || globalResumeTicket) {// start // the // resume globalResumeTicket = true; tFileInputDelimited_1Process(globalMap); tFileInputDelimited_2Process(globalMap); fileRowStruct fileRow = new fileRowStruct(); layerRowStruct layerRow = new layerRowStruct(); layerRowStruct row1 = layerRow; layerRowStruct fromActualFile = layerRow; iso19115_3Struct iso19115_3 = new iso19115_3Struct(); row2Struct row2 = new row2Struct(); row4Struct row4 = new row4Struct(); row4Struct row3 = row4; /** * [tFlowToIterate_1 begin ] start */ int NB_ITERATE_sOGRInfoInput_3 = 0; // for statistics ok_Hash.put("tFlowToIterate_1", false); start_Hash.put("tFlowToIterate_1", System.currentTimeMillis()); currentComponent = "tFlowToIterate_1"; int tos_count_tFlowToIterate_1 = 0; int nb_line_tFlowToIterate_1 = 0; int counter_tFlowToIterate_1 = 0; /** * [tFlowToIterate_1 begin ] stop */ /** * [sOGRInfoInput_1 begin ] start */ ok_Hash.put("sOGRInfoInput_1", false); start_Hash.put("sOGRInfoInput_1", System.currentTimeMillis()); currentComponent = "sOGRInfoInput_1"; int tos_count_sOGRInfoInput_1 = 0; // Fixed number of line. Only one row to extract information. int nb_line_sOGRInfoInput_1 = 1; /* Initialize OGR main variables */ org.gdal.ogr.DataSource dataset_sOGRInfoInput_1 = null; org.gdal.ogr.Driver driver_sOGRInfoInput_1 = null; org.gdal.osr.SpatialReference proj_sOGRInfoInput_1, latlon_sOGRInfoInput_1 = null; org.gdal.osr.CoordinateTransformation transform_sOGRInfoInput_1 = null; boolean bReadOnly_sOGRInfoInput_1 = true; /* Initialize JTS main variables */ com.vividsolutions.jts.geom.GeometryFactory gFact_sOGRInfoInput_1 = new com.vividsolutions.jts.geom.GeometryFactory(); /* Initialize variables */ String srs_sOGRInfoInput_1 = null; org.opengis.referencing.crs.CoordinateReferenceSystem crs_sOGRInfoInput_1 = null; // Default SRS EPSG code, if none is found int epsg_code_sOGRInfoInput_1 = -1; String datasetName_sOGRInfoInput_1 = /** * Start field * sOGRInfoInput_1:FILENAME */ context.file/** End field sOGRInfoInput_1:FILENAME */ ; String FS_sOGRInfoInput_1 = /** * Start field * sOGRInfoInput_1:FIELD_SEPARATOR */ "|"/** End field sOGRInfoInput_1:FIELD_SEPARATOR */ ; String error_sOGRInfoInput_1 = ""; String geomType_sOGRInfoInput_1 = ""; String fidColumn_sOGRInfoInput_1 = ""; String geomColumn_sOGRInfoInput_1 = ""; String columnsDef_sOGRInfoInput_1 = ""; int nbFeatures_sOGRInfoInput_1 = 0; int nbErrors_sOGRInfoInput_1 = 0; String errors_sOGRInfoInput_1 = ""; java.util.HashMap<String, double[]> corners_sOGRInfoInput_1; java.util.HashMap<String, com.vividsolutions.jts.geom.Coordinate> geoXY_sOGRInfoInput_1; java.util.HashMap<String, com.vividsolutions.jts.geom.Coordinate> latlonXY_sOGRInfoInput_1; // Register all known configured GDAL drivers. try { org.gdal.ogr.ogr.RegisterAll(); } catch (java.lang.UnsatisfiedLinkError e) { System.err.println( "In order to use GDAL/OGR in Talend, the java.library.path variable should point to GDAL library."); System.err.println( "To set this property, go to the Run view > Advanced settings > Use specific JVM Arguments"); System.err.println("and add a new argument:"); System.err.println(" -Djava.library.path=/path/to/gdal/swig/java"); System.err.println(""); e.printStackTrace(); // Aborting due to wrong GDAL driver configuration throw e; } // Open an OGR dataset // dataset_sOGRInfoInput_1 = // org.gdal.gdal.gdal.Open(datasetName_sOGRInfoInput_1, // org.gdal.gdalconst.gdalconstConstants.GA_ReadOnly); /* get feature source from store */ dataset_sOGRInfoInput_1 = org.gdal.ogr.ogr.Open(datasetName_sOGRInfoInput_1, !bReadOnly_sOGRInfoInput_1); if (dataset_sOGRInfoInput_1 == null) { error_sOGRInfoInput_1 = "FAILURE:" + "Unable to open datasource `" + datasetName_sOGRInfoInput_1 + "' with the OGR drivers."; // TODO : report in reject output System.err.println(error_sOGRInfoInput_1); for (int iDriver = 0; iDriver < org.gdal.ogr.ogr.GetDriverCount(); iDriver++) { System.err.println(" -> " + org.gdal.ogr.ogr.GetDriver(iDriver).GetName()); } } else { // Get current GDAL driver driver_sOGRInfoInput_1 = dataset_sOGRInfoInput_1.GetDriver(); geoXY_sOGRInfoInput_1 = new java.util.HashMap<String, com.vividsolutions.jts.geom.Coordinate>( 4); latlonXY_sOGRInfoInput_1 = new java.util.HashMap<String, com.vividsolutions.jts.geom.Coordinate>( 4); for (int iLayer_sOGRInfoInput_1 = 0; iLayer_sOGRInfoInput_1 < dataset_sOGRInfoInput_1 .GetLayerCount(); iLayer_sOGRInfoInput_1++) { org.gdal.ogr.Layer poLayer_sOGRInfoInput_1 = dataset_sOGRInfoInput_1 .GetLayer(iLayer_sOGRInfoInput_1); String layerName_sOGRInfoInput_1 = poLayer_sOGRInfoInput_1.GetName(); // Skip layer if a specific one is requested. if (!/** Start field sOGRInfoInput_1:LAYER */ ""/** End field sOGRInfoInput_1:LAYER */ .equals("") && !/** Start field sOGRInfoInput_1:LAYER */ ""/** End field sOGRInfoInput_1:LAYER */ .equals(layerName_sOGRInfoInput_1)) continue; if (poLayer_sOGRInfoInput_1 == null) { System.out.println( "FAILURE: Couldn't fetch advertised layer " + iLayer_sOGRInfoInput_1 + "!"); return; } org.gdal.ogr.FeatureDefn poDefn_sOGRInfoInput_1 = poLayer_sOGRInfoInput_1.GetLayerDefn(); geomType_sOGRInfoInput_1 = org.gdal.ogr.ogr .GeometryTypeToName(poDefn_sOGRInfoInput_1.GetGeomType()); nbFeatures_sOGRInfoInput_1 = poLayer_sOGRInfoInput_1.GetFeatureCount(); /* Handle Projection - lat/long transformation */ /* CRS TODO get EPSG code */ int pszWKT_sOGRInfoInput_1; proj_sOGRInfoInput_1 = poLayer_sOGRInfoInput_1.GetSpatialRef(); if (proj_sOGRInfoInput_1 == null) { pszWKT_sOGRInfoInput_1 = -1; } else { srs_sOGRInfoInput_1 = proj_sOGRInfoInput_1.ExportToPrettyWkt(); // First try: use AutoIdentifyEPSG and init GeoTools // CRS try { // This method inspects a WKT definition, and // adds EPSG authority nodes pszWKT_sOGRInfoInput_1 = proj_sOGRInfoInput_1.AutoIdentifyEPSG(); if ("EPSG".equals(proj_sOGRInfoInput_1.GetAuthorityName(null))) { epsg_code_sOGRInfoInput_1 = Integer.parseInt( poLayer_sOGRInfoInput_1.GetSpatialRef().GetAuthorityCode(null)); try { crs_sOGRInfoInput_1 = org.geotools.referencing.CRS .decode("EPSG:" + epsg_code_sOGRInfoInput_1); } catch (Exception e) { System.err.println(e.getMessage()); } } } catch (Exception e) { System.err.println("Error trying to identify SRS from EPSG code. Error is: " + e.getMessage() + ". Trying with WKT ..."); // Second try: use WKT and init GeoTools CRS try { if (srs_sOGRInfoInput_1 != null) { crs_sOGRInfoInput_1 = org.geotools.referencing.CRS .parseWKT(srs_sOGRInfoInput_1); } } catch (Exception e2) { System.err.println( "Error trying to identify SRS from WKT. Error is: " + e2.getMessage()); } pszWKT_sOGRInfoInput_1 = -1; } latlon_sOGRInfoInput_1 = proj_sOGRInfoInput_1.CloneGeogCS(); } if (latlon_sOGRInfoInput_1 != null) { org.gdal.gdal.gdal.PushErrorHandler("CPLQuietErrorHandler"); transform_sOGRInfoInput_1 = new org.gdal.osr.CoordinateTransformation( proj_sOGRInfoInput_1, latlon_sOGRInfoInput_1); org.gdal.gdal.gdal.PopErrorHandler(); latlon_sOGRInfoInput_1.delete(); if (org.gdal.gdal.gdal.GetLastErrorMsg() .indexOf("Unable to load PROJ.4 library") != -1) { transform_sOGRInfoInput_1 = null; } } if (poLayer_sOGRInfoInput_1.GetFIDColumn().length() > 0) fidColumn_sOGRInfoInput_1 = poLayer_sOGRInfoInput_1.GetFIDColumn(); if (poLayer_sOGRInfoInput_1.GetGeometryColumn().length() > 0) geomColumn_sOGRInfoInput_1 = poLayer_sOGRInfoInput_1.GetGeometryColumn(); for (int iAttr = 0; iAttr < poDefn_sOGRInfoInput_1.GetFieldCount(); iAttr++) { org.gdal.ogr.FieldDefn poField_sOGRInfoInput_1 = poDefn_sOGRInfoInput_1 .GetFieldDefn(iAttr); columnsDef_sOGRInfoInput_1 += poField_sOGRInfoInput_1.GetNameRef() + "#" + poField_sOGRInfoInput_1 .GetFieldTypeName(poField_sOGRInfoInput_1.GetFieldType()) + "#" + poField_sOGRInfoInput_1.GetWidth() + "." + poField_sOGRInfoInput_1.GetPrecision() + FS_sOGRInfoInput_1; } double oExt_sOGRInfoInput_1[] = poLayer_sOGRInfoInput_1.GetExtent(true); if (oExt_sOGRInfoInput_1 != null) { /* Compute extent */ corners_sOGRInfoInput_1 = new java.util.HashMap<String, double[]>(4); double[] upper_left_corner_sOGRInfoInput_1 = { oExt_sOGRInfoInput_1[0], oExt_sOGRInfoInput_1[3] }; double[] lower_left_corner_sOGRInfoInput_1 = { oExt_sOGRInfoInput_1[0], oExt_sOGRInfoInput_1[2] }; double[] upper_right_corner_sOGRInfoInput_1 = { oExt_sOGRInfoInput_1[1], oExt_sOGRInfoInput_1[3] }; double[] lower_right_corner_sOGRInfoInput_1 = { oExt_sOGRInfoInput_1[1], oExt_sOGRInfoInput_1[2] }; corners_sOGRInfoInput_1.put("upperLeft", upper_left_corner_sOGRInfoInput_1); corners_sOGRInfoInput_1.put("lowerLeft", lower_left_corner_sOGRInfoInput_1); corners_sOGRInfoInput_1.put("upperRight", upper_right_corner_sOGRInfoInput_1); corners_sOGRInfoInput_1.put("lowerRight", lower_right_corner_sOGRInfoInput_1); for (String corner_sOGRInfoInput_1 : corners_sOGRInfoInput_1.keySet()) { com.vividsolutions.jts.geom.Coordinate coord_sOGRInfoInput_1 = new com.vividsolutions.jts.geom.Coordinate(); coord_sOGRInfoInput_1.x = corners_sOGRInfoInput_1.get(corner_sOGRInfoInput_1)[0]; coord_sOGRInfoInput_1.y = corners_sOGRInfoInput_1.get(corner_sOGRInfoInput_1)[1]; geoXY_sOGRInfoInput_1.put(corner_sOGRInfoInput_1, coord_sOGRInfoInput_1); // lat/long transformation if (transform_sOGRInfoInput_1 != null) { double[] transPoint_sOGRInfoInput_1 = new double[3]; transform_sOGRInfoInput_1.TransformPoint(transPoint_sOGRInfoInput_1, coord_sOGRInfoInput_1.x, coord_sOGRInfoInput_1.y, 0); latlonXY_sOGRInfoInput_1.put(corner_sOGRInfoInput_1, new com.vividsolutions.jts.geom.Coordinate( transPoint_sOGRInfoInput_1[0], transPoint_sOGRInfoInput_1[1])); } } } fileRow.driver = driver_sOGRInfoInput_1.getName(); fileRow.files = datasetName_sOGRInfoInput_1; fileRow.layer_name = layerName_sOGRInfoInput_1; fileRow.fid_column = fidColumn_sOGRInfoInput_1; fileRow.geom_column = geomColumn_sOGRInfoInput_1; fileRow.columns_def = columnsDef_sOGRInfoInput_1; fileRow.geom_type = geomType_sOGRInfoInput_1; fileRow.srs = srs_sOGRInfoInput_1; fileRow.epsg_code = epsg_code_sOGRInfoInput_1; // the geo extent (Polygon) com.vividsolutions.jts.geom.Coordinate[] geoCoords_sOGRInfoInput_1 = new com.vividsolutions.jts.geom.Coordinate[5]; org.talend.sdi.geometry.Geometry geo_extent_sOGRInfoInput_1 = null; if (!geoXY_sOGRInfoInput_1.isEmpty()) { try { geoCoords_sOGRInfoInput_1[0] = geoXY_sOGRInfoInput_1.get("upperLeft"); geoCoords_sOGRInfoInput_1[1] = geoXY_sOGRInfoInput_1.get("lowerLeft"); geoCoords_sOGRInfoInput_1[2] = geoXY_sOGRInfoInput_1.get("lowerRight"); geoCoords_sOGRInfoInput_1[3] = geoXY_sOGRInfoInput_1.get("upperRight"); geoCoords_sOGRInfoInput_1[4] = geoXY_sOGRInfoInput_1.get("upperLeft"); geo_extent_sOGRInfoInput_1 = new org.talend.sdi.geometry.Geometry( (com.vividsolutions.jts.geom.Geometry) gFact_sOGRInfoInput_1.createPolygon( gFact_sOGRInfoInput_1.createLinearRing(geoCoords_sOGRInfoInput_1), null)); if (crs_sOGRInfoInput_1 != null) { geo_extent_sOGRInfoInput_1.setCRS(crs_sOGRInfoInput_1); } } catch (Exception e) { nbErrors_sOGRInfoInput_1++; errors_sOGRInfoInput_1 += "\n" + e.getMessage(); // TODO : catch error e.printStackTrace(); } } fileRow.geo_extent = geo_extent_sOGRInfoInput_1; // the lat/long extent (Polygon) org.talend.sdi.geometry.Geometry latlon_extent_sOGRInfoInput_1 = null; if (!latlonXY_sOGRInfoInput_1.isEmpty()) { try { com.vividsolutions.jts.geom.Coordinate[] latlonCoords_sOGRInfoInput_1 = new com.vividsolutions.jts.geom.Coordinate[5]; latlonCoords_sOGRInfoInput_1[0] = latlonXY_sOGRInfoInput_1.get("upperLeft"); latlonCoords_sOGRInfoInput_1[1] = latlonXY_sOGRInfoInput_1.get("lowerLeft"); latlonCoords_sOGRInfoInput_1[2] = latlonXY_sOGRInfoInput_1.get("lowerRight"); latlonCoords_sOGRInfoInput_1[3] = latlonXY_sOGRInfoInput_1.get("upperRight"); latlonCoords_sOGRInfoInput_1[4] = latlonXY_sOGRInfoInput_1.get("upperLeft"); latlon_extent_sOGRInfoInput_1 = new org.talend.sdi.geometry.Geometry( (com.vividsolutions.jts.geom.Geometry) gFact_sOGRInfoInput_1 .createPolygon(gFact_sOGRInfoInput_1 .createLinearRing(latlonCoords_sOGRInfoInput_1), null)); latlon_extent_sOGRInfoInput_1 .setCRS(org.geotools.referencing.CRS.decode("EPSG:4326")); } catch (Exception e) { nbErrors_sOGRInfoInput_1++; errors_sOGRInfoInput_1 += "\n" + e.getMessage(); // TODO : catch error e.printStackTrace(); } } fileRow.latlon_extent = latlon_extent_sOGRInfoInput_1; fileRow.nb_features = nbFeatures_sOGRInfoInput_1; fileRow.error = error_sOGRInfoInput_1; /** * [sOGRInfoInput_1 begin ] stop */ /** * [sOGRInfoInput_1 main ] start */ currentComponent = "sOGRInfoInput_1"; tos_count_sOGRInfoInput_1++; /** * [sOGRInfoInput_1 main ] stop */ /** * [tFlowToIterate_1 main ] start */ currentComponent = "tFlowToIterate_1"; globalMap.put("fileRow.driver", fileRow.driver); nb_line_tFlowToIterate_1++; globalMap.put("fileRow.files", fileRow.files); nb_line_tFlowToIterate_1++; globalMap.put("fileRow.layer_name", fileRow.layer_name); nb_line_tFlowToIterate_1++; globalMap.put("fileRow.fid_column", fileRow.fid_column); nb_line_tFlowToIterate_1++; globalMap.put("fileRow.geom_column", fileRow.geom_column); nb_line_tFlowToIterate_1++; globalMap.put("fileRow.columns_def", fileRow.columns_def); nb_line_tFlowToIterate_1++; globalMap.put("fileRow.geom_type", fileRow.geom_type); nb_line_tFlowToIterate_1++; globalMap.put("fileRow.srs", fileRow.srs); nb_line_tFlowToIterate_1++; globalMap.put("fileRow.epsg_code", fileRow.epsg_code); nb_line_tFlowToIterate_1++; globalMap.put("fileRow.geo_extent", fileRow.geo_extent); nb_line_tFlowToIterate_1++; globalMap.put("fileRow.latlon_extent", fileRow.latlon_extent); nb_line_tFlowToIterate_1++; globalMap.put("fileRow.nb_features", fileRow.nb_features); nb_line_tFlowToIterate_1++; globalMap.put("fileRow.error", fileRow.error); nb_line_tFlowToIterate_1++; counter_tFlowToIterate_1++; globalMap.put("tFlowToIterate_1_CURRENT_ITERATION", counter_tFlowToIterate_1); tos_count_tFlowToIterate_1++; /** * [tFlowToIterate_1 main ] stop */ NB_ITERATE_sOGRInfoInput_3++; /** * [tAdvancedFileOutputXML_2 begin ] start */ ok_Hash.put("tAdvancedFileOutputXML_2", false); start_Hash.put("tAdvancedFileOutputXML_2", System.currentTimeMillis()); currentComponent = "tAdvancedFileOutputXML_2"; int tos_count_tAdvancedFileOutputXML_2 = 0; int nb_line_tAFOX_2 = 0; boolean needRoot_tAFOX_2 = true; String fileName_tAFOX_2 = (context.generateMetadataInSeparateDir ? context.metadataDir + "/" + new java.io.File(context.file).getName() : context.file) + "_md_iso19115-3_" + System.currentTimeMillis() + ".xml"; Boolean alreadyExistsFile_tAFOX_2 = new java.io.File(fileName_tAFOX_2).exists(); fileName_tAFOX_2 = new java.io.File(fileName_tAFOX_2).getAbsolutePath().replace("\\", "/"); String file_tAFOX_2 = ""; if (fileName_tAFOX_2.indexOf("/") < 0) { throw new IllegalArgumentException("not a correct file name."); } else { String tail_tAFOX_2 = fileName_tAFOX_2.substring(fileName_tAFOX_2.lastIndexOf("/")); file_tAFOX_2 = tail_tAFOX_2.lastIndexOf(".") > 0 ? fileName_tAFOX_2.substring(0, fileName_tAFOX_2.lastIndexOf(".")) : fileName_tAFOX_2; } java.io.File createFiletAFOX_2 = new java.io.File(fileName_tAFOX_2); if (!createFiletAFOX_2.exists()) { (new java.io.File(fileName_tAFOX_2.substring(0, fileName_tAFOX_2.lastIndexOf("/")))) .mkdirs(); needRoot_tAFOX_2 = true; } java.util.List<java.util.List<String>> groupbyList_tAFOX_2 = new java.util.ArrayList<java.util.List<String>>(); java.util.Map<String, String> valueMap_tAFOX_2 = new java.util.HashMap<String, String>(); class NestXMLTool_tAFOX_2 { public void parseAndAdd(org.dom4j.Element nestRoot, String value) { try { org.dom4j.Document doc4Str = org.dom4j.DocumentHelper .parseText("<root>" + value + "</root>"); nestRoot.setContent(doc4Str.getRootElement().content()); } catch (java.lang.Exception e) { // e.printStackTrace(); nestRoot.setText(value); } } public void setText(org.dom4j.Element element, String value) { if (value.startsWith("<![CDATA[") && value.endsWith("]]>")) { String text = value.substring(9, value.length() - 3); element.addCDATA(text); } else { element.setText(value); } } public void appendContent(org.dom4j.Element element, org.dom4j.Document doc) { element.appendContent(doc); } public void replaceDefaultNameSpace(org.dom4j.Element nestRoot) { if (nestRoot != null) { boolean isDefaultNameSpaceAtRoot = "" .equals(nestRoot.getQName().getNamespace().getPrefix()); for (org.dom4j.Element tmp : (java.util.List<org.dom4j.Element>) nestRoot .elements()) { if (("").equals(tmp.getQName().getNamespace().getURI()) && ("").equals(tmp.getQName().getNamespace().getPrefix()) && isDefaultNameSpaceAtRoot) { tmp.setQName(org.dom4j.DocumentHelper.createQName(tmp.getName(), nestRoot.getQName().getNamespace())); } replaceDefaultNameSpace(tmp); } } } public void removeEmptyElement(org.dom4j.Element root) { if (root != null) { for (org.dom4j.Element tmp : (java.util.List<org.dom4j.Element>) root .elements()) { removeEmptyElement(tmp); } if (root.content().size() == 0 && root.attributes().size() == 0 && root.declaredNamespaces().size() == 0) { if (root.getParent() != null) { root.getParent().remove(root); } } } } /** * remove the whiteSpace Node between the elements * when appending the source file under dom4j * * @param root */ public void removeWhiteSpaceTextNode(org.dom4j.Element root) { if (root != null) { List<org.dom4j.Node> textNodes = new java.util.ArrayList<org.dom4j.Node>(); for (int i = 0; i < root.nodeCount(); i++) { if (root.node(i).getNodeType() == org.dom4j.Node.ELEMENT_NODE) { removeWhiteSpaceTextNode((org.dom4j.Element) root.node(i)); } else if (root.node(i).getNodeType() == org.dom4j.Node.TEXT_NODE) { textNodes.add(root.node(i)); } } if (root.nodeCount() > 1) { // when // root.nodeCount==1, // that means // the text node // is the // content of // the element for (org.dom4j.Node textNode : textNodes) { if (textNode.getText() == null || "".equals(textNode.getText().trim())) { root.remove(textNode); } } } } } } NestXMLTool_tAFOX_2 nestXMLTool_tAFOX_2 = new NestXMLTool_tAFOX_2(); // sort group root element for judgement of group java.util.List<org.dom4j.Element> groupElementList_tAFOX_2 = new java.util.ArrayList<org.dom4j.Element>(); org.dom4j.Element root4Group_tAFOX_2 = null; org.dom4j.Document doc_tAFOX_2 = null; doc_tAFOX_2 = org.dom4j.DocumentHelper.createDocument(); org.dom4j.io.OutputFormat format_tAFOX_2 = org.dom4j.io.OutputFormat.createPrettyPrint(); format_tAFOX_2.setTrimText(false); format_tAFOX_2.setEncoding("UTF-8"); int[] orders_tAFOX_2 = new int[1]; /** * [tAdvancedFileOutputXML_2 begin ] stop */ /** * [tLogRow_2 begin ] start */ ok_Hash.put("tLogRow_2", false); start_Hash.put("tLogRow_2", System.currentTimeMillis()); currentComponent = "tLogRow_2"; int tos_count_tLogRow_2 = 0; /** * [tLogRow_2 begin ] stop */ /** * [tExtractDelimitedFields_3 begin ] start */ ok_Hash.put("tExtractDelimitedFields_3", false); start_Hash.put("tExtractDelimitedFields_3", System.currentTimeMillis()); currentComponent = "tExtractDelimitedFields_3"; int tos_count_tExtractDelimitedFields_3 = 0; int nb_line_tExtractDelimitedFields_3 = 0; /** * [tExtractDelimitedFields_3 begin ] stop */ /** * [tNormalize_1 begin ] start */ ok_Hash.put("tNormalize_1", false); start_Hash.put("tNormalize_1", System.currentTimeMillis()); currentComponent = "tNormalize_1"; int tos_count_tNormalize_1 = 0; int nb_line_tNormalize_1 = 0; String tmp_tNormalize_1 = null; StringBuilder currentRecord_tNormalize_1 = null; String[] normalizeRecord_tNormalize_1 = null; java.util.Set<String> recordSet_tNormalize_1 = new java.util.HashSet<String>(); /** * [tNormalize_1 begin ] stop */ /** * [tMap_1 begin ] start */ ok_Hash.put("tMap_1", false); start_Hash.put("tMap_1", System.currentTimeMillis()); currentComponent = "tMap_1"; int tos_count_tMap_1 = 0; // ############################### // # Lookup's keys initialization org.talend.designer.components.lookup.memory.AdvancedMemoryLookup<metadataPropertiesStruct> tHash_Lookup_metadataProperties = (org.talend.designer.components.lookup.memory.AdvancedMemoryLookup<metadataPropertiesStruct>) ((org.talend.designer.components.lookup.memory.AdvancedMemoryLookup<metadataPropertiesStruct>) globalMap .get("tHash_Lookup_metadataProperties")); tHash_Lookup_metadataProperties.initGet(); metadataPropertiesStruct metadataPropertiesHashKey = new metadataPropertiesStruct(); metadataPropertiesStruct metadataPropertiesDefault = new metadataPropertiesStruct(); // ############################### // ############################### // # Vars initialization class Var__tMap_1__Struct { String dateStamp; String srs; String title; String west; String east; String south; String north; String filepath; String filename; String uuidbase; String mdUuid; String fcatUuid; String mdIndividualName; String mdOrganisation; String mdPositionName; String mdVoice; String mdDeliveryPoint; String mdCity; String mdAdministrativeArea; String mdPostalCode; String mdCountry; String mdEmail; String individualName; String organisationName; String positionName; String voice; String deliveryPoint; String city; String administrativeArea; String postalCode; String country; String email; } Var__tMap_1__Struct Var__tMap_1 = new Var__tMap_1__Struct(); // ############################### // ############################### // # Outputs initialization iso19115_3Struct iso19115_3_tmp = new iso19115_3Struct(); // ############################### /** * [tMap_1 begin ] stop */ /** * [tLogRow_1 begin ] start */ ok_Hash.put("tLogRow_1", false); start_Hash.put("tLogRow_1", System.currentTimeMillis()); currentComponent = "tLogRow_1"; int tos_count_tLogRow_1 = 0; /** * [tLogRow_1 begin ] stop */ /** * [tReplaceList_1 begin ] start */ ok_Hash.put("tReplaceList_1", false); start_Hash.put("tReplaceList_1", System.currentTimeMillis()); currentComponent = "tReplaceList_1"; int tos_count_tReplaceList_1 = 0; java.util.Map<geometryTypeStruct, geometryTypeStruct> tMap_geometryType_tReplaceList_1 = (java.util.Map<geometryTypeStruct, geometryTypeStruct>) globalMap .get("tHash_geometryType"); java.util.Map<String, String> replace_tReplaceList_1 = new java.util.HashMap<String, String>(); for (Object o : tMap_geometryType_tReplaceList_1.keySet()) { String search = tMap_geometryType_tReplaceList_1.get(o).OGR_TYPE; String replacement = tMap_geometryType_tReplaceList_1.get(o).ISO_TYPE; replace_tReplaceList_1.put(search, replacement); } /** * [tReplaceList_1 begin ] stop */ /** * [sOGRInfoInput_3 begin ] start */ ok_Hash.put("sOGRInfoInput_3", false); start_Hash.put("sOGRInfoInput_3", System.currentTimeMillis()); currentComponent = "sOGRInfoInput_3"; int tos_count_sOGRInfoInput_3 = 0; // Fixed number of line. Only one row to extract // information. int nb_line_sOGRInfoInput_3 = 1; /* Initialize OGR main variables */ org.gdal.ogr.DataSource dataset_sOGRInfoInput_3 = null; org.gdal.ogr.Driver driver_sOGRInfoInput_3 = null; org.gdal.osr.SpatialReference proj_sOGRInfoInput_3, latlon_sOGRInfoInput_3 = null; org.gdal.osr.CoordinateTransformation transform_sOGRInfoInput_3 = null; boolean bReadOnly_sOGRInfoInput_3 = true; /* Initialize JTS main variables */ com.vividsolutions.jts.geom.GeometryFactory gFact_sOGRInfoInput_3 = new com.vividsolutions.jts.geom.GeometryFactory(); /* Initialize variables */ String srs_sOGRInfoInput_3 = null; org.opengis.referencing.crs.CoordinateReferenceSystem crs_sOGRInfoInput_3 = null; // Default SRS EPSG code, if none is found int epsg_code_sOGRInfoInput_3 = -1; String datasetName_sOGRInfoInput_3 = /** * Start field * sOGRInfoInput_3:FILENAME */ context.file/** End field sOGRInfoInput_3:FILENAME */ ; String FS_sOGRInfoInput_3 = /** * Start field * sOGRInfoInput_3:FIELD_SEPARATOR */ "|"/** End field sOGRInfoInput_3:FIELD_SEPARATOR */ ; String error_sOGRInfoInput_3 = ""; String geomType_sOGRInfoInput_3 = ""; String fidColumn_sOGRInfoInput_3 = ""; String geomColumn_sOGRInfoInput_3 = ""; String columnsDef_sOGRInfoInput_3 = ""; int nbFeatures_sOGRInfoInput_3 = 0; int nbErrors_sOGRInfoInput_3 = 0; String errors_sOGRInfoInput_3 = ""; java.util.HashMap<String, double[]> corners_sOGRInfoInput_3; java.util.HashMap<String, com.vividsolutions.jts.geom.Coordinate> geoXY_sOGRInfoInput_3; java.util.HashMap<String, com.vividsolutions.jts.geom.Coordinate> latlonXY_sOGRInfoInput_3; // Register all known configured GDAL drivers. try { org.gdal.ogr.ogr.RegisterAll(); } catch (java.lang.UnsatisfiedLinkError e) { System.err.println( "In order to use GDAL/OGR in Talend, the java.library.path variable should point to GDAL library."); System.err.println( "To set this property, go to the Run view > Advanced settings > Use specific JVM Arguments"); System.err.println("and add a new argument:"); System.err.println(" -Djava.library.path=/path/to/gdal/swig/java"); System.err.println(""); e.printStackTrace(); // Aborting due to wrong GDAL driver configuration throw e; } // Open an OGR dataset // dataset_sOGRInfoInput_3 = // org.gdal.gdal.gdal.Open(datasetName_sOGRInfoInput_3, // org.gdal.gdalconst.gdalconstConstants.GA_ReadOnly); /* get feature source from store */ dataset_sOGRInfoInput_3 = org.gdal.ogr.ogr.Open(datasetName_sOGRInfoInput_3, !bReadOnly_sOGRInfoInput_3); if (dataset_sOGRInfoInput_3 == null) { error_sOGRInfoInput_3 = "FAILURE:" + "Unable to open datasource `" + datasetName_sOGRInfoInput_3 + "' with the OGR drivers."; // TODO : report in reject output System.err.println(error_sOGRInfoInput_3); for (int iDriver = 0; iDriver < org.gdal.ogr.ogr.GetDriverCount(); iDriver++) { System.err.println(" -> " + org.gdal.ogr.ogr.GetDriver(iDriver).GetName()); } } else { // Get current GDAL driver driver_sOGRInfoInput_3 = dataset_sOGRInfoInput_3.GetDriver(); geoXY_sOGRInfoInput_3 = new java.util.HashMap<String, com.vividsolutions.jts.geom.Coordinate>( 4); latlonXY_sOGRInfoInput_3 = new java.util.HashMap<String, com.vividsolutions.jts.geom.Coordinate>( 4); for (int iLayer_sOGRInfoInput_3 = 0; iLayer_sOGRInfoInput_3 < dataset_sOGRInfoInput_3 .GetLayerCount(); iLayer_sOGRInfoInput_3++) { org.gdal.ogr.Layer poLayer_sOGRInfoInput_3 = dataset_sOGRInfoInput_3 .GetLayer(iLayer_sOGRInfoInput_3); String layerName_sOGRInfoInput_3 = poLayer_sOGRInfoInput_3.GetName(); // Skip layer if a specific one is requested. if (!/** Start field sOGRInfoInput_3:LAYER */ ((String) globalMap.get("fileRow.layer_name"))/** * * End field sOGRInfoInput_3:LAYER */ .equals("") && !/** * Start field * sOGRInfoInput_3:LAYER */ ((String) globalMap.get("fileRow.layer_name"))/** * * End field sOGRInfoInput_3:LAYER */ .equals(layerName_sOGRInfoInput_3)) continue; if (poLayer_sOGRInfoInput_3 == null) { System.out.println("FAILURE: Couldn't fetch advertised layer " + iLayer_sOGRInfoInput_3 + "!"); return; } org.gdal.ogr.FeatureDefn poDefn_sOGRInfoInput_3 = poLayer_sOGRInfoInput_3 .GetLayerDefn(); geomType_sOGRInfoInput_3 = org.gdal.ogr.ogr .GeometryTypeToName(poDefn_sOGRInfoInput_3.GetGeomType()); nbFeatures_sOGRInfoInput_3 = poLayer_sOGRInfoInput_3.GetFeatureCount(); /* Handle Projection - lat/long transformation */ /* CRS TODO get EPSG code */ int pszWKT_sOGRInfoInput_3; proj_sOGRInfoInput_3 = poLayer_sOGRInfoInput_3.GetSpatialRef(); if (proj_sOGRInfoInput_3 == null) { pszWKT_sOGRInfoInput_3 = -1; } else { srs_sOGRInfoInput_3 = proj_sOGRInfoInput_3.ExportToPrettyWkt(); // First try: use AutoIdentifyEPSG and init // GeoTools CRS try { // This method inspects a WKT // definition, and adds EPSG authority // nodes pszWKT_sOGRInfoInput_3 = proj_sOGRInfoInput_3.AutoIdentifyEPSG(); if ("EPSG".equals(proj_sOGRInfoInput_3.GetAuthorityName(null))) { epsg_code_sOGRInfoInput_3 = Integer.parseInt( poLayer_sOGRInfoInput_3.GetSpatialRef().GetAuthorityCode(null)); try { crs_sOGRInfoInput_3 = org.geotools.referencing.CRS .decode("EPSG:" + epsg_code_sOGRInfoInput_3); } catch (Exception e) { System.err.println(e.getMessage()); } } } catch (Exception e) { System.err.println("Error trying to identify SRS from EPSG code. Error is: " + e.getMessage() + ". Trying with WKT ..."); // Second try: use WKT and init GeoTools // CRS try { if (srs_sOGRInfoInput_3 != null) { crs_sOGRInfoInput_3 = org.geotools.referencing.CRS .parseWKT(srs_sOGRInfoInput_3); } } catch (Exception e2) { System.err.println("Error trying to identify SRS from WKT. Error is: " + e2.getMessage()); } pszWKT_sOGRInfoInput_3 = -1; } latlon_sOGRInfoInput_3 = proj_sOGRInfoInput_3.CloneGeogCS(); } if (latlon_sOGRInfoInput_3 != null) { org.gdal.gdal.gdal.PushErrorHandler("CPLQuietErrorHandler"); transform_sOGRInfoInput_3 = new org.gdal.osr.CoordinateTransformation( proj_sOGRInfoInput_3, latlon_sOGRInfoInput_3); org.gdal.gdal.gdal.PopErrorHandler(); latlon_sOGRInfoInput_3.delete(); if (org.gdal.gdal.gdal.GetLastErrorMsg() .indexOf("Unable to load PROJ.4 library") != -1) { transform_sOGRInfoInput_3 = null; } } if (poLayer_sOGRInfoInput_3.GetFIDColumn().length() > 0) fidColumn_sOGRInfoInput_3 = poLayer_sOGRInfoInput_3.GetFIDColumn(); if (poLayer_sOGRInfoInput_3.GetGeometryColumn().length() > 0) geomColumn_sOGRInfoInput_3 = poLayer_sOGRInfoInput_3.GetGeometryColumn(); for (int iAttr = 0; iAttr < poDefn_sOGRInfoInput_3.GetFieldCount(); iAttr++) { org.gdal.ogr.FieldDefn poField_sOGRInfoInput_3 = poDefn_sOGRInfoInput_3 .GetFieldDefn(iAttr); columnsDef_sOGRInfoInput_3 += poField_sOGRInfoInput_3.GetNameRef() + "#" + poField_sOGRInfoInput_3 .GetFieldTypeName(poField_sOGRInfoInput_3.GetFieldType()) + "#" + poField_sOGRInfoInput_3.GetWidth() + "." + poField_sOGRInfoInput_3.GetPrecision() + FS_sOGRInfoInput_3; } double oExt_sOGRInfoInput_3[] = poLayer_sOGRInfoInput_3.GetExtent(true); if (oExt_sOGRInfoInput_3 != null) { /* Compute extent */ corners_sOGRInfoInput_3 = new java.util.HashMap<String, double[]>(4); double[] upper_left_corner_sOGRInfoInput_3 = { oExt_sOGRInfoInput_3[0], oExt_sOGRInfoInput_3[3] }; double[] lower_left_corner_sOGRInfoInput_3 = { oExt_sOGRInfoInput_3[0], oExt_sOGRInfoInput_3[2] }; double[] upper_right_corner_sOGRInfoInput_3 = { oExt_sOGRInfoInput_3[1], oExt_sOGRInfoInput_3[3] }; double[] lower_right_corner_sOGRInfoInput_3 = { oExt_sOGRInfoInput_3[1], oExt_sOGRInfoInput_3[2] }; corners_sOGRInfoInput_3.put("upperLeft", upper_left_corner_sOGRInfoInput_3); corners_sOGRInfoInput_3.put("lowerLeft", lower_left_corner_sOGRInfoInput_3); corners_sOGRInfoInput_3.put("upperRight", upper_right_corner_sOGRInfoInput_3); corners_sOGRInfoInput_3.put("lowerRight", lower_right_corner_sOGRInfoInput_3); for (String corner_sOGRInfoInput_3 : corners_sOGRInfoInput_3.keySet()) { com.vividsolutions.jts.geom.Coordinate coord_sOGRInfoInput_3 = new com.vividsolutions.jts.geom.Coordinate(); coord_sOGRInfoInput_3.x = corners_sOGRInfoInput_3 .get(corner_sOGRInfoInput_3)[0]; coord_sOGRInfoInput_3.y = corners_sOGRInfoInput_3 .get(corner_sOGRInfoInput_3)[1]; geoXY_sOGRInfoInput_3.put(corner_sOGRInfoInput_3, coord_sOGRInfoInput_3); // lat/long transformation if (transform_sOGRInfoInput_3 != null) { double[] transPoint_sOGRInfoInput_3 = new double[3]; transform_sOGRInfoInput_3.TransformPoint(transPoint_sOGRInfoInput_3, coord_sOGRInfoInput_3.x, coord_sOGRInfoInput_3.y, 0); latlonXY_sOGRInfoInput_3.put(corner_sOGRInfoInput_3, new com.vividsolutions.jts.geom.Coordinate( transPoint_sOGRInfoInput_3[0], transPoint_sOGRInfoInput_3[1])); } } } layerRow.driver = driver_sOGRInfoInput_3.getName(); layerRow.files = datasetName_sOGRInfoInput_3; layerRow.layer_name = layerName_sOGRInfoInput_3; layerRow.fid_column = fidColumn_sOGRInfoInput_3; layerRow.geom_column = geomColumn_sOGRInfoInput_3; layerRow.columns_def = columnsDef_sOGRInfoInput_3; layerRow.geom_type = geomType_sOGRInfoInput_3; layerRow.srs = srs_sOGRInfoInput_3; layerRow.epsg_code = epsg_code_sOGRInfoInput_3; // the geo extent (Polygon) com.vividsolutions.jts.geom.Coordinate[] geoCoords_sOGRInfoInput_3 = new com.vividsolutions.jts.geom.Coordinate[5]; org.talend.sdi.geometry.Geometry geo_extent_sOGRInfoInput_3 = null; if (!geoXY_sOGRInfoInput_3.isEmpty()) { try { geoCoords_sOGRInfoInput_3[0] = geoXY_sOGRInfoInput_3.get("upperLeft"); geoCoords_sOGRInfoInput_3[1] = geoXY_sOGRInfoInput_3.get("lowerLeft"); geoCoords_sOGRInfoInput_3[2] = geoXY_sOGRInfoInput_3.get("lowerRight"); geoCoords_sOGRInfoInput_3[3] = geoXY_sOGRInfoInput_3.get("upperRight"); geoCoords_sOGRInfoInput_3[4] = geoXY_sOGRInfoInput_3.get("upperLeft"); geo_extent_sOGRInfoInput_3 = new org.talend.sdi.geometry.Geometry( (com.vividsolutions.jts.geom.Geometry) gFact_sOGRInfoInput_3 .createPolygon(gFact_sOGRInfoInput_3.createLinearRing( geoCoords_sOGRInfoInput_3), null)); if (crs_sOGRInfoInput_3 != null) { geo_extent_sOGRInfoInput_3.setCRS(crs_sOGRInfoInput_3); } } catch (Exception e) { nbErrors_sOGRInfoInput_3++; errors_sOGRInfoInput_3 += "\n" + e.getMessage(); // TODO : catch error e.printStackTrace(); } } layerRow.geo_extent = geo_extent_sOGRInfoInput_3; // the lat/long extent (Polygon) org.talend.sdi.geometry.Geometry latlon_extent_sOGRInfoInput_3 = null; if (!latlonXY_sOGRInfoInput_3.isEmpty()) { try { com.vividsolutions.jts.geom.Coordinate[] latlonCoords_sOGRInfoInput_3 = new com.vividsolutions.jts.geom.Coordinate[5]; latlonCoords_sOGRInfoInput_3[0] = latlonXY_sOGRInfoInput_3.get("upperLeft"); latlonCoords_sOGRInfoInput_3[1] = latlonXY_sOGRInfoInput_3.get("lowerLeft"); latlonCoords_sOGRInfoInput_3[2] = latlonXY_sOGRInfoInput_3 .get("lowerRight"); latlonCoords_sOGRInfoInput_3[3] = latlonXY_sOGRInfoInput_3 .get("upperRight"); latlonCoords_sOGRInfoInput_3[4] = latlonXY_sOGRInfoInput_3.get("upperLeft"); latlon_extent_sOGRInfoInput_3 = new org.talend.sdi.geometry.Geometry( (com.vividsolutions.jts.geom.Geometry) gFact_sOGRInfoInput_3 .createPolygon(gFact_sOGRInfoInput_3.createLinearRing( latlonCoords_sOGRInfoInput_3), null)); latlon_extent_sOGRInfoInput_3 .setCRS(org.geotools.referencing.CRS.decode("EPSG:4326")); } catch (Exception e) { nbErrors_sOGRInfoInput_3++; errors_sOGRInfoInput_3 += "\n" + e.getMessage(); // TODO : catch error e.printStackTrace(); } } layerRow.latlon_extent = latlon_extent_sOGRInfoInput_3; layerRow.nb_features = nbFeatures_sOGRInfoInput_3; layerRow.error = error_sOGRInfoInput_3; /** * [sOGRInfoInput_3 begin ] stop */ /** * [sOGRInfoInput_3 main ] start */ currentComponent = "sOGRInfoInput_3"; tos_count_sOGRInfoInput_3++; /** * [sOGRInfoInput_3 main ] stop */ /** * [tReplaceList_1 main ] start */ currentComponent = "tReplaceList_1"; String inputFlow_tReplaceList_1_geom_type = String.valueOf(layerRow.geom_type); for (Object o : replace_tReplaceList_1.keySet()) { if (o.getClass().getSimpleName().equals("String")) { String searchtReplaceList_1 = String.valueOf(o); if (replace_tReplaceList_1.get(o).getClass().getSimpleName() .equals("String")) { String replacetReplaceList_1 = String .valueOf(replace_tReplaceList_1.get(o)); inputFlow_tReplaceList_1_geom_type = inputFlow_tReplaceList_1_geom_type .replaceAll(searchtReplaceList_1, replacetReplaceList_1); } } } layerRow.geom_type = String.valueOf(inputFlow_tReplaceList_1_geom_type); row1 = layerRow; tos_count_tReplaceList_1++; /** * [tReplaceList_1 main ] stop */ /** * [tLogRow_1 main ] start */ currentComponent = "tLogRow_1"; fromActualFile = row1; tos_count_tLogRow_1++; /** * [tLogRow_1 main ] stop */ /** * [tMap_1 main ] start */ currentComponent = "tMap_1"; boolean hasCasePrimitiveKeyWithNull_tMap_1 = false; // ############################### // # Input tables (lookups) boolean rejectedInnerJoin_tMap_1 = false; boolean mainRowRejected_tMap_1 = false; // ///////////////////////////////////////////// // Starting Lookup Table "metadataProperties" // ///////////////////////////////////////////// boolean forceLoopmetadataProperties = false; metadataPropertiesStruct metadataPropertiesObjectFromLookup = null; if (!rejectedInnerJoin_tMap_1) { // G_TM_M_020 tHash_Lookup_metadataProperties.lookup(metadataPropertiesHashKey); if (!tHash_Lookup_metadataProperties.hasNext()) { // G_TM_M_090 forceLoopmetadataProperties = true; } // G_TM_M_090 } // G_TM_M_020 else { // G 20 - G 21 forceLoopmetadataProperties = true; } // G 21 metadataPropertiesStruct metadataProperties = null; while ((tHash_Lookup_metadataProperties != null && tHash_Lookup_metadataProperties.hasNext()) || forceLoopmetadataProperties) { // G_TM_M_043 // CALL close loop of lookup // 'metadataProperties' metadataPropertiesStruct fromLookup_metadataProperties = null; metadataProperties = metadataPropertiesDefault; if (!forceLoopmetadataProperties) { // G 46 fromLookup_metadataProperties = tHash_Lookup_metadataProperties.next(); if (fromLookup_metadataProperties != null) { metadataProperties = fromLookup_metadataProperties; } if (!rejectedInnerJoin_tMap_1 && !( "geo".equals(metadataProperties.dataType) ) ) { // G 016 fromLookup_metadataProperties = null; metadataProperties = metadataPropertiesDefault; } // G 016 if (fromLookup_metadataProperties == null && !rejectedInnerJoin_tMap_1) { // G // 017 continue; } // G 017 } // G 46 forceLoopmetadataProperties = false; // ############################### { // start of Var scope // ############################### // # Vars tables Var__tMap_1__Struct Var = Var__tMap_1; Var.dateStamp = TalendDate.formatDate("yyyy-MM-dd'T'HH:mm:ss", TalendDate.getCurrentDate()); Var.srs = fromActualFile.epsg_code == -1 ? context.defaultProjection : "EPSG:" + fromActualFile.epsg_code; Var.title = context.titlePrefixVector + fromActualFile.layer_name; Var.west = fromActualFile.latlon_extent != null ? GeometryOperation.GETCOORDINATE(fromActualFile.latlon_extent, 0, "X") + "" : (context.defaultProjection != null && fromActualFile.geo_extent != null ? GeometryOperation.GETCOORDINATE(GeometryOperation .PROJ(fromActualFile.geo_extent, context.defaultProjection, "EPSG:4326", false), 0, "X") + "" : context.defaultXMin); Var.east = fromActualFile.latlon_extent != null ? GeometryOperation.GETCOORDINATE(fromActualFile.latlon_extent, 2, "X") + "" : (context.defaultProjection != null && fromActualFile.geo_extent != null ? GeometryOperation.GETCOORDINATE(GeometryOperation .PROJ(fromActualFile.geo_extent, context.defaultProjection, "EPSG:4326", false), 2, "X") + "" : context.defaultXMax); Var.south = fromActualFile.latlon_extent != null ? GeometryOperation.GETCOORDINATE(fromActualFile.latlon_extent, 2, "Y") + "" : (context.defaultProjection != null && fromActualFile.geo_extent != null ? GeometryOperation.GETCOORDINATE(GeometryOperation .PROJ(fromActualFile.geo_extent, context.defaultProjection, "EPSG:4326", false), 2, "Y") + "" : context.defaultYMin); Var.north = fromActualFile.latlon_extent != null ? GeometryOperation.GETCOORDINATE(fromActualFile.latlon_extent, 0, "Y") + "" : (context.defaultProjection != null && fromActualFile.geo_extent != null ? GeometryOperation.GETCOORDINATE(GeometryOperation .PROJ(fromActualFile.geo_extent, context.defaultProjection, "EPSG:4326", false), 0, "Y") + "" : context.defaultYMax); Var.filepath = context.file; Var.filename = new java.io.File(context.file).getName(); Var.uuidbase = Var.filename + "#" + fromActualFile.layer_name; Var.mdUuid = Utility.sha256Digest(Var.uuidbase); Var.fcatUuid = Utility.sha256Digest(Var.uuidbase + "#iso19319"); Var.mdIndividualName = ExtractorStringUtils.returnFirstNotNullOrBlank( context.mdIndividualName, metadataProperties.mdIndividualName); Var.mdOrganisation = ExtractorStringUtils.returnFirstNotNullOrBlank( context.mdOrganisation, metadataProperties.organisationName); Var.mdPositionName = ExtractorStringUtils.returnFirstNotNullOrBlank( context.mdPositionName, metadataProperties.mdPositionName); Var.mdVoice = ExtractorStringUtils.returnFirstNotNullOrBlank( context.mdVoice, metadataProperties.mdVoice); Var.mdDeliveryPoint = ExtractorStringUtils.returnFirstNotNullOrBlank( context.mdDeliveryPoint, metadataProperties.mdDeliveryPoint); Var.mdCity = ExtractorStringUtils.returnFirstNotNullOrBlank(context.mdCity, metadataProperties.mdCity); Var.mdAdministrativeArea = ExtractorStringUtils.returnFirstNotNullOrBlank( context.mdAdministrativeArea, metadataProperties.mdAdministrativeArea); Var.mdPostalCode = ExtractorStringUtils.returnFirstNotNullOrBlank( context.mdPostalCode, metadataProperties.mdPostalCode); Var.mdCountry = ExtractorStringUtils.returnFirstNotNullOrBlank( context.mdCountry, metadataProperties.mdCountry); Var.mdEmail = ExtractorStringUtils.returnFirstNotNullOrBlank( context.mdEmail, metadataProperties.mdEmail); Var.individualName = ExtractorStringUtils.returnFirstNotNullOrBlank( context.individualName, metadataProperties.individualName); Var.organisationName = ExtractorStringUtils.returnFirstNotNullOrBlank( context.organisationName, metadataProperties.organisationName); Var.positionName = ExtractorStringUtils.returnFirstNotNullOrBlank( context.positionName, metadataProperties.positionName); Var.voice = ExtractorStringUtils.returnFirstNotNullOrBlank(context.voice, metadataProperties.voice); Var.deliveryPoint = ExtractorStringUtils.returnFirstNotNullOrBlank( context.deliveryPoint, metadataProperties.deliveryPoint); Var.city = ExtractorStringUtils.returnFirstNotNullOrBlank(context.city, metadataProperties.city); Var.administrativeArea = ExtractorStringUtils.returnFirstNotNullOrBlank( context.administrativeArea, metadataProperties.adminArea); Var.postalCode = ExtractorStringUtils.returnFirstNotNullOrBlank( context.postalCode, metadataProperties.postalCode); Var.country = ExtractorStringUtils.returnFirstNotNullOrBlank( context.country, metadataProperties.country); Var.email = ExtractorStringUtils.returnFirstNotNullOrBlank(context.email, metadataProperties.email);// ############################### // ############################### // # Output tables iso19115_3 = null; // # Output table : 'iso19115_3' iso19115_3_tmp.mdIdentifier = Var.mdUuid; iso19115_3_tmp.mdLanguage = null; iso19115_3_tmp.mdCharacterSetCode = null; iso19115_3_tmp.ciRoleCode = null; iso19115_3_tmp.mdOrganisation = Var.mdOrganisation; iso19115_3_tmp.mdVoice = Var.mdVoice; iso19115_3_tmp.mdIndividualName = Var.mdIndividualName; iso19115_3_tmp.mdPositionName = Var.mdPositionName; iso19115_3_tmp.mdDeliveryPoint = Var.mdDeliveryPoint; iso19115_3_tmp.mdCity = Var.mdCity; iso19115_3_tmp.mdAdministrativeArea = Var.mdAdministrativeArea; iso19115_3_tmp.mdPostalCode = Var.mdPostalCode; iso19115_3_tmp.mdCountry = Var.mdCountry; iso19115_3_tmp.mdEmail = Var.mdEmail; iso19115_3_tmp.mdDate = Var.dateStamp; iso19115_3_tmp.title = Var.title; iso19115_3_tmp.organisationName = Var.organisationName; iso19115_3_tmp.voice = Var.voice; iso19115_3_tmp.email = Var.email; iso19115_3_tmp.individualName = Var.individualName; iso19115_3_tmp.positionName = Var.positionName; iso19115_3_tmp.deliveryPoint = Var.deliveryPoint; iso19115_3_tmp.city = Var.city; iso19115_3_tmp.administrativeArea = Var.administrativeArea; iso19115_3_tmp.postalCode = Var.postalCode; iso19115_3_tmp.country = Var.country; iso19115_3_tmp.spatialRepresentationType = null; iso19115_3_tmp.scaleDenominator = metadataProperties.scaleDenominator; iso19115_3_tmp.topicCategoryCode = metadataProperties.topicCategoryCode; iso19115_3_tmp.west = Var.west; iso19115_3_tmp.east = Var.east; iso19115_3_tmp.south = Var.south; iso19115_3_tmp.north = Var.north; iso19115_3_tmp.mdMaintenanceFrequencyCode = null; iso19115_3_tmp.keyword = metadataProperties.keyword; iso19115_3_tmp.keyword2 = metadataProperties.keyword2; iso19115_3_tmp.keyword1_theme = null; iso19115_3_tmp.keyword2_theme = null; iso19115_3_tmp.useConstraints = metadataProperties.useConstraints; iso19115_3_tmp.scopeCode = null; iso19115_3_tmp.lineage = null; iso19115_3_tmp.srs = Var.srs; iso19115_3_tmp.columnsDef = fromActualFile.columns_def; iso19115_3_tmp.layerName = fromActualFile.layer_name; iso19115_3_tmp.bands = null; iso19115_3 = iso19115_3_tmp; // ############################### } // end of Var scope rejectedInnerJoin_tMap_1 = false; tos_count_tMap_1++; /** * [tMap_1 main ] stop */ // Start of branch "iso19115_3" if (iso19115_3 != null) { /** * [tNormalize_1 main ] start */ currentComponent = "tNormalize_1"; normalizeRecord_tNormalize_1 = new String[1]; if (iso19115_3.columnsDef != null) { if ("".equals(iso19115_3.columnsDef)) { normalizeRecord_tNormalize_1[0] = ""; } else { normalizeRecord_tNormalize_1 = iso19115_3.columnsDef.split("\\|", -1); } } int lastNoEmptyIndex_tNormalize_1 = normalizeRecord_tNormalize_1.length; for (int i_tNormalize_1 = 0; i_tNormalize_1 < lastNoEmptyIndex_tNormalize_1; i_tNormalize_1++) { currentRecord_tNormalize_1 = new StringBuilder(); nb_line_tNormalize_1++; row2.mdIdentifier = iso19115_3.mdIdentifier; row2.mdLanguage = iso19115_3.mdLanguage; row2.mdCharacterSetCode = iso19115_3.mdCharacterSetCode; row2.ciRoleCode = iso19115_3.ciRoleCode; row2.mdOrganisation = iso19115_3.mdOrganisation; row2.mdVoice = iso19115_3.mdVoice; row2.mdIndividualName = iso19115_3.mdIndividualName; row2.mdPositionName = iso19115_3.mdPositionName; row2.mdDeliveryPoint = iso19115_3.mdDeliveryPoint; row2.mdCity = iso19115_3.mdCity; row2.mdAdministrativeArea = iso19115_3.mdAdministrativeArea; row2.mdPostalCode = iso19115_3.mdPostalCode; row2.mdCountry = iso19115_3.mdCountry; row2.mdEmail = iso19115_3.mdEmail; row2.mdDate = iso19115_3.mdDate; row2.title = iso19115_3.title; row2.organisationName = iso19115_3.organisationName; row2.voice = iso19115_3.voice; row2.email = iso19115_3.email; row2.individualName = iso19115_3.individualName; row2.positionName = iso19115_3.positionName; row2.deliveryPoint = iso19115_3.deliveryPoint; row2.city = iso19115_3.city; row2.administrativeArea = iso19115_3.administrativeArea; row2.postalCode = iso19115_3.postalCode; row2.country = iso19115_3.country; row2.spatialRepresentationType = iso19115_3.spatialRepresentationType; row2.scaleDenominator = iso19115_3.scaleDenominator; row2.topicCategoryCode = iso19115_3.topicCategoryCode; row2.west = iso19115_3.west; row2.east = iso19115_3.east; row2.south = iso19115_3.south; row2.north = iso19115_3.north; row2.mdMaintenanceFrequencyCode = iso19115_3.mdMaintenanceFrequencyCode; row2.keyword = iso19115_3.keyword; row2.keyword2 = iso19115_3.keyword2; row2.keyword1_theme = iso19115_3.keyword1_theme; row2.keyword2_theme = iso19115_3.keyword2_theme; row2.useConstraints = iso19115_3.useConstraints; row2.scopeCode = iso19115_3.scopeCode; row2.lineage = iso19115_3.lineage; row2.srs = iso19115_3.srs; row2.layerName = iso19115_3.layerName; row2.columnsDef = normalizeRecord_tNormalize_1[i_tNormalize_1]; row2.bands = iso19115_3.bands; tos_count_tNormalize_1++; /** * [tNormalize_1 main ] stop */ /** * [tExtractDelimitedFields_3 main ] * start */ currentComponent = "tExtractDelimitedFields_3"; row4 = null; row4 = new row4Struct(); String field_tExtractDelimitedFields_3 = row2.columnsDef; String[] newFields_tExtractDelimitedFields_3 = new String[0]; if (field_tExtractDelimitedFields_3 != null) {// C_01 try { newFields_tExtractDelimitedFields_3 = field_tExtractDelimitedFields_3 .split("#", -1); int length_tExtractDelimitedFields_3 = newFields_tExtractDelimitedFields_3.length; for (int i_tExtractDelimitedFields_3 = 0; i_tExtractDelimitedFields_3 < length_tExtractDelimitedFields_3; i_tExtractDelimitedFields_3++) { newFields_tExtractDelimitedFields_3[i_tExtractDelimitedFields_3] = newFields_tExtractDelimitedFields_3[i_tExtractDelimitedFields_3] .trim(); } row4.mdIdentifier = row2.mdIdentifier; row4.mdLanguage = row2.mdLanguage; row4.mdCharacterSetCode = row2.mdCharacterSetCode; row4.ciRoleCode = row2.ciRoleCode; row4.mdOrganisation = row2.mdOrganisation; row4.mdVoice = row2.mdVoice; row4.mdIndividualName = row2.mdIndividualName; row4.mdPositionName = row2.mdPositionName; row4.mdDeliveryPoint = row2.mdDeliveryPoint; row4.mdCity = row2.mdCity; row4.mdAdministrativeArea = row2.mdAdministrativeArea; row4.mdPostalCode = row2.mdPostalCode; row4.mdCountry = row2.mdCountry; row4.mdEmail = row2.mdEmail; row4.mdDate = row2.mdDate; row4.title = row2.title; row4.organisationName = row2.organisationName; row4.voice = row2.voice; row4.email = row2.email; row4.individualName = row2.individualName; row4.positionName = row2.positionName; row4.deliveryPoint = row2.deliveryPoint; row4.city = row2.city; row4.administrativeArea = row2.administrativeArea; row4.postalCode = row2.postalCode; row4.country = row2.country; row4.spatialRepresentationType = row2.spatialRepresentationType; row4.scaleDenominator = row2.scaleDenominator; row4.topicCategoryCode = row2.topicCategoryCode; row4.west = row2.west; row4.east = row2.east; row4.south = row2.south; row4.north = row2.north; row4.mdMaintenanceFrequencyCode = row2.mdMaintenanceFrequencyCode; row4.keyword = row2.keyword; row4.keyword2 = row2.keyword2; row4.keyword1_theme = row2.keyword1_theme; row4.keyword2_theme = row2.keyword2_theme; row4.useConstraints = row2.useConstraints; row4.scopeCode = row2.scopeCode; row4.lineage = row2.lineage; row4.srs = row2.srs; row4.layerName = row2.layerName; row4.columnsDef = row2.columnsDef; row4.bands = row2.bands; String temp_tExtractDelimitedFields_3 = null; row4.colName = 0 >= length_tExtractDelimitedFields_3 ? "" : newFields_tExtractDelimitedFields_3[0]; row4.colType = 1 >= length_tExtractDelimitedFields_3 ? "" : newFields_tExtractDelimitedFields_3[1]; row4.colPrecision = 2 >= length_tExtractDelimitedFields_3 ? "" : newFields_tExtractDelimitedFields_3[2]; nb_line_tExtractDelimitedFields_3++; } catch (java.lang.Exception ex_tExtractDelimitedFields_3) { System.err.println(ex_tExtractDelimitedFields_3.getMessage()); row4 = null; } tos_count_tExtractDelimitedFields_3++; /** * [tExtractDelimitedFields_3 * main ] stop */ // Start of branch "row4" if (row4 != null) { /** * [tLogRow_2 main ] start */ currentComponent = "tLogRow_2"; row3 = row4; tos_count_tLogRow_2++; /** * [tLogRow_2 main ] stop */ /** * [tAdvancedFileOutputXML_2 * main ] start */ currentComponent = "tAdvancedFileOutputXML_2"; nb_line_tAFOX_2++; valueMap_tAFOX_2.clear(); valueMap_tAFOX_2.put("mdIdentifier", (row4.mdIdentifier != null ? row4.mdIdentifier.toString() : null)); valueMap_tAFOX_2.put("mdLanguage", (row4.mdLanguage != null ? row4.mdLanguage.toString() : "eng")); valueMap_tAFOX_2.put("mdCharacterSetCode", (row4.mdCharacterSetCode != null ? row4.mdCharacterSetCode.toString() : "utf-8")); valueMap_tAFOX_2.put("ciRoleCode", (row4.ciRoleCode != null ? row4.ciRoleCode.toString() : "pointOfContact")); valueMap_tAFOX_2.put("mdOrganisation", (row4.mdOrganisation != null ? row4.mdOrganisation.toString() : null)); valueMap_tAFOX_2.put("mdVoice", (row4.mdVoice != null ? row4.mdVoice.toString() : null)); valueMap_tAFOX_2.put("mdIndividualName", (row4.mdIndividualName != null ? row4.mdIndividualName.toString() : null)); valueMap_tAFOX_2.put("mdPositionName", (row4.mdPositionName != null ? row4.mdPositionName.toString() : null)); valueMap_tAFOX_2.put("mdDeliveryPoint", (row4.mdDeliveryPoint != null ? row4.mdDeliveryPoint.toString() : null)); valueMap_tAFOX_2.put("mdCity", (row4.mdCity != null ? row4.mdCity.toString() : null)); valueMap_tAFOX_2.put("mdAdministrativeArea", (row4.mdAdministrativeArea != null ? row4.mdAdministrativeArea.toString() : null)); valueMap_tAFOX_2.put("mdPostalCode", (row4.mdPostalCode != null ? row4.mdPostalCode.toString() : null)); valueMap_tAFOX_2.put("mdCountry", (row4.mdCountry != null ? row4.mdCountry.toString() : null)); valueMap_tAFOX_2.put("mdEmail", (row4.mdEmail != null ? row4.mdEmail.toString() : null)); valueMap_tAFOX_2.put("mdDate", (row4.mdDate != null ? row4.mdDate.toString() : null)); valueMap_tAFOX_2.put("title", (row4.title != null ? row4.title.toString() : null)); valueMap_tAFOX_2.put("organisationName", (row4.organisationName != null ? row4.organisationName.toString() : null)); valueMap_tAFOX_2.put("voice", (row4.voice != null ? row4.voice.toString() : null)); valueMap_tAFOX_2.put("email", (row4.email != null ? row4.email.toString() : null)); valueMap_tAFOX_2.put("individualName", (row4.individualName != null ? row4.individualName.toString() : null)); valueMap_tAFOX_2.put("positionName", (row4.positionName != null ? row4.positionName.toString() : null)); valueMap_tAFOX_2.put("deliveryPoint", (row4.deliveryPoint != null ? row4.deliveryPoint.toString() : null)); valueMap_tAFOX_2.put("city", (row4.city != null ? row4.city.toString() : null)); valueMap_tAFOX_2.put("administrativeArea", (row4.administrativeArea != null ? row4.administrativeArea.toString() : null)); valueMap_tAFOX_2.put("postalCode", (row4.postalCode != null ? row4.postalCode.toString() : null)); valueMap_tAFOX_2.put("country", (row4.country != null ? row4.country.toString() : null)); valueMap_tAFOX_2.put("spatialRepresentationType", (row4.spatialRepresentationType != null ? row4.spatialRepresentationType.toString() : "vector")); valueMap_tAFOX_2.put("scaleDenominator", (row4.scaleDenominator != null ? row4.scaleDenominator.toString() : null)); valueMap_tAFOX_2.put("topicCategoryCode", (row4.topicCategoryCode != null ? row4.topicCategoryCode.toString() : null)); valueMap_tAFOX_2.put("west", (row4.west != null ? row4.west.toString() : null)); valueMap_tAFOX_2.put("east", (row4.east != null ? row4.east.toString() : null)); valueMap_tAFOX_2.put("south", (row4.south != null ? row4.south.toString() : null)); valueMap_tAFOX_2.put("north", (row4.north != null ? row4.north.toString() : null)); valueMap_tAFOX_2.put("mdMaintenanceFrequencyCode", (row4.mdMaintenanceFrequencyCode != null ? row4.mdMaintenanceFrequencyCode.toString() : "asNeeded")); valueMap_tAFOX_2.put("keyword", (row4.keyword != null ? row4.keyword.toString() : null)); valueMap_tAFOX_2.put("keyword2", (row4.keyword2 != null ? row4.keyword2.toString() : null)); valueMap_tAFOX_2.put("keyword1_theme", (row4.keyword1_theme != null ? row4.keyword1_theme.toString() : "theme")); valueMap_tAFOX_2.put("keyword2_theme", (row4.keyword2_theme != null ? row4.keyword2_theme.toString() : "place")); valueMap_tAFOX_2.put("useConstraints", (row4.useConstraints != null ? row4.useConstraints.toString() : null)); valueMap_tAFOX_2.put("scopeCode", (row4.scopeCode != null ? row4.scopeCode.toString() : "dataset")); valueMap_tAFOX_2.put("lineage", (row4.lineage != null ? row4.lineage.toString() : null)); valueMap_tAFOX_2.put("srs", (row4.srs != null ? row4.srs.toString() : "WGS 1984")); valueMap_tAFOX_2.put("layerName", (row4.layerName != null ? row4.layerName.toString() : null)); valueMap_tAFOX_2.put("columnsDef", (row4.columnsDef != null ? row4.columnsDef.toString() : null)); valueMap_tAFOX_2.put("bands", (row4.bands != null ? row4.bands.toString() : null)); valueMap_tAFOX_2.put("colName", (row4.colName != null ? row4.colName.toString() : null)); valueMap_tAFOX_2.put("colType", (row4.colType != null ? row4.colType.toString() : null)); valueMap_tAFOX_2.put("colPrecision", (row4.colPrecision != null ? row4.colPrecision.toString() : null)); org.dom4j.Element subTreeRootParent_tAFOX_2 = null; // build root xml tree if (needRoot_tAFOX_2) { needRoot_tAFOX_2 = false; if (orders_tAFOX_2.length > 0) { orders_tAFOX_2[0] = 0; } org.dom4j.Element root_tAFOX_2 = doc_tAFOX_2 .addElement("mdb:MD_Metadata"); root_tAFOX_2.addNamespace("xsi", TalendString.replaceSpecialCharForXML( "http://www.w3.org/2001/XMLSchema-instance")); root_tAFOX_2.addNamespace("cit", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19115/-3/cit/1.0")); root_tAFOX_2.addNamespace("dqc", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19157/-2/dqc/1.0")); root_tAFOX_2.addNamespace("gco", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19115/-3/gco/1.0")); root_tAFOX_2.addNamespace("gcx", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19115/-3/gcx/1.0")); root_tAFOX_2.addNamespace("gex", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19115/-3/gex/1.0")); root_tAFOX_2.addNamespace("gfc", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19110/gfc/1.1")); root_tAFOX_2.addNamespace("gml", TalendString.replaceSpecialCharForXML( "http://www.opengis.net/gml/3.2")); root_tAFOX_2.addNamespace("gmw", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19115/-3/gmw/1.0")); root_tAFOX_2.addNamespace("lan", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19115/-3/lan/1.0")); root_tAFOX_2.addNamespace("mac", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19115/-3/mac/1.0")); root_tAFOX_2.addNamespace("mas", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19115/-3/mas/1.0")); root_tAFOX_2.addNamespace("mcc", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19115/-3/mcc/1.0")); root_tAFOX_2.addNamespace("mco", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19115/-3/mco/1.0")); root_tAFOX_2.addNamespace("mdb", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19115/-3/mdb/1.0")); root_tAFOX_2.addNamespace("mdq", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19157/-2/mdq/1.0")); root_tAFOX_2.addNamespace("mex", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19115/-3/mex/1.0")); root_tAFOX_2.addNamespace("mmi", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19115/-3/mmi/1.0")); root_tAFOX_2.addNamespace("mpc", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19115/-3/mpc/1.0")); root_tAFOX_2.addNamespace("mrd", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19115/-3/mrd/1.0")); root_tAFOX_2.addNamespace("mri", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19115/-3/mri/1.0")); root_tAFOX_2.addNamespace("mrl", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19115/-3/mrl/1.0")); root_tAFOX_2.addNamespace("mrc", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19115/-3/mrc/1.0")); root_tAFOX_2.addNamespace("mrs", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19115/-3/mrs/1.0")); root_tAFOX_2.addNamespace("msr", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19115/-3/msr/1.0")); root_tAFOX_2.addNamespace("srv", TalendString.replaceSpecialCharForXML( "http://standards.iso.org/19115/-3/srv/2.0")); root_tAFOX_2.setName("mdb:MD_Metadata"); org.dom4j.Element root_0_tAFOX_2; if (root_tAFOX_2.getNamespaceForPrefix("mdb") == null) { root_0_tAFOX_2 = root_tAFOX_2 .addElement("metadataIdentifier"); } else { root_0_tAFOX_2 = root_tAFOX_2 .addElement("mdb:metadataIdentifier"); } root_0_tAFOX_2.setName("mdb:metadataIdentifier"); org.dom4j.Element root_0_0_tAFOX_2; if (root_0_tAFOX_2.getNamespaceForPrefix("mcc") == null) { root_0_0_tAFOX_2 = root_0_tAFOX_2 .addElement("MD_Identifier"); } else { root_0_0_tAFOX_2 = root_0_tAFOX_2 .addElement("mcc:MD_Identifier"); } root_0_0_tAFOX_2.setName("mcc:MD_Identifier"); org.dom4j.Element root_0_0_0_tAFOX_2; if (root_0_0_tAFOX_2.getNamespaceForPrefix("mcc") == null) { root_0_0_0_tAFOX_2 = root_0_0_tAFOX_2 .addElement("code"); } else { root_0_0_0_tAFOX_2 = root_0_0_tAFOX_2 .addElement("mcc:code"); } root_0_0_0_tAFOX_2.setName("mcc:code"); org.dom4j.Element root_0_0_0_0_tAFOX_2; if (root_0_0_0_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_0_0_0_0_tAFOX_2 = root_0_0_0_tAFOX_2 .addElement("CharacterString"); } else { root_0_0_0_0_tAFOX_2 = root_0_0_0_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("mdIdentifier") != null) { nestXMLTool_tAFOX_2.setText(root_0_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("mdIdentifier")); } root_0_0_0_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_0_0_1_tAFOX_2; if (root_0_0_tAFOX_2.getNamespaceForPrefix("mcc") == null) { root_0_0_1_tAFOX_2 = root_0_0_tAFOX_2 .addElement("codeSpace"); } else { root_0_0_1_tAFOX_2 = root_0_0_tAFOX_2 .addElement("mcc:codeSpace"); } root_0_0_1_tAFOX_2.setName("mcc:codeSpace"); org.dom4j.Element root_0_0_1_0_tAFOX_2; if (root_0_0_1_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_0_0_1_0_tAFOX_2 = root_0_0_1_tAFOX_2 .addElement("CharacterString"); } else { root_0_0_1_0_tAFOX_2 = root_0_0_1_tAFOX_2 .addElement("gco:CharacterString"); } nestXMLTool_tAFOX_2.parseAndAdd(root_0_0_1_0_tAFOX_2, "urn:uuid"); root_0_0_1_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_1_tAFOX_2; if (root_tAFOX_2.getNamespaceForPrefix("mdb") == null) { root_1_tAFOX_2 = root_tAFOX_2 .addElement("defaultLocale"); } else { root_1_tAFOX_2 = root_tAFOX_2 .addElement("mdb:defaultLocale"); } root_1_tAFOX_2.setName("mdb:defaultLocale"); org.dom4j.Element root_1_0_tAFOX_2; if (root_1_tAFOX_2.getNamespaceForPrefix("lan") == null) { root_1_0_tAFOX_2 = root_1_tAFOX_2 .addElement("PT_Locale"); } else { root_1_0_tAFOX_2 = root_1_tAFOX_2 .addElement("lan:PT_Locale"); } root_1_0_tAFOX_2.setName("lan:PT_Locale"); org.dom4j.Element root_1_0_0_tAFOX_2; if (root_1_0_tAFOX_2.getNamespaceForPrefix("lan") == null) { root_1_0_0_tAFOX_2 = root_1_0_tAFOX_2 .addElement("language"); } else { root_1_0_0_tAFOX_2 = root_1_0_tAFOX_2 .addElement("lan:language"); } root_1_0_0_tAFOX_2.setName("lan:language"); org.dom4j.Element root_1_0_0_0_tAFOX_2; if (root_1_0_0_tAFOX_2 .getNamespaceForPrefix("lan") == null) { root_1_0_0_0_tAFOX_2 = root_1_0_0_tAFOX_2 .addElement("LanguageCode"); } else { root_1_0_0_0_tAFOX_2 = root_1_0_0_tAFOX_2 .addElement("lan:LanguageCode"); } root_1_0_0_0_tAFOX_2.addAttribute("codeList", "http://www.loc.gov/standards/iso639-2/"); if (valueMap_tAFOX_2.get("mdLanguage") != null) { root_1_0_0_0_tAFOX_2.addAttribute("codeListValue", valueMap_tAFOX_2.get("mdLanguage")); } root_1_0_0_0_tAFOX_2.setName("lan:LanguageCode"); org.dom4j.Element root_1_0_1_tAFOX_2; if (root_1_0_tAFOX_2.getNamespaceForPrefix("lan") == null) { root_1_0_1_tAFOX_2 = root_1_0_tAFOX_2 .addElement("characterEncoding"); } else { root_1_0_1_tAFOX_2 = root_1_0_tAFOX_2 .addElement("lan:characterEncoding"); } root_1_0_1_tAFOX_2.setName("lan:characterEncoding"); org.dom4j.Element root_1_0_1_0_tAFOX_2; if (root_1_0_1_tAFOX_2 .getNamespaceForPrefix("lan") == null) { root_1_0_1_0_tAFOX_2 = root_1_0_1_tAFOX_2 .addElement("MD_CharacterSetCode"); } else { root_1_0_1_0_tAFOX_2 = root_1_0_1_tAFOX_2 .addElement("lan:MD_CharacterSetCode"); } root_1_0_1_0_tAFOX_2.addAttribute("codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#MD_CharacterSetCode"); if (valueMap_tAFOX_2.get("mdCharacterSetCode") != null) { root_1_0_1_0_tAFOX_2.addAttribute("codeListValue", valueMap_tAFOX_2.get("mdCharacterSetCode")); } root_1_0_1_0_tAFOX_2.setName("lan:MD_CharacterSetCode"); org.dom4j.Element root_2_tAFOX_2; if (root_tAFOX_2.getNamespaceForPrefix("mdb") == null) { root_2_tAFOX_2 = root_tAFOX_2.addElement("contact"); } else { root_2_tAFOX_2 = root_tAFOX_2.addElement("mdb:contact"); } root_2_tAFOX_2.setName("mdb:contact"); org.dom4j.Element root_2_0_tAFOX_2; if (root_2_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_2_0_tAFOX_2 = root_2_tAFOX_2 .addElement("CI_Responsibility"); } else { root_2_0_tAFOX_2 = root_2_tAFOX_2 .addElement("cit:CI_Responsibility"); } root_2_0_tAFOX_2.setName("cit:CI_Responsibility"); org.dom4j.Element root_2_0_0_tAFOX_2; if (root_2_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_2_0_0_tAFOX_2 = root_2_0_tAFOX_2 .addElement("role"); } else { root_2_0_0_tAFOX_2 = root_2_0_tAFOX_2 .addElement("cit:role"); } root_2_0_0_tAFOX_2.setName("cit:role"); org.dom4j.Element root_2_0_0_0_tAFOX_2; if (root_2_0_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_2_0_0_0_tAFOX_2 = root_2_0_0_tAFOX_2 .addElement("CI_RoleCode"); } else { root_2_0_0_0_tAFOX_2 = root_2_0_0_tAFOX_2 .addElement("cit:CI_RoleCode"); } root_2_0_0_0_tAFOX_2.addAttribute("codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#CI_RoleCode"); if (valueMap_tAFOX_2.get("ciRoleCode") != null) { root_2_0_0_0_tAFOX_2.addAttribute("codeListValue", valueMap_tAFOX_2.get("ciRoleCode")); } root_2_0_0_0_tAFOX_2.setName("cit:CI_RoleCode"); org.dom4j.Element root_2_0_1_tAFOX_2; if (root_2_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_2_0_1_tAFOX_2 = root_2_0_tAFOX_2 .addElement("party"); } else { root_2_0_1_tAFOX_2 = root_2_0_tAFOX_2 .addElement("cit:party"); } root_2_0_1_tAFOX_2.setName("cit:party"); org.dom4j.Element root_2_0_1_0_tAFOX_2; if (root_2_0_1_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_2_0_1_0_tAFOX_2 = root_2_0_1_tAFOX_2 .addElement("CI_Organisation"); } else { root_2_0_1_0_tAFOX_2 = root_2_0_1_tAFOX_2 .addElement("cit:CI_Organisation"); } root_2_0_1_0_tAFOX_2.setName("cit:CI_Organisation"); org.dom4j.Element root_2_0_1_0_0_tAFOX_2; if (root_2_0_1_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_2_0_1_0_0_tAFOX_2 = root_2_0_1_0_tAFOX_2 .addElement("name"); } else { root_2_0_1_0_0_tAFOX_2 = root_2_0_1_0_tAFOX_2 .addElement("cit:name"); } root_2_0_1_0_0_tAFOX_2.setName("cit:name"); org.dom4j.Element root_2_0_1_0_0_0_tAFOX_2; if (root_2_0_1_0_0_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_2_0_1_0_0_0_tAFOX_2 = root_2_0_1_0_0_tAFOX_2 .addElement("CharacterString"); } else { root_2_0_1_0_0_0_tAFOX_2 = root_2_0_1_0_0_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("mdOrganisation") != null) { nestXMLTool_tAFOX_2.setText(root_2_0_1_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("mdOrganisation")); } root_2_0_1_0_0_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_2_0_1_0_1_tAFOX_2; if (root_2_0_1_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_2_0_1_0_1_tAFOX_2 = root_2_0_1_0_tAFOX_2 .addElement("contactInfo"); } else { root_2_0_1_0_1_tAFOX_2 = root_2_0_1_0_tAFOX_2 .addElement("cit:contactInfo"); } root_2_0_1_0_1_tAFOX_2.setName("cit:contactInfo"); org.dom4j.Element root_2_0_1_0_1_0_tAFOX_2; if (root_2_0_1_0_1_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_2_0_1_0_1_0_tAFOX_2 = root_2_0_1_0_1_tAFOX_2 .addElement("CI_Contact"); } else { root_2_0_1_0_1_0_tAFOX_2 = root_2_0_1_0_1_tAFOX_2 .addElement("cit:CI_Contact"); } root_2_0_1_0_1_0_tAFOX_2.setName("cit:CI_Contact"); org.dom4j.Element root_2_0_1_0_1_0_0_tAFOX_2; if (root_2_0_1_0_1_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_2_0_1_0_1_0_0_tAFOX_2 = root_2_0_1_0_1_0_tAFOX_2 .addElement("phone"); } else { root_2_0_1_0_1_0_0_tAFOX_2 = root_2_0_1_0_1_0_tAFOX_2 .addElement("cit:phone"); } root_2_0_1_0_1_0_0_tAFOX_2.setName("cit:phone"); org.dom4j.Element root_2_0_1_0_1_0_0_0_tAFOX_2; if (root_2_0_1_0_1_0_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_2_0_1_0_1_0_0_0_tAFOX_2 = root_2_0_1_0_1_0_0_tAFOX_2 .addElement("CI_Telephone"); } else { root_2_0_1_0_1_0_0_0_tAFOX_2 = root_2_0_1_0_1_0_0_tAFOX_2 .addElement("cit:CI_Telephone"); } root_2_0_1_0_1_0_0_0_tAFOX_2.setName("cit:CI_Telephone"); org.dom4j.Element root_2_0_1_0_1_0_0_0_0_tAFOX_2; if (root_2_0_1_0_1_0_0_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_2_0_1_0_1_0_0_0_0_tAFOX_2 = root_2_0_1_0_1_0_0_0_tAFOX_2 .addElement("number"); } else { root_2_0_1_0_1_0_0_0_0_tAFOX_2 = root_2_0_1_0_1_0_0_0_tAFOX_2 .addElement("cit:number"); } root_2_0_1_0_1_0_0_0_0_tAFOX_2.setName("cit:number"); org.dom4j.Element root_2_0_1_0_1_0_0_0_0_0_tAFOX_2; if (root_2_0_1_0_1_0_0_0_0_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_2_0_1_0_1_0_0_0_0_0_tAFOX_2 = root_2_0_1_0_1_0_0_0_0_tAFOX_2 .addElement("CharacterString"); } else { root_2_0_1_0_1_0_0_0_0_0_tAFOX_2 = root_2_0_1_0_1_0_0_0_0_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("mdVoice") != null) { nestXMLTool_tAFOX_2.setText( root_2_0_1_0_1_0_0_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("mdVoice")); } root_2_0_1_0_1_0_0_0_0_0_tAFOX_2 .setName("gco:CharacterString"); org.dom4j.Element root_2_0_1_0_1_0_0_0_1_tAFOX_2; if (root_2_0_1_0_1_0_0_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_2_0_1_0_1_0_0_0_1_tAFOX_2 = root_2_0_1_0_1_0_0_0_tAFOX_2 .addElement("numberType"); } else { root_2_0_1_0_1_0_0_0_1_tAFOX_2 = root_2_0_1_0_1_0_0_0_tAFOX_2 .addElement("cit:numberType"); } root_2_0_1_0_1_0_0_0_1_tAFOX_2.setName("cit:numberType"); org.dom4j.Element root_2_0_1_0_1_0_0_0_1_0_tAFOX_2; if (root_2_0_1_0_1_0_0_0_1_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_2_0_1_0_1_0_0_0_1_0_tAFOX_2 = root_2_0_1_0_1_0_0_0_1_tAFOX_2 .addElement("CI_TelephoneTypeCode"); } else { root_2_0_1_0_1_0_0_0_1_0_tAFOX_2 = root_2_0_1_0_1_0_0_0_1_tAFOX_2 .addElement("cit:CI_TelephoneTypeCode"); } root_2_0_1_0_1_0_0_0_1_0_tAFOX_2.addAttribute("codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/ML_gmxCodelists.xml#CI_TelephoneTypeCode"); root_2_0_1_0_1_0_0_0_1_0_tAFOX_2 .addAttribute("codeListValue", "voice"); root_2_0_1_0_1_0_0_0_1_0_tAFOX_2 .setName("cit:CI_TelephoneTypeCode"); org.dom4j.Element root_2_0_1_0_1_0_1_tAFOX_2; if (root_2_0_1_0_1_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_2_0_1_0_1_0_1_tAFOX_2 = root_2_0_1_0_1_0_tAFOX_2 .addElement("address"); } else { root_2_0_1_0_1_0_1_tAFOX_2 = root_2_0_1_0_1_0_tAFOX_2 .addElement("cit:address"); } root_2_0_1_0_1_0_1_tAFOX_2.setName("cit:address"); org.dom4j.Element root_2_0_1_0_1_0_1_0_tAFOX_2; if (root_2_0_1_0_1_0_1_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_2_0_1_0_1_0_1_0_tAFOX_2 = root_2_0_1_0_1_0_1_tAFOX_2 .addElement("CI_Address"); } else { root_2_0_1_0_1_0_1_0_tAFOX_2 = root_2_0_1_0_1_0_1_tAFOX_2 .addElement("cit:CI_Address"); } root_2_0_1_0_1_0_1_0_tAFOX_2.setName("cit:CI_Address"); org.dom4j.Element root_2_0_1_0_1_0_1_0_0_tAFOX_2; if (root_2_0_1_0_1_0_1_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_2_0_1_0_1_0_1_0_0_tAFOX_2 = root_2_0_1_0_1_0_1_0_tAFOX_2 .addElement("deliveryPoint"); } else { root_2_0_1_0_1_0_1_0_0_tAFOX_2 = root_2_0_1_0_1_0_1_0_tAFOX_2 .addElement("cit:deliveryPoint"); } root_2_0_1_0_1_0_1_0_0_tAFOX_2.setName("cit:deliveryPoint"); org.dom4j.Element root_2_0_1_0_1_0_1_0_0_0_tAFOX_2; if (root_2_0_1_0_1_0_1_0_0_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_2_0_1_0_1_0_1_0_0_0_tAFOX_2 = root_2_0_1_0_1_0_1_0_0_tAFOX_2 .addElement("CharacterString"); } else { root_2_0_1_0_1_0_1_0_0_0_tAFOX_2 = root_2_0_1_0_1_0_1_0_0_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("mdDeliveryPoint") != null) { nestXMLTool_tAFOX_2.setText( root_2_0_1_0_1_0_1_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("mdDeliveryPoint")); } root_2_0_1_0_1_0_1_0_0_0_tAFOX_2 .setName("gco:CharacterString"); org.dom4j.Element root_2_0_1_0_1_0_1_0_1_tAFOX_2; if (root_2_0_1_0_1_0_1_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_2_0_1_0_1_0_1_0_1_tAFOX_2 = root_2_0_1_0_1_0_1_0_tAFOX_2 .addElement("city"); } else { root_2_0_1_0_1_0_1_0_1_tAFOX_2 = root_2_0_1_0_1_0_1_0_tAFOX_2 .addElement("cit:city"); } root_2_0_1_0_1_0_1_0_1_tAFOX_2.setName("cit:city"); org.dom4j.Element root_2_0_1_0_1_0_1_0_1_0_tAFOX_2; if (root_2_0_1_0_1_0_1_0_1_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_2_0_1_0_1_0_1_0_1_0_tAFOX_2 = root_2_0_1_0_1_0_1_0_1_tAFOX_2 .addElement("CharacterString"); } else { root_2_0_1_0_1_0_1_0_1_0_tAFOX_2 = root_2_0_1_0_1_0_1_0_1_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("mdCity") != null) { nestXMLTool_tAFOX_2.setText( root_2_0_1_0_1_0_1_0_1_0_tAFOX_2, valueMap_tAFOX_2.get("mdCity")); } root_2_0_1_0_1_0_1_0_1_0_tAFOX_2 .setName("gco:CharacterString"); org.dom4j.Element root_2_0_1_0_1_0_1_0_2_tAFOX_2; if (root_2_0_1_0_1_0_1_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_2_0_1_0_1_0_1_0_2_tAFOX_2 = root_2_0_1_0_1_0_1_0_tAFOX_2 .addElement("administrativeArea"); } else { root_2_0_1_0_1_0_1_0_2_tAFOX_2 = root_2_0_1_0_1_0_1_0_tAFOX_2 .addElement("cit:administrativeArea"); } root_2_0_1_0_1_0_1_0_2_tAFOX_2 .setName("cit:administrativeArea"); org.dom4j.Element root_2_0_1_0_1_0_1_0_2_0_tAFOX_2; if (root_2_0_1_0_1_0_1_0_2_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_2_0_1_0_1_0_1_0_2_0_tAFOX_2 = root_2_0_1_0_1_0_1_0_2_tAFOX_2 .addElement("CharacterString"); } else { root_2_0_1_0_1_0_1_0_2_0_tAFOX_2 = root_2_0_1_0_1_0_1_0_2_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("mdAdministrativeArea") != null) { nestXMLTool_tAFOX_2.setText( root_2_0_1_0_1_0_1_0_2_0_tAFOX_2, valueMap_tAFOX_2.get("mdAdministrativeArea")); } root_2_0_1_0_1_0_1_0_2_0_tAFOX_2 .setName("gco:CharacterString"); org.dom4j.Element root_2_0_1_0_1_0_1_0_3_tAFOX_2; if (root_2_0_1_0_1_0_1_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_2_0_1_0_1_0_1_0_3_tAFOX_2 = root_2_0_1_0_1_0_1_0_tAFOX_2 .addElement("postalCode"); } else { root_2_0_1_0_1_0_1_0_3_tAFOX_2 = root_2_0_1_0_1_0_1_0_tAFOX_2 .addElement("cit:postalCode"); } root_2_0_1_0_1_0_1_0_3_tAFOX_2.setName("cit:postalCode"); org.dom4j.Element root_2_0_1_0_1_0_1_0_3_0_tAFOX_2; if (root_2_0_1_0_1_0_1_0_3_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_2_0_1_0_1_0_1_0_3_0_tAFOX_2 = root_2_0_1_0_1_0_1_0_3_tAFOX_2 .addElement("CharacterString"); } else { root_2_0_1_0_1_0_1_0_3_0_tAFOX_2 = root_2_0_1_0_1_0_1_0_3_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("mdPostalCode") != null) { nestXMLTool_tAFOX_2.setText( root_2_0_1_0_1_0_1_0_3_0_tAFOX_2, valueMap_tAFOX_2.get("mdPostalCode")); } root_2_0_1_0_1_0_1_0_3_0_tAFOX_2 .setName("gco:CharacterString"); org.dom4j.Element root_2_0_1_0_1_0_1_0_4_tAFOX_2; if (root_2_0_1_0_1_0_1_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_2_0_1_0_1_0_1_0_4_tAFOX_2 = root_2_0_1_0_1_0_1_0_tAFOX_2 .addElement("country"); } else { root_2_0_1_0_1_0_1_0_4_tAFOX_2 = root_2_0_1_0_1_0_1_0_tAFOX_2 .addElement("cit:country"); } root_2_0_1_0_1_0_1_0_4_tAFOX_2.setName("cit:country"); org.dom4j.Element root_2_0_1_0_1_0_1_0_4_0_tAFOX_2; if (root_2_0_1_0_1_0_1_0_4_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_2_0_1_0_1_0_1_0_4_0_tAFOX_2 = root_2_0_1_0_1_0_1_0_4_tAFOX_2 .addElement("CharacterString"); } else { root_2_0_1_0_1_0_1_0_4_0_tAFOX_2 = root_2_0_1_0_1_0_1_0_4_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("mdCountry") != null) { nestXMLTool_tAFOX_2.setText( root_2_0_1_0_1_0_1_0_4_0_tAFOX_2, valueMap_tAFOX_2.get("mdCountry")); } root_2_0_1_0_1_0_1_0_4_0_tAFOX_2 .setName("gco:CharacterString"); org.dom4j.Element root_2_0_1_0_1_0_1_0_5_tAFOX_2; if (root_2_0_1_0_1_0_1_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_2_0_1_0_1_0_1_0_5_tAFOX_2 = root_2_0_1_0_1_0_1_0_tAFOX_2 .addElement("electronicMailAddress"); } else { root_2_0_1_0_1_0_1_0_5_tAFOX_2 = root_2_0_1_0_1_0_1_0_tAFOX_2 .addElement("cit:electronicMailAddress"); } root_2_0_1_0_1_0_1_0_5_tAFOX_2 .setName("cit:electronicMailAddress"); org.dom4j.Element root_2_0_1_0_1_0_1_0_5_0_tAFOX_2; if (root_2_0_1_0_1_0_1_0_5_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_2_0_1_0_1_0_1_0_5_0_tAFOX_2 = root_2_0_1_0_1_0_1_0_5_tAFOX_2 .addElement("CharacterString"); } else { root_2_0_1_0_1_0_1_0_5_0_tAFOX_2 = root_2_0_1_0_1_0_1_0_5_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("mdEmail") != null) { nestXMLTool_tAFOX_2.setText( root_2_0_1_0_1_0_1_0_5_0_tAFOX_2, valueMap_tAFOX_2.get("mdEmail")); } root_2_0_1_0_1_0_1_0_5_0_tAFOX_2 .setName("gco:CharacterString"); org.dom4j.Element root_2_0_1_0_2_tAFOX_2; if (root_2_0_1_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_2_0_1_0_2_tAFOX_2 = root_2_0_1_0_tAFOX_2 .addElement("individual"); } else { root_2_0_1_0_2_tAFOX_2 = root_2_0_1_0_tAFOX_2 .addElement("cit:individual"); } root_2_0_1_0_2_tAFOX_2.setName("cit:individual"); org.dom4j.Element root_2_0_1_0_2_0_tAFOX_2; if (root_2_0_1_0_2_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_2_0_1_0_2_0_tAFOX_2 = root_2_0_1_0_2_tAFOX_2 .addElement("CI_Individual"); } else { root_2_0_1_0_2_0_tAFOX_2 = root_2_0_1_0_2_tAFOX_2 .addElement("cit:CI_Individual"); } root_2_0_1_0_2_0_tAFOX_2.setName("cit:CI_Individual"); org.dom4j.Element root_2_0_1_0_2_0_0_tAFOX_2; if (root_2_0_1_0_2_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_2_0_1_0_2_0_0_tAFOX_2 = root_2_0_1_0_2_0_tAFOX_2 .addElement("name"); } else { root_2_0_1_0_2_0_0_tAFOX_2 = root_2_0_1_0_2_0_tAFOX_2 .addElement("cit:name"); } root_2_0_1_0_2_0_0_tAFOX_2.setName("cit:name"); org.dom4j.Element root_2_0_1_0_2_0_0_0_tAFOX_2; if (root_2_0_1_0_2_0_0_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_2_0_1_0_2_0_0_0_tAFOX_2 = root_2_0_1_0_2_0_0_tAFOX_2 .addElement("CharacterString"); } else { root_2_0_1_0_2_0_0_0_tAFOX_2 = root_2_0_1_0_2_0_0_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("mdIndividualName") != null) { nestXMLTool_tAFOX_2.setText( root_2_0_1_0_2_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("mdIndividualName")); } root_2_0_1_0_2_0_0_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_2_0_1_0_2_0_1_tAFOX_2; if (root_2_0_1_0_2_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_2_0_1_0_2_0_1_tAFOX_2 = root_2_0_1_0_2_0_tAFOX_2 .addElement("positionName"); } else { root_2_0_1_0_2_0_1_tAFOX_2 = root_2_0_1_0_2_0_tAFOX_2 .addElement("cit:positionName"); } root_2_0_1_0_2_0_1_tAFOX_2.setName("cit:positionName"); org.dom4j.Element root_2_0_1_0_2_0_1_0_tAFOX_2; if (root_2_0_1_0_2_0_1_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_2_0_1_0_2_0_1_0_tAFOX_2 = root_2_0_1_0_2_0_1_tAFOX_2 .addElement("CharacterString"); } else { root_2_0_1_0_2_0_1_0_tAFOX_2 = root_2_0_1_0_2_0_1_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("mdPositionName") != null) { nestXMLTool_tAFOX_2.setText( root_2_0_1_0_2_0_1_0_tAFOX_2, valueMap_tAFOX_2.get("mdPositionName")); } root_2_0_1_0_2_0_1_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_3_tAFOX_2; if (root_tAFOX_2.getNamespaceForPrefix("mdb") == null) { root_3_tAFOX_2 = root_tAFOX_2.addElement("dateInfo"); } else { root_3_tAFOX_2 = root_tAFOX_2 .addElement("mdb:dateInfo"); } root_3_tAFOX_2.setName("mdb:dateInfo"); org.dom4j.Element root_3_0_tAFOX_2; if (root_3_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_3_0_tAFOX_2 = root_3_tAFOX_2.addElement("CI_Date"); } else { root_3_0_tAFOX_2 = root_3_tAFOX_2 .addElement("cit:CI_Date"); } root_3_0_tAFOX_2.setName("cit:CI_Date"); org.dom4j.Element root_3_0_0_tAFOX_2; if (root_3_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_3_0_0_tAFOX_2 = root_3_0_tAFOX_2 .addElement("date"); } else { root_3_0_0_tAFOX_2 = root_3_0_tAFOX_2 .addElement("cit:date"); } root_3_0_0_tAFOX_2.setName("cit:date"); org.dom4j.Element root_3_0_0_0_tAFOX_2; if (root_3_0_0_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_3_0_0_0_tAFOX_2 = root_3_0_0_tAFOX_2 .addElement("DateTime"); } else { root_3_0_0_0_tAFOX_2 = root_3_0_0_tAFOX_2 .addElement("gco:DateTime"); } if (valueMap_tAFOX_2.get("mdDate") != null) { nestXMLTool_tAFOX_2.setText(root_3_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("mdDate")); } root_3_0_0_0_tAFOX_2.setName("gco:DateTime"); org.dom4j.Element root_3_0_1_tAFOX_2; if (root_3_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_3_0_1_tAFOX_2 = root_3_0_tAFOX_2 .addElement("dateType"); } else { root_3_0_1_tAFOX_2 = root_3_0_tAFOX_2 .addElement("cit:dateType"); } root_3_0_1_tAFOX_2.setName("cit:dateType"); org.dom4j.Element root_3_0_1_0_tAFOX_2; if (root_3_0_1_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_3_0_1_0_tAFOX_2 = root_3_0_1_tAFOX_2 .addElement("CI_DateTypeCode"); } else { root_3_0_1_0_tAFOX_2 = root_3_0_1_tAFOX_2 .addElement("cit:CI_DateTypeCode"); } root_3_0_1_0_tAFOX_2.addAttribute("codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#CI_DateTypeCode"); root_3_0_1_0_tAFOX_2.addAttribute("codeListValue", "creation"); root_3_0_1_0_tAFOX_2.setName("cit:CI_DateTypeCode"); org.dom4j.Element root_4_tAFOX_2; if (root_tAFOX_2.getNamespaceForPrefix("mdb") == null) { root_4_tAFOX_2 = root_tAFOX_2 .addElement("metadataStandard"); } else { root_4_tAFOX_2 = root_tAFOX_2 .addElement("mdb:metadataStandard"); } root_4_tAFOX_2.setName("mdb:metadataStandard"); org.dom4j.Element root_4_0_tAFOX_2; if (root_4_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_4_0_tAFOX_2 = root_4_tAFOX_2 .addElement("CI_Citation"); } else { root_4_0_tAFOX_2 = root_4_tAFOX_2 .addElement("cit:CI_Citation"); } root_4_0_tAFOX_2.setName("cit:CI_Citation"); org.dom4j.Element root_4_0_0_tAFOX_2; if (root_4_0_tAFOX_2.getNamespaceForPrefix("cit") == null) { root_4_0_0_tAFOX_2 = root_4_0_tAFOX_2 .addElement("title"); } else { root_4_0_0_tAFOX_2 = root_4_0_tAFOX_2 .addElement("cit:title"); } root_4_0_0_tAFOX_2.setName("cit:title"); org.dom4j.Element root_4_0_0_0_tAFOX_2; if (root_4_0_0_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_4_0_0_0_tAFOX_2 = root_4_0_0_tAFOX_2 .addElement("CharacterString"); } else { root_4_0_0_0_tAFOX_2 = root_4_0_0_tAFOX_2 .addElement("gco:CharacterString"); } nestXMLTool_tAFOX_2.parseAndAdd(root_4_0_0_0_tAFOX_2, "ISO 19115-3"); root_4_0_0_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_5_tAFOX_2; if (root_tAFOX_2.getNamespaceForPrefix("mdb") == null) { root_5_tAFOX_2 = root_tAFOX_2 .addElement("referenceSystemInfo"); } else { root_5_tAFOX_2 = root_tAFOX_2 .addElement("mdb:referenceSystemInfo"); } root_5_tAFOX_2.setName("mdb:referenceSystemInfo"); org.dom4j.Element root_5_0_tAFOX_2; if (root_5_tAFOX_2.getNamespaceForPrefix("mrs") == null) { root_5_0_tAFOX_2 = root_5_tAFOX_2 .addElement("MD_ReferenceSystem"); } else { root_5_0_tAFOX_2 = root_5_tAFOX_2 .addElement("mrs:MD_ReferenceSystem"); } root_5_0_tAFOX_2.setName("mrs:MD_ReferenceSystem"); org.dom4j.Element root_5_0_0_tAFOX_2; if (root_5_0_tAFOX_2.getNamespaceForPrefix("mrs") == null) { root_5_0_0_tAFOX_2 = root_5_0_tAFOX_2 .addElement("referenceSystemIdentifier"); } else { root_5_0_0_tAFOX_2 = root_5_0_tAFOX_2 .addElement("mrs:referenceSystemIdentifier"); } root_5_0_0_tAFOX_2.setName("mrs:referenceSystemIdentifier"); org.dom4j.Element root_5_0_0_0_tAFOX_2; if (root_5_0_0_tAFOX_2 .getNamespaceForPrefix("mcc") == null) { root_5_0_0_0_tAFOX_2 = root_5_0_0_tAFOX_2 .addElement("MD_Identifier"); } else { root_5_0_0_0_tAFOX_2 = root_5_0_0_tAFOX_2 .addElement("mcc:MD_Identifier"); } root_5_0_0_0_tAFOX_2.setName("mcc:MD_Identifier"); org.dom4j.Element root_5_0_0_0_0_tAFOX_2; if (root_5_0_0_0_tAFOX_2 .getNamespaceForPrefix("mcc") == null) { root_5_0_0_0_0_tAFOX_2 = root_5_0_0_0_tAFOX_2 .addElement("code"); } else { root_5_0_0_0_0_tAFOX_2 = root_5_0_0_0_tAFOX_2 .addElement("mcc:code"); } root_5_0_0_0_0_tAFOX_2.setName("mcc:code"); org.dom4j.Element root_5_0_0_0_0_0_tAFOX_2; if (root_5_0_0_0_0_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_5_0_0_0_0_0_tAFOX_2 = root_5_0_0_0_0_tAFOX_2 .addElement("CharacterString"); } else { root_5_0_0_0_0_0_tAFOX_2 = root_5_0_0_0_0_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("srs") != null) { nestXMLTool_tAFOX_2.setText(root_5_0_0_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("srs")); } root_5_0_0_0_0_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_6_tAFOX_2; if (root_tAFOX_2.getNamespaceForPrefix("mdb") == null) { root_6_tAFOX_2 = root_tAFOX_2 .addElement("identificationInfo"); } else { root_6_tAFOX_2 = root_tAFOX_2 .addElement("mdb:identificationInfo"); } root_6_tAFOX_2.setName("mdb:identificationInfo"); org.dom4j.Element root_6_0_tAFOX_2; if (root_6_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_tAFOX_2 = root_6_tAFOX_2 .addElement("MD_DataIdentification"); } else { root_6_0_tAFOX_2 = root_6_tAFOX_2 .addElement("mri:MD_DataIdentification"); } root_6_0_tAFOX_2.setName("mri:MD_DataIdentification"); org.dom4j.Element root_6_0_0_tAFOX_2; if (root_6_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_0_tAFOX_2 = root_6_0_tAFOX_2 .addElement("citation"); } else { root_6_0_0_tAFOX_2 = root_6_0_tAFOX_2 .addElement("mri:citation"); } root_6_0_0_tAFOX_2.setName("mri:citation"); org.dom4j.Element root_6_0_0_0_tAFOX_2; if (root_6_0_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_tAFOX_2 = root_6_0_0_tAFOX_2 .addElement("CI_Citation"); } else { root_6_0_0_0_tAFOX_2 = root_6_0_0_tAFOX_2 .addElement("cit:CI_Citation"); } root_6_0_0_0_tAFOX_2.setName("cit:CI_Citation"); org.dom4j.Element root_6_0_0_0_0_tAFOX_2; if (root_6_0_0_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_0_tAFOX_2 = root_6_0_0_0_tAFOX_2 .addElement("title"); } else { root_6_0_0_0_0_tAFOX_2 = root_6_0_0_0_tAFOX_2 .addElement("cit:title"); } root_6_0_0_0_0_tAFOX_2.setName("cit:title"); org.dom4j.Element root_6_0_0_0_0_0_tAFOX_2; if (root_6_0_0_0_0_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_6_0_0_0_0_0_tAFOX_2 = root_6_0_0_0_0_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_0_0_0_0_tAFOX_2 = root_6_0_0_0_0_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("title") != null) { nestXMLTool_tAFOX_2.setText(root_6_0_0_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("title")); } root_6_0_0_0_0_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_6_0_0_0_1_tAFOX_2; if (root_6_0_0_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_1_tAFOX_2 = root_6_0_0_0_tAFOX_2 .addElement("date"); } else { root_6_0_0_0_1_tAFOX_2 = root_6_0_0_0_tAFOX_2 .addElement("cit:date"); } root_6_0_0_0_1_tAFOX_2.setName("cit:date"); org.dom4j.Element root_6_0_0_0_1_0_tAFOX_2; if (root_6_0_0_0_1_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_1_0_tAFOX_2 = root_6_0_0_0_1_tAFOX_2 .addElement("CI_Date"); } else { root_6_0_0_0_1_0_tAFOX_2 = root_6_0_0_0_1_tAFOX_2 .addElement("cit:CI_Date"); } root_6_0_0_0_1_0_tAFOX_2.setName("cit:CI_Date"); org.dom4j.Element root_6_0_0_0_1_0_0_tAFOX_2; if (root_6_0_0_0_1_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_1_0_0_tAFOX_2 = root_6_0_0_0_1_0_tAFOX_2 .addElement("date"); } else { root_6_0_0_0_1_0_0_tAFOX_2 = root_6_0_0_0_1_0_tAFOX_2 .addElement("cit:date"); } root_6_0_0_0_1_0_0_tAFOX_2.setName("cit:date"); org.dom4j.Element root_6_0_0_0_1_0_0_0_tAFOX_2; if (root_6_0_0_0_1_0_0_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_6_0_0_0_1_0_0_0_tAFOX_2 = root_6_0_0_0_1_0_0_tAFOX_2 .addElement("DateTime"); } else { root_6_0_0_0_1_0_0_0_tAFOX_2 = root_6_0_0_0_1_0_0_tAFOX_2 .addElement("gco:DateTime"); } if (valueMap_tAFOX_2.get("mdDate") != null) { nestXMLTool_tAFOX_2.setText( root_6_0_0_0_1_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("mdDate")); } root_6_0_0_0_1_0_0_0_tAFOX_2.setName("gco:DateTime"); org.dom4j.Element root_6_0_0_0_1_0_1_tAFOX_2; if (root_6_0_0_0_1_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_1_0_1_tAFOX_2 = root_6_0_0_0_1_0_tAFOX_2 .addElement("dateType"); } else { root_6_0_0_0_1_0_1_tAFOX_2 = root_6_0_0_0_1_0_tAFOX_2 .addElement("cit:dateType"); } root_6_0_0_0_1_0_1_tAFOX_2.setName("cit:dateType"); org.dom4j.Element root_6_0_0_0_1_0_1_0_tAFOX_2; if (root_6_0_0_0_1_0_1_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_1_0_1_0_tAFOX_2 = root_6_0_0_0_1_0_1_tAFOX_2 .addElement("CI_DateTypeCode"); } else { root_6_0_0_0_1_0_1_0_tAFOX_2 = root_6_0_0_0_1_0_1_tAFOX_2 .addElement("cit:CI_DateTypeCode"); } root_6_0_0_0_1_0_1_0_tAFOX_2.addAttribute("codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#CI_DateTypeCode"); root_6_0_0_0_1_0_1_0_tAFOX_2.addAttribute("codeListValue", "publication"); root_6_0_0_0_1_0_1_0_tAFOX_2.setName("cit:CI_DateTypeCode"); org.dom4j.Element root_6_0_0_0_2_tAFOX_2; if (root_6_0_0_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_tAFOX_2 = root_6_0_0_0_tAFOX_2 .addElement("citedResponsibleParty"); } else { root_6_0_0_0_2_tAFOX_2 = root_6_0_0_0_tAFOX_2 .addElement("cit:citedResponsibleParty"); } root_6_0_0_0_2_tAFOX_2.setName("cit:citedResponsibleParty"); org.dom4j.Element root_6_0_0_0_2_0_tAFOX_2; if (root_6_0_0_0_2_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_tAFOX_2 = root_6_0_0_0_2_tAFOX_2 .addElement("CI_Responsibility"); } else { root_6_0_0_0_2_0_tAFOX_2 = root_6_0_0_0_2_tAFOX_2 .addElement("cit:CI_Responsibility"); } root_6_0_0_0_2_0_tAFOX_2.setName("cit:CI_Responsibility"); org.dom4j.Element root_6_0_0_0_2_0_0_tAFOX_2; if (root_6_0_0_0_2_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_0_tAFOX_2 = root_6_0_0_0_2_0_tAFOX_2 .addElement("role"); } else { root_6_0_0_0_2_0_0_tAFOX_2 = root_6_0_0_0_2_0_tAFOX_2 .addElement("cit:role"); } root_6_0_0_0_2_0_0_tAFOX_2.setName("cit:role"); org.dom4j.Element root_6_0_0_0_2_0_0_0_tAFOX_2; if (root_6_0_0_0_2_0_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_0_0_tAFOX_2 = root_6_0_0_0_2_0_0_tAFOX_2 .addElement("CI_RoleCode"); } else { root_6_0_0_0_2_0_0_0_tAFOX_2 = root_6_0_0_0_2_0_0_tAFOX_2 .addElement("cit:CI_RoleCode"); } root_6_0_0_0_2_0_0_0_tAFOX_2.addAttribute("codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#CI_RoleCode"); root_6_0_0_0_2_0_0_0_tAFOX_2.addAttribute("codeListValue", "originator"); root_6_0_0_0_2_0_0_0_tAFOX_2.setName("cit:CI_RoleCode"); org.dom4j.Element root_6_0_0_0_2_0_1_tAFOX_2; if (root_6_0_0_0_2_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_1_tAFOX_2 = root_6_0_0_0_2_0_tAFOX_2 .addElement("party"); } else { root_6_0_0_0_2_0_1_tAFOX_2 = root_6_0_0_0_2_0_tAFOX_2 .addElement("cit:party"); } root_6_0_0_0_2_0_1_tAFOX_2.setName("cit:party"); org.dom4j.Element root_6_0_0_0_2_0_1_0_tAFOX_2; if (root_6_0_0_0_2_0_1_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_1_0_tAFOX_2 = root_6_0_0_0_2_0_1_tAFOX_2 .addElement("CI_Organisation"); } else { root_6_0_0_0_2_0_1_0_tAFOX_2 = root_6_0_0_0_2_0_1_tAFOX_2 .addElement("cit:CI_Organisation"); } root_6_0_0_0_2_0_1_0_tAFOX_2.setName("cit:CI_Organisation"); org.dom4j.Element root_6_0_0_0_2_0_1_0_0_tAFOX_2; if (root_6_0_0_0_2_0_1_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_1_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_tAFOX_2 .addElement("name"); } else { root_6_0_0_0_2_0_1_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_tAFOX_2 .addElement("cit:name"); } root_6_0_0_0_2_0_1_0_0_tAFOX_2.setName("cit:name"); org.dom4j.Element root_6_0_0_0_2_0_1_0_0_0_tAFOX_2; if (root_6_0_0_0_2_0_1_0_0_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_6_0_0_0_2_0_1_0_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_0_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_0_0_2_0_1_0_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_0_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("organisationName") != null) { nestXMLTool_tAFOX_2.setText( root_6_0_0_0_2_0_1_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("organisationName")); } root_6_0_0_0_2_0_1_0_0_0_tAFOX_2 .setName("gco:CharacterString"); org.dom4j.Element root_6_0_0_0_2_0_1_0_1_tAFOX_2; if (root_6_0_0_0_2_0_1_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_1_0_1_tAFOX_2 = root_6_0_0_0_2_0_1_0_tAFOX_2 .addElement("contactInfo"); } else { root_6_0_0_0_2_0_1_0_1_tAFOX_2 = root_6_0_0_0_2_0_1_0_tAFOX_2 .addElement("cit:contactInfo"); } root_6_0_0_0_2_0_1_0_1_tAFOX_2.setName("cit:contactInfo"); org.dom4j.Element root_6_0_0_0_2_0_1_0_1_0_tAFOX_2; if (root_6_0_0_0_2_0_1_0_1_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_1_0_1_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_tAFOX_2 .addElement("CI_Contact"); } else { root_6_0_0_0_2_0_1_0_1_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_tAFOX_2 .addElement("cit:CI_Contact"); } root_6_0_0_0_2_0_1_0_1_0_tAFOX_2.setName("cit:CI_Contact"); org.dom4j.Element root_6_0_0_0_2_0_1_0_1_0_0_tAFOX_2; if (root_6_0_0_0_2_0_1_0_1_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_1_0_1_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_tAFOX_2 .addElement("phone"); } else { root_6_0_0_0_2_0_1_0_1_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_tAFOX_2 .addElement("cit:phone"); } root_6_0_0_0_2_0_1_0_1_0_0_tAFOX_2.setName("cit:phone"); org.dom4j.Element root_6_0_0_0_2_0_1_0_1_0_0_0_tAFOX_2; if (root_6_0_0_0_2_0_1_0_1_0_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_1_0_1_0_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_0_tAFOX_2 .addElement("CI_Telephone"); } else { root_6_0_0_0_2_0_1_0_1_0_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_0_tAFOX_2 .addElement("cit:CI_Telephone"); } root_6_0_0_0_2_0_1_0_1_0_0_0_tAFOX_2 .setName("cit:CI_Telephone"); org.dom4j.Element root_6_0_0_0_2_0_1_0_1_0_0_0_0_tAFOX_2; if (root_6_0_0_0_2_0_1_0_1_0_0_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_1_0_1_0_0_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_0_0_tAFOX_2 .addElement("number"); } else { root_6_0_0_0_2_0_1_0_1_0_0_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_0_0_tAFOX_2 .addElement("cit:number"); } root_6_0_0_0_2_0_1_0_1_0_0_0_0_tAFOX_2 .setName("cit:number"); org.dom4j.Element root_6_0_0_0_2_0_1_0_1_0_0_0_0_0_tAFOX_2; if (root_6_0_0_0_2_0_1_0_1_0_0_0_0_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_6_0_0_0_2_0_1_0_1_0_0_0_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_0_0_0_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_0_0_2_0_1_0_1_0_0_0_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_0_0_0_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("voice") != null) { nestXMLTool_tAFOX_2.setText( root_6_0_0_0_2_0_1_0_1_0_0_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("voice")); } root_6_0_0_0_2_0_1_0_1_0_0_0_0_0_tAFOX_2 .setName("gco:CharacterString"); org.dom4j.Element root_6_0_0_0_2_0_1_0_1_0_0_0_1_tAFOX_2; if (root_6_0_0_0_2_0_1_0_1_0_0_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_1_0_1_0_0_0_1_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_0_0_tAFOX_2 .addElement("numberType"); } else { root_6_0_0_0_2_0_1_0_1_0_0_0_1_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_0_0_tAFOX_2 .addElement("cit:numberType"); } root_6_0_0_0_2_0_1_0_1_0_0_0_1_tAFOX_2 .setName("cit:numberType"); org.dom4j.Element root_6_0_0_0_2_0_1_0_1_0_0_0_1_0_tAFOX_2; if (root_6_0_0_0_2_0_1_0_1_0_0_0_1_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_1_0_1_0_0_0_1_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_0_0_1_tAFOX_2 .addElement("CI_TelephoneTypeCode"); } else { root_6_0_0_0_2_0_1_0_1_0_0_0_1_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_0_0_1_tAFOX_2 .addElement("cit:CI_TelephoneTypeCode"); } root_6_0_0_0_2_0_1_0_1_0_0_0_1_0_tAFOX_2.addAttribute( "codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/ML_gmxCodelists.xml#CI_TelephoneTypeCode"); root_6_0_0_0_2_0_1_0_1_0_0_0_1_0_tAFOX_2 .addAttribute("codeListValue", "voice"); root_6_0_0_0_2_0_1_0_1_0_0_0_1_0_tAFOX_2 .setName("cit:CI_TelephoneTypeCode"); org.dom4j.Element root_6_0_0_0_2_0_1_0_1_0_1_tAFOX_2; if (root_6_0_0_0_2_0_1_0_1_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_1_0_1_0_1_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_tAFOX_2 .addElement("address"); } else { root_6_0_0_0_2_0_1_0_1_0_1_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_tAFOX_2 .addElement("cit:address"); } root_6_0_0_0_2_0_1_0_1_0_1_tAFOX_2.setName("cit:address"); org.dom4j.Element root_6_0_0_0_2_0_1_0_1_0_1_0_tAFOX_2; if (root_6_0_0_0_2_0_1_0_1_0_1_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_1_0_1_0_1_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_1_tAFOX_2 .addElement("CI_Address"); } else { root_6_0_0_0_2_0_1_0_1_0_1_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_1_tAFOX_2 .addElement("cit:CI_Address"); } root_6_0_0_0_2_0_1_0_1_0_1_0_tAFOX_2 .setName("cit:CI_Address"); org.dom4j.Element root_6_0_0_0_2_0_1_0_1_0_1_0_0_tAFOX_2; if (root_6_0_0_0_2_0_1_0_1_0_1_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_1_0_1_0_1_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_1_0_tAFOX_2 .addElement("electronicMailAddress"); } else { root_6_0_0_0_2_0_1_0_1_0_1_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_1_0_tAFOX_2 .addElement("cit:electronicMailAddress"); } root_6_0_0_0_2_0_1_0_1_0_1_0_0_tAFOX_2 .setName("cit:electronicMailAddress"); org.dom4j.Element root_6_0_0_0_2_0_1_0_1_0_1_0_0_0_tAFOX_2; if (root_6_0_0_0_2_0_1_0_1_0_1_0_0_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_6_0_0_0_2_0_1_0_1_0_1_0_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_1_0_0_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_0_0_2_0_1_0_1_0_1_0_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_1_0_1_0_0_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("email") != null) { nestXMLTool_tAFOX_2.setText( root_6_0_0_0_2_0_1_0_1_0_1_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("email")); } root_6_0_0_0_2_0_1_0_1_0_1_0_0_0_tAFOX_2 .setName("gco:CharacterString"); org.dom4j.Element root_6_0_0_0_2_0_1_0_2_tAFOX_2; if (root_6_0_0_0_2_0_1_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_1_0_2_tAFOX_2 = root_6_0_0_0_2_0_1_0_tAFOX_2 .addElement("individual"); } else { root_6_0_0_0_2_0_1_0_2_tAFOX_2 = root_6_0_0_0_2_0_1_0_tAFOX_2 .addElement("cit:individual"); } root_6_0_0_0_2_0_1_0_2_tAFOX_2.setName("cit:individual"); org.dom4j.Element root_6_0_0_0_2_0_1_0_2_0_tAFOX_2; if (root_6_0_0_0_2_0_1_0_2_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_1_0_2_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_2_tAFOX_2 .addElement("CI_Individual"); } else { root_6_0_0_0_2_0_1_0_2_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_2_tAFOX_2 .addElement("cit:CI_Individual"); } root_6_0_0_0_2_0_1_0_2_0_tAFOX_2 .setName("cit:CI_Individual"); org.dom4j.Element root_6_0_0_0_2_0_1_0_2_0_0_tAFOX_2; if (root_6_0_0_0_2_0_1_0_2_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_0_0_2_0_1_0_2_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_2_0_tAFOX_2 .addElement("name"); } else { root_6_0_0_0_2_0_1_0_2_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_2_0_tAFOX_2 .addElement("cit:name"); } root_6_0_0_0_2_0_1_0_2_0_0_tAFOX_2.setName("cit:name"); org.dom4j.Element root_6_0_0_0_2_0_1_0_2_0_0_0_tAFOX_2; if (root_6_0_0_0_2_0_1_0_2_0_0_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_6_0_0_0_2_0_1_0_2_0_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_2_0_0_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_0_0_2_0_1_0_2_0_0_0_tAFOX_2 = root_6_0_0_0_2_0_1_0_2_0_0_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("individualName") != null) { nestXMLTool_tAFOX_2.setText( root_6_0_0_0_2_0_1_0_2_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("individualName")); } root_6_0_0_0_2_0_1_0_2_0_0_0_tAFOX_2 .setName("gco:CharacterString"); org.dom4j.Element root_6_0_1_tAFOX_2; if (root_6_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_1_tAFOX_2 = root_6_0_tAFOX_2 .addElement("abstract"); } else { root_6_0_1_tAFOX_2 = root_6_0_tAFOX_2 .addElement("mri:abstract"); } root_6_0_1_tAFOX_2.setName("mri:abstract"); org.dom4j.Element root_6_0_1_0_tAFOX_2; if (root_6_0_1_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_6_0_1_0_tAFOX_2 = root_6_0_1_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_1_0_tAFOX_2 = root_6_0_1_tAFOX_2 .addElement("gco:CharacterString"); } root_6_0_1_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_6_0_2_tAFOX_2; if (root_6_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_2_tAFOX_2 = root_6_0_tAFOX_2 .addElement("purpose"); } else { root_6_0_2_tAFOX_2 = root_6_0_tAFOX_2 .addElement("mri:purpose"); } root_6_0_2_tAFOX_2.setName("mri:purpose"); org.dom4j.Element root_6_0_2_0_tAFOX_2; if (root_6_0_2_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_6_0_2_0_tAFOX_2 = root_6_0_2_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_2_0_tAFOX_2 = root_6_0_2_tAFOX_2 .addElement("gco:CharacterString"); } root_6_0_2_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_6_0_3_tAFOX_2; if (root_6_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_3_tAFOX_2 = root_6_0_tAFOX_2 .addElement("status"); } else { root_6_0_3_tAFOX_2 = root_6_0_tAFOX_2 .addElement("mri:status"); } root_6_0_3_tAFOX_2.setName("mri:status"); org.dom4j.Element root_6_0_3_0_tAFOX_2; if (root_6_0_3_tAFOX_2 .getNamespaceForPrefix("mcc") == null) { root_6_0_3_0_tAFOX_2 = root_6_0_3_tAFOX_2 .addElement("MD_ProgressCode"); } else { root_6_0_3_0_tAFOX_2 = root_6_0_3_tAFOX_2 .addElement("mcc:MD_ProgressCode"); } root_6_0_3_0_tAFOX_2.addAttribute("codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#MD_ProgressCode"); root_6_0_3_0_tAFOX_2.addAttribute("codeListValue", "completed"); root_6_0_3_0_tAFOX_2.setName("mcc:MD_ProgressCode"); org.dom4j.Element root_6_0_4_tAFOX_2; if (root_6_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_4_tAFOX_2 = root_6_0_tAFOX_2 .addElement("pointOfContact"); } else { root_6_0_4_tAFOX_2 = root_6_0_tAFOX_2 .addElement("mri:pointOfContact"); } root_6_0_4_tAFOX_2.setName("mri:pointOfContact"); org.dom4j.Element root_6_0_4_0_tAFOX_2; if (root_6_0_4_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_4_0_tAFOX_2 = root_6_0_4_tAFOX_2 .addElement("CI_Responsibility"); } else { root_6_0_4_0_tAFOX_2 = root_6_0_4_tAFOX_2 .addElement("cit:CI_Responsibility"); } root_6_0_4_0_tAFOX_2.setName("cit:CI_Responsibility"); org.dom4j.Element root_6_0_4_0_0_tAFOX_2; if (root_6_0_4_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_4_0_0_tAFOX_2 = root_6_0_4_0_tAFOX_2 .addElement("role"); } else { root_6_0_4_0_0_tAFOX_2 = root_6_0_4_0_tAFOX_2 .addElement("cit:role"); } root_6_0_4_0_0_tAFOX_2.setName("cit:role"); org.dom4j.Element root_6_0_4_0_0_0_tAFOX_2; if (root_6_0_4_0_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_4_0_0_0_tAFOX_2 = root_6_0_4_0_0_tAFOX_2 .addElement("CI_RoleCode"); } else { root_6_0_4_0_0_0_tAFOX_2 = root_6_0_4_0_0_tAFOX_2 .addElement("cit:CI_RoleCode"); } root_6_0_4_0_0_0_tAFOX_2.addAttribute("codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#CI_RoleCode"); root_6_0_4_0_0_0_tAFOX_2.addAttribute("codeListValue", "originator"); root_6_0_4_0_0_0_tAFOX_2.setName("cit:CI_RoleCode"); org.dom4j.Element root_6_0_4_0_1_tAFOX_2; if (root_6_0_4_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_4_0_1_tAFOX_2 = root_6_0_4_0_tAFOX_2 .addElement("party"); } else { root_6_0_4_0_1_tAFOX_2 = root_6_0_4_0_tAFOX_2 .addElement("cit:party"); } root_6_0_4_0_1_tAFOX_2.setName("cit:party"); org.dom4j.Element root_6_0_4_0_1_0_tAFOX_2; if (root_6_0_4_0_1_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_4_0_1_0_tAFOX_2 = root_6_0_4_0_1_tAFOX_2 .addElement("CI_Organisation"); } else { root_6_0_4_0_1_0_tAFOX_2 = root_6_0_4_0_1_tAFOX_2 .addElement("cit:CI_Organisation"); } root_6_0_4_0_1_0_tAFOX_2.setName("cit:CI_Organisation"); org.dom4j.Element root_6_0_4_0_1_0_0_tAFOX_2; if (root_6_0_4_0_1_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_4_0_1_0_0_tAFOX_2 = root_6_0_4_0_1_0_tAFOX_2 .addElement("name"); } else { root_6_0_4_0_1_0_0_tAFOX_2 = root_6_0_4_0_1_0_tAFOX_2 .addElement("cit:name"); } root_6_0_4_0_1_0_0_tAFOX_2.setName("cit:name"); org.dom4j.Element root_6_0_4_0_1_0_0_0_tAFOX_2; if (root_6_0_4_0_1_0_0_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_6_0_4_0_1_0_0_0_tAFOX_2 = root_6_0_4_0_1_0_0_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_4_0_1_0_0_0_tAFOX_2 = root_6_0_4_0_1_0_0_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("organisationName") != null) { nestXMLTool_tAFOX_2.setText( root_6_0_4_0_1_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("organisationName")); } root_6_0_4_0_1_0_0_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_6_0_4_0_1_0_1_tAFOX_2; if (root_6_0_4_0_1_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_4_0_1_0_1_tAFOX_2 = root_6_0_4_0_1_0_tAFOX_2 .addElement("contactInfo"); } else { root_6_0_4_0_1_0_1_tAFOX_2 = root_6_0_4_0_1_0_tAFOX_2 .addElement("cit:contactInfo"); } root_6_0_4_0_1_0_1_tAFOX_2.setName("cit:contactInfo"); org.dom4j.Element root_6_0_4_0_1_0_1_0_tAFOX_2; if (root_6_0_4_0_1_0_1_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_4_0_1_0_1_0_tAFOX_2 = root_6_0_4_0_1_0_1_tAFOX_2 .addElement("CI_Contact"); } else { root_6_0_4_0_1_0_1_0_tAFOX_2 = root_6_0_4_0_1_0_1_tAFOX_2 .addElement("cit:CI_Contact"); } root_6_0_4_0_1_0_1_0_tAFOX_2.setName("cit:CI_Contact"); org.dom4j.Element root_6_0_4_0_1_0_1_0_0_tAFOX_2; if (root_6_0_4_0_1_0_1_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_4_0_1_0_1_0_0_tAFOX_2 = root_6_0_4_0_1_0_1_0_tAFOX_2 .addElement("address"); } else { root_6_0_4_0_1_0_1_0_0_tAFOX_2 = root_6_0_4_0_1_0_1_0_tAFOX_2 .addElement("cit:address"); } root_6_0_4_0_1_0_1_0_0_tAFOX_2.setName("cit:address"); org.dom4j.Element root_6_0_4_0_1_0_1_0_0_0_tAFOX_2; if (root_6_0_4_0_1_0_1_0_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_tAFOX_2 .addElement("CI_Address"); } else { root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_tAFOX_2 .addElement("cit:CI_Address"); } root_6_0_4_0_1_0_1_0_0_0_tAFOX_2.setName("cit:CI_Address"); org.dom4j.Element root_6_0_4_0_1_0_1_0_0_0_0_tAFOX_2; if (root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_4_0_1_0_1_0_0_0_0_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 .addElement("deliveryPoint"); } else { root_6_0_4_0_1_0_1_0_0_0_0_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 .addElement("cit:deliveryPoint"); } root_6_0_4_0_1_0_1_0_0_0_0_tAFOX_2 .setName("cit:deliveryPoint"); org.dom4j.Element root_6_0_4_0_1_0_1_0_0_0_0_0_tAFOX_2; if (root_6_0_4_0_1_0_1_0_0_0_0_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_6_0_4_0_1_0_1_0_0_0_0_0_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_0_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_4_0_1_0_1_0_0_0_0_0_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_0_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("deliveryPoint") != null) { nestXMLTool_tAFOX_2.setText( root_6_0_4_0_1_0_1_0_0_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("deliveryPoint")); } root_6_0_4_0_1_0_1_0_0_0_0_0_tAFOX_2 .setName("gco:CharacterString"); org.dom4j.Element root_6_0_4_0_1_0_1_0_0_0_1_tAFOX_2; if (root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_4_0_1_0_1_0_0_0_1_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 .addElement("city"); } else { root_6_0_4_0_1_0_1_0_0_0_1_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 .addElement("cit:city"); } root_6_0_4_0_1_0_1_0_0_0_1_tAFOX_2.setName("cit:city"); org.dom4j.Element root_6_0_4_0_1_0_1_0_0_0_1_0_tAFOX_2; if (root_6_0_4_0_1_0_1_0_0_0_1_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_6_0_4_0_1_0_1_0_0_0_1_0_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_1_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_4_0_1_0_1_0_0_0_1_0_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_1_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("city") != null) { nestXMLTool_tAFOX_2.setText( root_6_0_4_0_1_0_1_0_0_0_1_0_tAFOX_2, valueMap_tAFOX_2.get("city")); } root_6_0_4_0_1_0_1_0_0_0_1_0_tAFOX_2 .setName("gco:CharacterString"); org.dom4j.Element root_6_0_4_0_1_0_1_0_0_0_2_tAFOX_2; if (root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_4_0_1_0_1_0_0_0_2_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 .addElement("administrativeArea"); } else { root_6_0_4_0_1_0_1_0_0_0_2_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 .addElement("cit:administrativeArea"); } root_6_0_4_0_1_0_1_0_0_0_2_tAFOX_2 .setName("cit:administrativeArea"); org.dom4j.Element root_6_0_4_0_1_0_1_0_0_0_2_0_tAFOX_2; if (root_6_0_4_0_1_0_1_0_0_0_2_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_6_0_4_0_1_0_1_0_0_0_2_0_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_2_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_4_0_1_0_1_0_0_0_2_0_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_2_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("administrativeArea") != null) { nestXMLTool_tAFOX_2.setText( root_6_0_4_0_1_0_1_0_0_0_2_0_tAFOX_2, valueMap_tAFOX_2.get("administrativeArea")); } root_6_0_4_0_1_0_1_0_0_0_2_0_tAFOX_2 .setName("gco:CharacterString"); org.dom4j.Element root_6_0_4_0_1_0_1_0_0_0_3_tAFOX_2; if (root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_4_0_1_0_1_0_0_0_3_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 .addElement("postalCode"); } else { root_6_0_4_0_1_0_1_0_0_0_3_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 .addElement("cit:postalCode"); } root_6_0_4_0_1_0_1_0_0_0_3_tAFOX_2 .setName("cit:postalCode"); org.dom4j.Element root_6_0_4_0_1_0_1_0_0_0_3_0_tAFOX_2; if (root_6_0_4_0_1_0_1_0_0_0_3_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_6_0_4_0_1_0_1_0_0_0_3_0_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_3_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_4_0_1_0_1_0_0_0_3_0_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_3_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("postalCode") != null) { nestXMLTool_tAFOX_2.setText( root_6_0_4_0_1_0_1_0_0_0_3_0_tAFOX_2, valueMap_tAFOX_2.get("postalCode")); } root_6_0_4_0_1_0_1_0_0_0_3_0_tAFOX_2 .setName("gco:CharacterString"); org.dom4j.Element root_6_0_4_0_1_0_1_0_0_0_4_tAFOX_2; if (root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_4_0_1_0_1_0_0_0_4_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 .addElement("country"); } else { root_6_0_4_0_1_0_1_0_0_0_4_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 .addElement("cit:country"); } root_6_0_4_0_1_0_1_0_0_0_4_tAFOX_2.setName("cit:country"); org.dom4j.Element root_6_0_4_0_1_0_1_0_0_0_4_0_tAFOX_2; if (root_6_0_4_0_1_0_1_0_0_0_4_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_6_0_4_0_1_0_1_0_0_0_4_0_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_4_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_4_0_1_0_1_0_0_0_4_0_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_4_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("country") != null) { nestXMLTool_tAFOX_2.setText( root_6_0_4_0_1_0_1_0_0_0_4_0_tAFOX_2, valueMap_tAFOX_2.get("country")); } root_6_0_4_0_1_0_1_0_0_0_4_0_tAFOX_2 .setName("gco:CharacterString"); org.dom4j.Element root_6_0_4_0_1_0_1_0_0_0_5_tAFOX_2; if (root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_4_0_1_0_1_0_0_0_5_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 .addElement("electronicMailAddress"); } else { root_6_0_4_0_1_0_1_0_0_0_5_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_tAFOX_2 .addElement("cit:electronicMailAddress"); } root_6_0_4_0_1_0_1_0_0_0_5_tAFOX_2 .setName("cit:electronicMailAddress"); org.dom4j.Element root_6_0_4_0_1_0_1_0_0_0_5_0_tAFOX_2; if (root_6_0_4_0_1_0_1_0_0_0_5_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_6_0_4_0_1_0_1_0_0_0_5_0_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_5_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_4_0_1_0_1_0_0_0_5_0_tAFOX_2 = root_6_0_4_0_1_0_1_0_0_0_5_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("email") != null) { nestXMLTool_tAFOX_2.setText( root_6_0_4_0_1_0_1_0_0_0_5_0_tAFOX_2, valueMap_tAFOX_2.get("email")); } root_6_0_4_0_1_0_1_0_0_0_5_0_tAFOX_2 .setName("gco:CharacterString"); org.dom4j.Element root_6_0_4_0_1_0_2_tAFOX_2; if (root_6_0_4_0_1_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_4_0_1_0_2_tAFOX_2 = root_6_0_4_0_1_0_tAFOX_2 .addElement("individual"); } else { root_6_0_4_0_1_0_2_tAFOX_2 = root_6_0_4_0_1_0_tAFOX_2 .addElement("cit:individual"); } root_6_0_4_0_1_0_2_tAFOX_2.setName("cit:individual"); org.dom4j.Element root_6_0_4_0_1_0_2_0_tAFOX_2; if (root_6_0_4_0_1_0_2_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_4_0_1_0_2_0_tAFOX_2 = root_6_0_4_0_1_0_2_tAFOX_2 .addElement("CI_Individual"); } else { root_6_0_4_0_1_0_2_0_tAFOX_2 = root_6_0_4_0_1_0_2_tAFOX_2 .addElement("cit:CI_Individual"); } root_6_0_4_0_1_0_2_0_tAFOX_2.setName("cit:CI_Individual"); org.dom4j.Element root_6_0_4_0_1_0_2_0_0_tAFOX_2; if (root_6_0_4_0_1_0_2_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_4_0_1_0_2_0_0_tAFOX_2 = root_6_0_4_0_1_0_2_0_tAFOX_2 .addElement("name"); } else { root_6_0_4_0_1_0_2_0_0_tAFOX_2 = root_6_0_4_0_1_0_2_0_tAFOX_2 .addElement("cit:name"); } root_6_0_4_0_1_0_2_0_0_tAFOX_2.setName("cit:name"); org.dom4j.Element root_6_0_4_0_1_0_2_0_0_0_tAFOX_2; if (root_6_0_4_0_1_0_2_0_0_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_6_0_4_0_1_0_2_0_0_0_tAFOX_2 = root_6_0_4_0_1_0_2_0_0_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_4_0_1_0_2_0_0_0_tAFOX_2 = root_6_0_4_0_1_0_2_0_0_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("individualName") != null) { nestXMLTool_tAFOX_2.setText( root_6_0_4_0_1_0_2_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("individualName")); } root_6_0_4_0_1_0_2_0_0_0_tAFOX_2 .setName("gco:CharacterString"); org.dom4j.Element root_6_0_4_0_1_0_2_0_1_tAFOX_2; if (root_6_0_4_0_1_0_2_0_tAFOX_2 .getNamespaceForPrefix("cit") == null) { root_6_0_4_0_1_0_2_0_1_tAFOX_2 = root_6_0_4_0_1_0_2_0_tAFOX_2 .addElement("positionName"); } else { root_6_0_4_0_1_0_2_0_1_tAFOX_2 = root_6_0_4_0_1_0_2_0_tAFOX_2 .addElement("cit:positionName"); } root_6_0_4_0_1_0_2_0_1_tAFOX_2.setName("cit:positionName"); org.dom4j.Element root_6_0_4_0_1_0_2_0_1_0_tAFOX_2; if (root_6_0_4_0_1_0_2_0_1_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_6_0_4_0_1_0_2_0_1_0_tAFOX_2 = root_6_0_4_0_1_0_2_0_1_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_4_0_1_0_2_0_1_0_tAFOX_2 = root_6_0_4_0_1_0_2_0_1_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("positionName") != null) { nestXMLTool_tAFOX_2.setText( root_6_0_4_0_1_0_2_0_1_0_tAFOX_2, valueMap_tAFOX_2.get("positionName")); } root_6_0_4_0_1_0_2_0_1_0_tAFOX_2 .setName("gco:CharacterString"); org.dom4j.Element root_6_0_5_tAFOX_2; if (root_6_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_5_tAFOX_2 = root_6_0_tAFOX_2 .addElement("spatialRepresentationType"); } else { root_6_0_5_tAFOX_2 = root_6_0_tAFOX_2 .addElement("mri:spatialRepresentationType"); } root_6_0_5_tAFOX_2.setName("mri:spatialRepresentationType"); org.dom4j.Element root_6_0_5_0_tAFOX_2; if (root_6_0_5_tAFOX_2 .getNamespaceForPrefix("mcc") == null) { root_6_0_5_0_tAFOX_2 = root_6_0_5_tAFOX_2 .addElement("MD_SpatialRepresentationTypeCode"); } else { root_6_0_5_0_tAFOX_2 = root_6_0_5_tAFOX_2.addElement( "mcc:MD_SpatialRepresentationTypeCode"); } root_6_0_5_0_tAFOX_2.addAttribute("codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/ML_gmxCodelists.xml#MD_SpatialRepresentationTypeCode"); if (valueMap_tAFOX_2 .get("spatialRepresentationType") != null) { root_6_0_5_0_tAFOX_2.addAttribute("codeListValue", valueMap_tAFOX_2 .get("spatialRepresentationType")); } root_6_0_5_0_tAFOX_2 .setName("mcc:MD_SpatialRepresentationTypeCode"); org.dom4j.Element root_6_0_6_tAFOX_2; if (root_6_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_6_tAFOX_2 = root_6_0_tAFOX_2 .addElement("spatialResolution"); } else { root_6_0_6_tAFOX_2 = root_6_0_tAFOX_2 .addElement("mri:spatialResolution"); } root_6_0_6_tAFOX_2.setName("mri:spatialResolution"); org.dom4j.Element root_6_0_6_0_tAFOX_2; if (root_6_0_6_tAFOX_2 .getNamespaceForPrefix("mri") == null) { root_6_0_6_0_tAFOX_2 = root_6_0_6_tAFOX_2 .addElement("MD_Resolution"); } else { root_6_0_6_0_tAFOX_2 = root_6_0_6_tAFOX_2 .addElement("mri:MD_Resolution"); } root_6_0_6_0_tAFOX_2.setName("mri:MD_Resolution"); org.dom4j.Element root_6_0_6_0_0_tAFOX_2; if (root_6_0_6_0_tAFOX_2 .getNamespaceForPrefix("mri") == null) { root_6_0_6_0_0_tAFOX_2 = root_6_0_6_0_tAFOX_2 .addElement("equivalentScale"); } else { root_6_0_6_0_0_tAFOX_2 = root_6_0_6_0_tAFOX_2 .addElement("mri:equivalentScale"); } root_6_0_6_0_0_tAFOX_2.setName("mri:equivalentScale"); org.dom4j.Element root_6_0_6_0_0_0_tAFOX_2; if (root_6_0_6_0_0_tAFOX_2 .getNamespaceForPrefix("mri") == null) { root_6_0_6_0_0_0_tAFOX_2 = root_6_0_6_0_0_tAFOX_2 .addElement("MD_RepresentativeFraction"); } else { root_6_0_6_0_0_0_tAFOX_2 = root_6_0_6_0_0_tAFOX_2 .addElement("mri:MD_RepresentativeFraction"); } root_6_0_6_0_0_0_tAFOX_2 .setName("mri:MD_RepresentativeFraction"); org.dom4j.Element root_6_0_6_0_0_0_0_tAFOX_2; if (root_6_0_6_0_0_0_tAFOX_2 .getNamespaceForPrefix("mri") == null) { root_6_0_6_0_0_0_0_tAFOX_2 = root_6_0_6_0_0_0_tAFOX_2 .addElement("denominator"); } else { root_6_0_6_0_0_0_0_tAFOX_2 = root_6_0_6_0_0_0_tAFOX_2 .addElement("mri:denominator"); } root_6_0_6_0_0_0_0_tAFOX_2.setName("mri:denominator"); org.dom4j.Element root_6_0_7_tAFOX_2; if (root_6_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_7_tAFOX_2 = root_6_0_tAFOX_2 .addElement("topicCategory"); } else { root_6_0_7_tAFOX_2 = root_6_0_tAFOX_2 .addElement("mri:topicCategory"); } root_6_0_7_tAFOX_2.setName("mri:topicCategory"); org.dom4j.Element root_6_0_8_tAFOX_2; if (root_6_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_8_tAFOX_2 = root_6_0_tAFOX_2 .addElement("extent"); } else { root_6_0_8_tAFOX_2 = root_6_0_tAFOX_2 .addElement("mri:extent"); } root_6_0_8_tAFOX_2.setName("mri:extent"); org.dom4j.Element root_6_0_8_0_tAFOX_2; if (root_6_0_8_tAFOX_2 .getNamespaceForPrefix("gex") == null) { root_6_0_8_0_tAFOX_2 = root_6_0_8_tAFOX_2 .addElement("EX_Extent"); } else { root_6_0_8_0_tAFOX_2 = root_6_0_8_tAFOX_2 .addElement("gex:EX_Extent"); } root_6_0_8_0_tAFOX_2.setName("gex:EX_Extent"); org.dom4j.Element root_6_0_8_0_0_tAFOX_2; if (root_6_0_8_0_tAFOX_2 .getNamespaceForPrefix("gex") == null) { root_6_0_8_0_0_tAFOX_2 = root_6_0_8_0_tAFOX_2 .addElement("temporalElement"); } else { root_6_0_8_0_0_tAFOX_2 = root_6_0_8_0_tAFOX_2 .addElement("gex:temporalElement"); } root_6_0_8_0_0_tAFOX_2.setName("gex:temporalElement"); org.dom4j.Element root_6_0_8_0_0_0_tAFOX_2; if (root_6_0_8_0_0_tAFOX_2 .getNamespaceForPrefix("gex") == null) { root_6_0_8_0_0_0_tAFOX_2 = root_6_0_8_0_0_tAFOX_2 .addElement("EX_TemporalExtent"); } else { root_6_0_8_0_0_0_tAFOX_2 = root_6_0_8_0_0_tAFOX_2 .addElement("gex:EX_TemporalExtent"); } root_6_0_8_0_0_0_tAFOX_2.setName("gex:EX_TemporalExtent"); org.dom4j.Element root_6_0_8_0_0_0_0_tAFOX_2; if (root_6_0_8_0_0_0_tAFOX_2 .getNamespaceForPrefix("gex") == null) { root_6_0_8_0_0_0_0_tAFOX_2 = root_6_0_8_0_0_0_tAFOX_2 .addElement("extent"); } else { root_6_0_8_0_0_0_0_tAFOX_2 = root_6_0_8_0_0_0_tAFOX_2 .addElement("gex:extent"); } root_6_0_8_0_0_0_0_tAFOX_2.setName("gex:extent"); org.dom4j.Element root_6_0_8_0_0_0_0_0_tAFOX_2; if (root_6_0_8_0_0_0_0_tAFOX_2 .getNamespaceForPrefix("gml") == null) { root_6_0_8_0_0_0_0_0_tAFOX_2 = root_6_0_8_0_0_0_0_tAFOX_2 .addElement("TimePeriod"); } else { root_6_0_8_0_0_0_0_0_tAFOX_2 = root_6_0_8_0_0_0_0_tAFOX_2 .addElement("gml:TimePeriod"); } root_6_0_8_0_0_0_0_0_tAFOX_2.addAttribute("gml:id", "A1234"); root_6_0_8_0_0_0_0_0_tAFOX_2.setName("gml:TimePeriod"); org.dom4j.Element root_6_0_8_0_0_0_0_0_0_tAFOX_2; if (root_6_0_8_0_0_0_0_0_tAFOX_2 .getNamespaceForPrefix("gml") == null) { root_6_0_8_0_0_0_0_0_0_tAFOX_2 = root_6_0_8_0_0_0_0_0_tAFOX_2 .addElement("beginPosition"); } else { root_6_0_8_0_0_0_0_0_0_tAFOX_2 = root_6_0_8_0_0_0_0_0_tAFOX_2 .addElement("gml:beginPosition"); } root_6_0_8_0_0_0_0_0_0_tAFOX_2.setName("gml:beginPosition"); org.dom4j.Element root_6_0_8_0_0_0_0_0_1_tAFOX_2; if (root_6_0_8_0_0_0_0_0_tAFOX_2 .getNamespaceForPrefix("gml") == null) { root_6_0_8_0_0_0_0_0_1_tAFOX_2 = root_6_0_8_0_0_0_0_0_tAFOX_2 .addElement("endPosition"); } else { root_6_0_8_0_0_0_0_0_1_tAFOX_2 = root_6_0_8_0_0_0_0_0_tAFOX_2 .addElement("gml:endPosition"); } root_6_0_8_0_0_0_0_0_1_tAFOX_2.setName("gml:endPosition"); org.dom4j.Element root_6_0_9_tAFOX_2; if (root_6_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_9_tAFOX_2 = root_6_0_tAFOX_2 .addElement("extent"); } else { root_6_0_9_tAFOX_2 = root_6_0_tAFOX_2 .addElement("mri:extent"); } root_6_0_9_tAFOX_2.setName("mri:extent"); org.dom4j.Element root_6_0_9_0_tAFOX_2; if (root_6_0_9_tAFOX_2 .getNamespaceForPrefix("gex") == null) { root_6_0_9_0_tAFOX_2 = root_6_0_9_tAFOX_2 .addElement("EX_Extent"); } else { root_6_0_9_0_tAFOX_2 = root_6_0_9_tAFOX_2 .addElement("gex:EX_Extent"); } root_6_0_9_0_tAFOX_2.setName("gex:EX_Extent"); org.dom4j.Element root_6_0_9_0_0_tAFOX_2; if (root_6_0_9_0_tAFOX_2 .getNamespaceForPrefix("gex") == null) { root_6_0_9_0_0_tAFOX_2 = root_6_0_9_0_tAFOX_2 .addElement("geographicElement"); } else { root_6_0_9_0_0_tAFOX_2 = root_6_0_9_0_tAFOX_2 .addElement("gex:geographicElement"); } root_6_0_9_0_0_tAFOX_2.setName("gex:geographicElement"); org.dom4j.Element root_6_0_9_0_0_0_tAFOX_2; if (root_6_0_9_0_0_tAFOX_2 .getNamespaceForPrefix("gex") == null) { root_6_0_9_0_0_0_tAFOX_2 = root_6_0_9_0_0_tAFOX_2 .addElement("EX_GeographicBoundingBox"); } else { root_6_0_9_0_0_0_tAFOX_2 = root_6_0_9_0_0_tAFOX_2 .addElement("gex:EX_GeographicBoundingBox"); } root_6_0_9_0_0_0_tAFOX_2 .setName("gex:EX_GeographicBoundingBox"); org.dom4j.Element root_6_0_9_0_0_0_0_tAFOX_2; if (root_6_0_9_0_0_0_tAFOX_2 .getNamespaceForPrefix("gex") == null) { root_6_0_9_0_0_0_0_tAFOX_2 = root_6_0_9_0_0_0_tAFOX_2 .addElement("westBoundLongitude"); } else { root_6_0_9_0_0_0_0_tAFOX_2 = root_6_0_9_0_0_0_tAFOX_2 .addElement("gex:westBoundLongitude"); } root_6_0_9_0_0_0_0_tAFOX_2 .setName("gex:westBoundLongitude"); org.dom4j.Element root_6_0_9_0_0_0_0_0_tAFOX_2; if (root_6_0_9_0_0_0_0_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_6_0_9_0_0_0_0_0_tAFOX_2 = root_6_0_9_0_0_0_0_tAFOX_2 .addElement("Decimal"); } else { root_6_0_9_0_0_0_0_0_tAFOX_2 = root_6_0_9_0_0_0_0_tAFOX_2 .addElement("gco:Decimal"); } if (valueMap_tAFOX_2.get("west") != null) { nestXMLTool_tAFOX_2.setText( root_6_0_9_0_0_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("west")); } root_6_0_9_0_0_0_0_0_tAFOX_2.setName("gco:Decimal"); org.dom4j.Element root_6_0_9_0_0_0_1_tAFOX_2; if (root_6_0_9_0_0_0_tAFOX_2 .getNamespaceForPrefix("gex") == null) { root_6_0_9_0_0_0_1_tAFOX_2 = root_6_0_9_0_0_0_tAFOX_2 .addElement("eastBoundLongitude"); } else { root_6_0_9_0_0_0_1_tAFOX_2 = root_6_0_9_0_0_0_tAFOX_2 .addElement("gex:eastBoundLongitude"); } root_6_0_9_0_0_0_1_tAFOX_2 .setName("gex:eastBoundLongitude"); org.dom4j.Element root_6_0_9_0_0_0_1_0_tAFOX_2; if (root_6_0_9_0_0_0_1_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_6_0_9_0_0_0_1_0_tAFOX_2 = root_6_0_9_0_0_0_1_tAFOX_2 .addElement("Decimal"); } else { root_6_0_9_0_0_0_1_0_tAFOX_2 = root_6_0_9_0_0_0_1_tAFOX_2 .addElement("gco:Decimal"); } if (valueMap_tAFOX_2.get("east") != null) { nestXMLTool_tAFOX_2.setText( root_6_0_9_0_0_0_1_0_tAFOX_2, valueMap_tAFOX_2.get("east")); } root_6_0_9_0_0_0_1_0_tAFOX_2.setName("gco:Decimal"); org.dom4j.Element root_6_0_9_0_0_0_2_tAFOX_2; if (root_6_0_9_0_0_0_tAFOX_2 .getNamespaceForPrefix("gex") == null) { root_6_0_9_0_0_0_2_tAFOX_2 = root_6_0_9_0_0_0_tAFOX_2 .addElement("southBoundLatitude"); } else { root_6_0_9_0_0_0_2_tAFOX_2 = root_6_0_9_0_0_0_tAFOX_2 .addElement("gex:southBoundLatitude"); } root_6_0_9_0_0_0_2_tAFOX_2 .setName("gex:southBoundLatitude"); org.dom4j.Element root_6_0_9_0_0_0_2_0_tAFOX_2; if (root_6_0_9_0_0_0_2_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_6_0_9_0_0_0_2_0_tAFOX_2 = root_6_0_9_0_0_0_2_tAFOX_2 .addElement("Decimal"); } else { root_6_0_9_0_0_0_2_0_tAFOX_2 = root_6_0_9_0_0_0_2_tAFOX_2 .addElement("gco:Decimal"); } if (valueMap_tAFOX_2.get("south") != null) { nestXMLTool_tAFOX_2.setText( root_6_0_9_0_0_0_2_0_tAFOX_2, valueMap_tAFOX_2.get("south")); } root_6_0_9_0_0_0_2_0_tAFOX_2.setName("gco:Decimal"); org.dom4j.Element root_6_0_9_0_0_0_3_tAFOX_2; if (root_6_0_9_0_0_0_tAFOX_2 .getNamespaceForPrefix("gex") == null) { root_6_0_9_0_0_0_3_tAFOX_2 = root_6_0_9_0_0_0_tAFOX_2 .addElement("northBoundLatitude"); } else { root_6_0_9_0_0_0_3_tAFOX_2 = root_6_0_9_0_0_0_tAFOX_2 .addElement("gex:northBoundLatitude"); } root_6_0_9_0_0_0_3_tAFOX_2 .setName("gex:northBoundLatitude"); org.dom4j.Element root_6_0_9_0_0_0_3_0_tAFOX_2; if (root_6_0_9_0_0_0_3_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_6_0_9_0_0_0_3_0_tAFOX_2 = root_6_0_9_0_0_0_3_tAFOX_2 .addElement("Decimal"); } else { root_6_0_9_0_0_0_3_0_tAFOX_2 = root_6_0_9_0_0_0_3_tAFOX_2 .addElement("gco:Decimal"); } if (valueMap_tAFOX_2.get("north") != null) { nestXMLTool_tAFOX_2.setText( root_6_0_9_0_0_0_3_0_tAFOX_2, valueMap_tAFOX_2.get("north")); } root_6_0_9_0_0_0_3_0_tAFOX_2.setName("gco:Decimal"); org.dom4j.Element root_6_0_10_tAFOX_2; if (root_6_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_10_tAFOX_2 = root_6_0_tAFOX_2 .addElement("resourceMaintenance"); } else { root_6_0_10_tAFOX_2 = root_6_0_tAFOX_2 .addElement("mri:resourceMaintenance"); } root_6_0_10_tAFOX_2.setName("mri:resourceMaintenance"); org.dom4j.Element root_6_0_10_0_tAFOX_2; if (root_6_0_10_tAFOX_2 .getNamespaceForPrefix("mmi") == null) { root_6_0_10_0_tAFOX_2 = root_6_0_10_tAFOX_2 .addElement("MD_MaintenanceInformation"); } else { root_6_0_10_0_tAFOX_2 = root_6_0_10_tAFOX_2 .addElement("mmi:MD_MaintenanceInformation"); } root_6_0_10_0_tAFOX_2 .setName("mmi:MD_MaintenanceInformation"); org.dom4j.Element root_6_0_10_0_0_tAFOX_2; if (root_6_0_10_0_tAFOX_2 .getNamespaceForPrefix("mmi") == null) { root_6_0_10_0_0_tAFOX_2 = root_6_0_10_0_tAFOX_2 .addElement("maintenanceAndUpdateFrequency"); } else { root_6_0_10_0_0_tAFOX_2 = root_6_0_10_0_tAFOX_2 .addElement( "mmi:maintenanceAndUpdateFrequency"); } root_6_0_10_0_0_tAFOX_2 .setName("mmi:maintenanceAndUpdateFrequency"); org.dom4j.Element root_6_0_10_0_0_0_tAFOX_2; if (root_6_0_10_0_0_tAFOX_2 .getNamespaceForPrefix("mmi") == null) { root_6_0_10_0_0_0_tAFOX_2 = root_6_0_10_0_0_tAFOX_2 .addElement("MD_MaintenanceFrequencyCode"); } else { root_6_0_10_0_0_0_tAFOX_2 = root_6_0_10_0_0_tAFOX_2 .addElement("mmi:MD_MaintenanceFrequencyCode"); } root_6_0_10_0_0_0_tAFOX_2.addAttribute("codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#MD_MaintenanceFrequencyCode"); root_6_0_10_0_0_0_tAFOX_2.addAttribute("codeListValue", "asNeeded"); root_6_0_10_0_0_0_tAFOX_2 .setName("mmi:MD_MaintenanceFrequencyCode"); org.dom4j.Element root_6_0_11_tAFOX_2; if (root_6_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_11_tAFOX_2 = root_6_0_tAFOX_2 .addElement("descriptiveKeywords"); } else { root_6_0_11_tAFOX_2 = root_6_0_tAFOX_2 .addElement("mri:descriptiveKeywords"); } root_6_0_11_tAFOX_2.setName("mri:descriptiveKeywords"); org.dom4j.Element root_6_0_11_0_tAFOX_2; if (root_6_0_11_tAFOX_2 .getNamespaceForPrefix("mri") == null) { root_6_0_11_0_tAFOX_2 = root_6_0_11_tAFOX_2 .addElement("MD_Keywords"); } else { root_6_0_11_0_tAFOX_2 = root_6_0_11_tAFOX_2 .addElement("mri:MD_Keywords"); } root_6_0_11_0_tAFOX_2.setName("mri:MD_Keywords"); org.dom4j.Element root_6_0_11_0_0_tAFOX_2; if (root_6_0_11_0_tAFOX_2 .getNamespaceForPrefix("mri") == null) { root_6_0_11_0_0_tAFOX_2 = root_6_0_11_0_tAFOX_2 .addElement("keyword"); } else { root_6_0_11_0_0_tAFOX_2 = root_6_0_11_0_tAFOX_2 .addElement("mri:keyword"); } root_6_0_11_0_0_tAFOX_2.setName("mri:keyword"); org.dom4j.Element root_6_0_11_0_0_0_tAFOX_2; if (root_6_0_11_0_0_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_6_0_11_0_0_0_tAFOX_2 = root_6_0_11_0_0_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_11_0_0_0_tAFOX_2 = root_6_0_11_0_0_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("keyword") != null) { nestXMLTool_tAFOX_2.setText(root_6_0_11_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("keyword")); } root_6_0_11_0_0_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_6_0_11_0_1_tAFOX_2; if (root_6_0_11_0_tAFOX_2 .getNamespaceForPrefix("mri") == null) { root_6_0_11_0_1_tAFOX_2 = root_6_0_11_0_tAFOX_2 .addElement("type"); } else { root_6_0_11_0_1_tAFOX_2 = root_6_0_11_0_tAFOX_2 .addElement("mri:type"); } root_6_0_11_0_1_tAFOX_2.setName("mri:type"); org.dom4j.Element root_6_0_11_0_1_0_tAFOX_2; if (root_6_0_11_0_1_tAFOX_2 .getNamespaceForPrefix("mri") == null) { root_6_0_11_0_1_0_tAFOX_2 = root_6_0_11_0_1_tAFOX_2 .addElement("MD_KeywordTypeCode"); } else { root_6_0_11_0_1_0_tAFOX_2 = root_6_0_11_0_1_tAFOX_2 .addElement("mri:MD_KeywordTypeCode"); } root_6_0_11_0_1_0_tAFOX_2.addAttribute("codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#MD_KeywordTypeCode"); root_6_0_11_0_1_0_tAFOX_2.setName("mri:MD_KeywordTypeCode"); org.dom4j.Element root_6_0_12_tAFOX_2; if (root_6_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_12_tAFOX_2 = root_6_0_tAFOX_2 .addElement("descriptiveKeywords"); } else { root_6_0_12_tAFOX_2 = root_6_0_tAFOX_2 .addElement("mri:descriptiveKeywords"); } root_6_0_12_tAFOX_2.setName("mri:descriptiveKeywords"); org.dom4j.Element root_6_0_12_0_tAFOX_2; if (root_6_0_12_tAFOX_2 .getNamespaceForPrefix("mri") == null) { root_6_0_12_0_tAFOX_2 = root_6_0_12_tAFOX_2 .addElement("MD_Keywords"); } else { root_6_0_12_0_tAFOX_2 = root_6_0_12_tAFOX_2 .addElement("mri:MD_Keywords"); } root_6_0_12_0_tAFOX_2.setName("mri:MD_Keywords"); org.dom4j.Element root_6_0_12_0_0_tAFOX_2; if (root_6_0_12_0_tAFOX_2 .getNamespaceForPrefix("mri") == null) { root_6_0_12_0_0_tAFOX_2 = root_6_0_12_0_tAFOX_2 .addElement("keyword"); } else { root_6_0_12_0_0_tAFOX_2 = root_6_0_12_0_tAFOX_2 .addElement("mri:keyword"); } root_6_0_12_0_0_tAFOX_2.setName("mri:keyword"); org.dom4j.Element root_6_0_12_0_0_0_tAFOX_2; if (root_6_0_12_0_0_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_6_0_12_0_0_0_tAFOX_2 = root_6_0_12_0_0_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_12_0_0_0_tAFOX_2 = root_6_0_12_0_0_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("keyword2") != null) { nestXMLTool_tAFOX_2.setText(root_6_0_12_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("keyword2")); } root_6_0_12_0_0_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_6_0_12_0_1_tAFOX_2; if (root_6_0_12_0_tAFOX_2 .getNamespaceForPrefix("mri") == null) { root_6_0_12_0_1_tAFOX_2 = root_6_0_12_0_tAFOX_2 .addElement("type"); } else { root_6_0_12_0_1_tAFOX_2 = root_6_0_12_0_tAFOX_2 .addElement("mri:type"); } root_6_0_12_0_1_tAFOX_2.setName("mri:type"); org.dom4j.Element root_6_0_12_0_1_0_tAFOX_2; if (root_6_0_12_0_1_tAFOX_2 .getNamespaceForPrefix("mri") == null) { root_6_0_12_0_1_0_tAFOX_2 = root_6_0_12_0_1_tAFOX_2 .addElement("MD_KeywordTypeCode"); } else { root_6_0_12_0_1_0_tAFOX_2 = root_6_0_12_0_1_tAFOX_2 .addElement("mri:MD_KeywordTypeCode"); } root_6_0_12_0_1_0_tAFOX_2.addAttribute("codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#MD_KeywordTypeCode"); if (valueMap_tAFOX_2.get("keyword2_theme") != null) { root_6_0_12_0_1_0_tAFOX_2.addAttribute("codeListValue", valueMap_tAFOX_2.get("keyword2_theme")); } root_6_0_12_0_1_0_tAFOX_2.setName("mri:MD_KeywordTypeCode"); org.dom4j.Element root_6_0_13_tAFOX_2; if (root_6_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_13_tAFOX_2 = root_6_0_tAFOX_2 .addElement("resourceConstraints"); } else { root_6_0_13_tAFOX_2 = root_6_0_tAFOX_2 .addElement("mri:resourceConstraints"); } root_6_0_13_tAFOX_2.setName("mri:resourceConstraints"); org.dom4j.Element root_6_0_13_0_tAFOX_2; if (root_6_0_13_tAFOX_2 .getNamespaceForPrefix("mco") == null) { root_6_0_13_0_tAFOX_2 = root_6_0_13_tAFOX_2 .addElement("MD_LegalConstraints"); } else { root_6_0_13_0_tAFOX_2 = root_6_0_13_tAFOX_2 .addElement("mco:MD_LegalConstraints"); } root_6_0_13_0_tAFOX_2.setName("mco:MD_LegalConstraints"); org.dom4j.Element root_6_0_13_0_0_tAFOX_2; if (root_6_0_13_0_tAFOX_2 .getNamespaceForPrefix("mco") == null) { root_6_0_13_0_0_tAFOX_2 = root_6_0_13_0_tAFOX_2 .addElement("accessConstraints"); } else { root_6_0_13_0_0_tAFOX_2 = root_6_0_13_0_tAFOX_2 .addElement("mco:accessConstraints"); } root_6_0_13_0_0_tAFOX_2.setName("mco:accessConstraints"); org.dom4j.Element root_6_0_13_0_0_0_tAFOX_2; if (root_6_0_13_0_0_tAFOX_2 .getNamespaceForPrefix("mco") == null) { root_6_0_13_0_0_0_tAFOX_2 = root_6_0_13_0_0_tAFOX_2 .addElement("MD_RestrictionCode"); } else { root_6_0_13_0_0_0_tAFOX_2 = root_6_0_13_0_0_tAFOX_2 .addElement("mco:MD_RestrictionCode"); } root_6_0_13_0_0_0_tAFOX_2.addAttribute("codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#MD_RestrictionCode"); root_6_0_13_0_0_0_tAFOX_2.addAttribute("codeListValue", "copyright"); root_6_0_13_0_0_0_tAFOX_2.setName("mco:MD_RestrictionCode"); org.dom4j.Element root_6_0_13_0_1_tAFOX_2; if (root_6_0_13_0_tAFOX_2 .getNamespaceForPrefix("mco") == null) { root_6_0_13_0_1_tAFOX_2 = root_6_0_13_0_tAFOX_2 .addElement("useConstraints"); } else { root_6_0_13_0_1_tAFOX_2 = root_6_0_13_0_tAFOX_2 .addElement("mco:useConstraints"); } root_6_0_13_0_1_tAFOX_2.setName("mco:useConstraints"); org.dom4j.Element root_6_0_13_0_1_0_tAFOX_2; if (root_6_0_13_0_1_tAFOX_2 .getNamespaceForPrefix("mco") == null) { root_6_0_13_0_1_0_tAFOX_2 = root_6_0_13_0_1_tAFOX_2 .addElement("MD_RestrictionCode"); } else { root_6_0_13_0_1_0_tAFOX_2 = root_6_0_13_0_1_tAFOX_2 .addElement("mco:MD_RestrictionCode"); } root_6_0_13_0_1_0_tAFOX_2.addAttribute("codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#MD_RestrictionCode"); root_6_0_13_0_1_0_tAFOX_2.addAttribute("codeListValue", "otherRestrictions"); root_6_0_13_0_1_0_tAFOX_2.setName("mco:MD_RestrictionCode"); org.dom4j.Element root_6_0_13_0_2_tAFOX_2; if (root_6_0_13_0_tAFOX_2 .getNamespaceForPrefix("mco") == null) { root_6_0_13_0_2_tAFOX_2 = root_6_0_13_0_tAFOX_2 .addElement("otherConstraints"); } else { root_6_0_13_0_2_tAFOX_2 = root_6_0_13_0_tAFOX_2 .addElement("mco:otherConstraints"); } root_6_0_13_0_2_tAFOX_2.setName("mco:otherConstraints"); org.dom4j.Element root_6_0_13_0_2_0_tAFOX_2; if (root_6_0_13_0_2_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_6_0_13_0_2_0_tAFOX_2 = root_6_0_13_0_2_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_13_0_2_0_tAFOX_2 = root_6_0_13_0_2_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("useConstraints") != null) { nestXMLTool_tAFOX_2.setText(root_6_0_13_0_2_0_tAFOX_2, valueMap_tAFOX_2.get("useConstraints")); } root_6_0_13_0_2_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_6_0_14_tAFOX_2; if (root_6_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_14_tAFOX_2 = root_6_0_tAFOX_2 .addElement("defaultLocale"); } else { root_6_0_14_tAFOX_2 = root_6_0_tAFOX_2 .addElement("mri:defaultLocale"); } root_6_0_14_tAFOX_2.setName("mri:defaultLocale"); org.dom4j.Element root_6_0_14_0_tAFOX_2; if (root_6_0_14_tAFOX_2 .getNamespaceForPrefix("lan") == null) { root_6_0_14_0_tAFOX_2 = root_6_0_14_tAFOX_2 .addElement("PT_Locale"); } else { root_6_0_14_0_tAFOX_2 = root_6_0_14_tAFOX_2 .addElement("lan:PT_Locale"); } root_6_0_14_0_tAFOX_2.setName("lan:PT_Locale"); org.dom4j.Element root_6_0_14_0_0_tAFOX_2; if (root_6_0_14_0_tAFOX_2 .getNamespaceForPrefix("lan") == null) { root_6_0_14_0_0_tAFOX_2 = root_6_0_14_0_tAFOX_2 .addElement("language"); } else { root_6_0_14_0_0_tAFOX_2 = root_6_0_14_0_tAFOX_2 .addElement("lan:language"); } root_6_0_14_0_0_tAFOX_2.setName("lan:language"); org.dom4j.Element root_6_0_14_0_0_0_tAFOX_2; if (root_6_0_14_0_0_tAFOX_2 .getNamespaceForPrefix("lan") == null) { root_6_0_14_0_0_0_tAFOX_2 = root_6_0_14_0_0_tAFOX_2 .addElement("LanguageCode"); } else { root_6_0_14_0_0_0_tAFOX_2 = root_6_0_14_0_0_tAFOX_2 .addElement("lan:LanguageCode"); } root_6_0_14_0_0_0_tAFOX_2.addAttribute("codeList", "http://www.loc.gov/standards/iso639-2/"); if (valueMap_tAFOX_2.get("mdLanguage") != null) { root_6_0_14_0_0_0_tAFOX_2.addAttribute("codeListValue", valueMap_tAFOX_2.get("mdLanguage")); } root_6_0_14_0_0_0_tAFOX_2.setName("lan:LanguageCode"); org.dom4j.Element root_6_0_14_0_1_tAFOX_2; if (root_6_0_14_0_tAFOX_2 .getNamespaceForPrefix("lan") == null) { root_6_0_14_0_1_tAFOX_2 = root_6_0_14_0_tAFOX_2 .addElement("characterEncoding"); } else { root_6_0_14_0_1_tAFOX_2 = root_6_0_14_0_tAFOX_2 .addElement("lan:characterEncoding"); } root_6_0_14_0_1_tAFOX_2.setName("lan:characterEncoding"); org.dom4j.Element root_6_0_14_0_1_0_tAFOX_2; if (root_6_0_14_0_1_tAFOX_2 .getNamespaceForPrefix("lan") == null) { root_6_0_14_0_1_0_tAFOX_2 = root_6_0_14_0_1_tAFOX_2 .addElement("MD_CharacterSetCode"); } else { root_6_0_14_0_1_0_tAFOX_2 = root_6_0_14_0_1_tAFOX_2 .addElement("lan:MD_CharacterSetCode"); } root_6_0_14_0_1_0_tAFOX_2.addAttribute("codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#MD_CharacterSetCode"); if (valueMap_tAFOX_2.get("mdCharacterSetCode") != null) { root_6_0_14_0_1_0_tAFOX_2.addAttribute("codeListValue", valueMap_tAFOX_2.get("mdCharacterSetCode")); } root_6_0_14_0_1_0_tAFOX_2 .setName("lan:MD_CharacterSetCode"); org.dom4j.Element root_6_0_15_tAFOX_2; if (root_6_0_tAFOX_2.getNamespaceForPrefix("mri") == null) { root_6_0_15_tAFOX_2 = root_6_0_tAFOX_2 .addElement("supplementalInformation"); } else { root_6_0_15_tAFOX_2 = root_6_0_tAFOX_2 .addElement("mri:supplementalInformation"); } root_6_0_15_tAFOX_2.setName("mri:supplementalInformation"); org.dom4j.Element root_6_0_15_0_tAFOX_2; if (root_6_0_15_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_6_0_15_0_tAFOX_2 = root_6_0_15_tAFOX_2 .addElement("CharacterString"); } else { root_6_0_15_0_tAFOX_2 = root_6_0_15_tAFOX_2 .addElement("gco:CharacterString"); } root_6_0_15_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_7_tAFOX_2; if (root_tAFOX_2.getNamespaceForPrefix("mdb") == null) { root_7_tAFOX_2 = root_tAFOX_2.addElement("contentInfo"); } else { root_7_tAFOX_2 = root_tAFOX_2 .addElement("mdb:contentInfo"); } root_7_tAFOX_2.setName("mdb:contentInfo"); org.dom4j.Element root_7_0_tAFOX_2; if (root_7_tAFOX_2.getNamespaceForPrefix("mrc") == null) { root_7_0_tAFOX_2 = root_7_tAFOX_2 .addElement("MD_FeatureCatalogue"); } else { root_7_0_tAFOX_2 = root_7_tAFOX_2 .addElement("mrc:MD_FeatureCatalogue"); } root_7_0_tAFOX_2.setName("mrc:MD_FeatureCatalogue"); org.dom4j.Element root_7_0_0_tAFOX_2; if (root_7_0_tAFOX_2.getNamespaceForPrefix("mrc") == null) { root_7_0_0_tAFOX_2 = root_7_0_tAFOX_2 .addElement("featureCatalogue"); } else { root_7_0_0_tAFOX_2 = root_7_0_tAFOX_2 .addElement("mrc:featureCatalogue"); } root_7_0_0_tAFOX_2.setName("mrc:featureCatalogue"); org.dom4j.Element root_7_0_0_0_tAFOX_2; if (root_7_0_0_tAFOX_2 .getNamespaceForPrefix("gfc") == null) { root_7_0_0_0_tAFOX_2 = root_7_0_0_tAFOX_2 .addElement("FC_FeatureCatalogue"); } else { root_7_0_0_0_tAFOX_2 = root_7_0_0_tAFOX_2 .addElement("gfc:FC_FeatureCatalogue"); } root_7_0_0_0_tAFOX_2.setName("gfc:FC_FeatureCatalogue"); org.dom4j.Element root_7_0_0_0_0_tAFOX_2; if (root_7_0_0_0_tAFOX_2 .getNamespaceForPrefix("gfc") == null) { root_7_0_0_0_0_tAFOX_2 = root_7_0_0_0_tAFOX_2 .addElement("producer"); } else { root_7_0_0_0_0_tAFOX_2 = root_7_0_0_0_tAFOX_2 .addElement("gfc:producer"); } root_7_0_0_0_0_tAFOX_2.setName("gfc:producer"); org.dom4j.Element root_7_0_0_0_1_tAFOX_2; if (root_7_0_0_0_tAFOX_2 .getNamespaceForPrefix("gfc") == null) { root_7_0_0_0_1_tAFOX_2 = root_7_0_0_0_tAFOX_2 .addElement("featureType"); } else { root_7_0_0_0_1_tAFOX_2 = root_7_0_0_0_tAFOX_2 .addElement("gfc:featureType"); } root_7_0_0_0_1_tAFOX_2.setName("gfc:featureType"); org.dom4j.Element root_7_0_0_0_1_0_tAFOX_2; if (root_7_0_0_0_1_tAFOX_2 .getNamespaceForPrefix("gfc") == null) { root_7_0_0_0_1_0_tAFOX_2 = root_7_0_0_0_1_tAFOX_2 .addElement("FC_FeatureType"); } else { root_7_0_0_0_1_0_tAFOX_2 = root_7_0_0_0_1_tAFOX_2 .addElement("gfc:FC_FeatureType"); } subTreeRootParent_tAFOX_2 = root_7_0_0_0_1_0_tAFOX_2; root_7_0_0_0_1_0_tAFOX_2.setName("gfc:FC_FeatureType"); org.dom4j.Element root_7_0_0_0_1_0_0_tAFOX_2; if (root_7_0_0_0_1_0_tAFOX_2 .getNamespaceForPrefix("gfc") == null) { root_7_0_0_0_1_0_0_tAFOX_2 = root_7_0_0_0_1_0_tAFOX_2 .addElement("typeName"); } else { root_7_0_0_0_1_0_0_tAFOX_2 = root_7_0_0_0_1_0_tAFOX_2 .addElement("gfc:typeName"); } if (valueMap_tAFOX_2.get("layerName") != null) { nestXMLTool_tAFOX_2.setText(root_7_0_0_0_1_0_0_tAFOX_2, valueMap_tAFOX_2.get("layerName")); } root_7_0_0_0_1_0_0_tAFOX_2.setName("gfc:typeName"); org.dom4j.Element root_7_0_0_0_1_0_1_tAFOX_2; if (root_7_0_0_0_1_0_tAFOX_2 .getNamespaceForPrefix("gfc") == null) { root_7_0_0_0_1_0_1_tAFOX_2 = root_7_0_0_0_1_0_tAFOX_2 .addElement("isAbstract"); } else { root_7_0_0_0_1_0_1_tAFOX_2 = root_7_0_0_0_1_0_tAFOX_2 .addElement("gfc:isAbstract"); } root_7_0_0_0_1_0_1_tAFOX_2.setName("gfc:isAbstract"); org.dom4j.Element root_7_0_0_0_1_0_1_0_tAFOX_2; if (root_7_0_0_0_1_0_1_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_7_0_0_0_1_0_1_0_tAFOX_2 = root_7_0_0_0_1_0_1_tAFOX_2 .addElement("Boolean"); } else { root_7_0_0_0_1_0_1_0_tAFOX_2 = root_7_0_0_0_1_0_1_tAFOX_2 .addElement("gco:Boolean"); } nestXMLTool_tAFOX_2 .parseAndAdd(root_7_0_0_0_1_0_1_0_tAFOX_2, "false"); root_7_0_0_0_1_0_1_0_tAFOX_2.setName("gco:Boolean"); org.dom4j.Element root_7_0_0_0_1_0_2_tAFOX_2; if (root_7_0_0_0_1_0_tAFOX_2 .getNamespaceForPrefix("gfc") == null) { root_7_0_0_0_1_0_2_tAFOX_2 = root_7_0_0_0_1_0_tAFOX_2 .addElement("featureCatalogue"); } else { root_7_0_0_0_1_0_2_tAFOX_2 = root_7_0_0_0_1_0_tAFOX_2 .addElement("gfc:featureCatalogue"); } root_7_0_0_0_1_0_2_tAFOX_2.setName("gfc:featureCatalogue"); org.dom4j.Element root_8_tAFOX_2; if (root_tAFOX_2.getNamespaceForPrefix("mdb") == null) { root_8_tAFOX_2 = root_tAFOX_2 .addElement("distributionInfo"); } else { root_8_tAFOX_2 = root_tAFOX_2 .addElement("mdb:distributionInfo"); } root_8_tAFOX_2.setName("mdb:distributionInfo"); org.dom4j.Element root_8_0_tAFOX_2; if (root_8_tAFOX_2.getNamespaceForPrefix("mrd") == null) { root_8_0_tAFOX_2 = root_8_tAFOX_2 .addElement("MD_Distribution"); } else { root_8_0_tAFOX_2 = root_8_tAFOX_2 .addElement("mrd:MD_Distribution"); } root_8_0_tAFOX_2.setName("mrd:MD_Distribution"); org.dom4j.Element root_8_0_0_tAFOX_2; if (root_8_0_tAFOX_2.getNamespaceForPrefix("mrd") == null) { root_8_0_0_tAFOX_2 = root_8_0_tAFOX_2 .addElement("transferOptions"); } else { root_8_0_0_tAFOX_2 = root_8_0_tAFOX_2 .addElement("mrd:transferOptions"); } root_8_0_0_tAFOX_2.setName("mrd:transferOptions"); org.dom4j.Element root_8_0_0_0_tAFOX_2; if (root_8_0_0_tAFOX_2 .getNamespaceForPrefix("mrd") == null) { root_8_0_0_0_tAFOX_2 = root_8_0_0_tAFOX_2 .addElement("MD_DigitalTransferOptions"); } else { root_8_0_0_0_tAFOX_2 = root_8_0_0_tAFOX_2 .addElement("mrd:MD_DigitalTransferOptions"); } root_8_0_0_0_tAFOX_2 .setName("mrd:MD_DigitalTransferOptions"); org.dom4j.Element root_9_tAFOX_2; if (root_tAFOX_2.getNamespaceForPrefix("mdb") == null) { root_9_tAFOX_2 = root_tAFOX_2 .addElement("resourceLineage"); } else { root_9_tAFOX_2 = root_tAFOX_2 .addElement("mdb:resourceLineage"); } root_9_tAFOX_2.setName("mdb:resourceLineage"); org.dom4j.Element root_9_0_tAFOX_2; if (root_9_tAFOX_2.getNamespaceForPrefix("mrl") == null) { root_9_0_tAFOX_2 = root_9_tAFOX_2 .addElement("LI_Lineage"); } else { root_9_0_tAFOX_2 = root_9_tAFOX_2 .addElement("mrl:LI_Lineage"); } root_9_0_tAFOX_2.setName("mrl:LI_Lineage"); org.dom4j.Element root_9_0_0_tAFOX_2; if (root_9_0_tAFOX_2.getNamespaceForPrefix("mrl") == null) { root_9_0_0_tAFOX_2 = root_9_0_tAFOX_2 .addElement("statement"); } else { root_9_0_0_tAFOX_2 = root_9_0_tAFOX_2 .addElement("mrl:statement"); } root_9_0_0_tAFOX_2.addAttribute("gco:nilReason", "missing"); root_9_0_0_tAFOX_2.setName("mrl:statement"); org.dom4j.Element root_9_0_0_0_tAFOX_2; if (root_9_0_0_tAFOX_2 .getNamespaceForPrefix("gco") == null) { root_9_0_0_0_tAFOX_2 = root_9_0_0_tAFOX_2 .addElement("CharacterString"); } else { root_9_0_0_0_tAFOX_2 = root_9_0_0_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("lineage") != null) { nestXMLTool_tAFOX_2.setText(root_9_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("lineage")); } root_9_0_0_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element root_9_0_1_tAFOX_2; if (root_9_0_tAFOX_2.getNamespaceForPrefix("mrl") == null) { root_9_0_1_tAFOX_2 = root_9_0_tAFOX_2 .addElement("scope"); } else { root_9_0_1_tAFOX_2 = root_9_0_tAFOX_2 .addElement("mrl:scope"); } root_9_0_1_tAFOX_2.setName("mrl:scope"); org.dom4j.Element root_9_0_1_0_tAFOX_2; if (root_9_0_1_tAFOX_2 .getNamespaceForPrefix("mcc") == null) { root_9_0_1_0_tAFOX_2 = root_9_0_1_tAFOX_2 .addElement("MD_Scope"); } else { root_9_0_1_0_tAFOX_2 = root_9_0_1_tAFOX_2 .addElement("mcc:MD_Scope"); } root_9_0_1_0_tAFOX_2.setName("mcc:MD_Scope"); org.dom4j.Element root_9_0_1_0_0_tAFOX_2; if (root_9_0_1_0_tAFOX_2 .getNamespaceForPrefix("mcc") == null) { root_9_0_1_0_0_tAFOX_2 = root_9_0_1_0_tAFOX_2 .addElement("level"); } else { root_9_0_1_0_0_tAFOX_2 = root_9_0_1_0_tAFOX_2 .addElement("mcc:level"); } root_9_0_1_0_0_tAFOX_2.setName("mcc:level"); org.dom4j.Element root_9_0_1_0_0_0_tAFOX_2; if (root_9_0_1_0_0_tAFOX_2 .getNamespaceForPrefix("mcc") == null) { root_9_0_1_0_0_0_tAFOX_2 = root_9_0_1_0_0_tAFOX_2 .addElement("MD_ScopeCode"); } else { root_9_0_1_0_0_0_tAFOX_2 = root_9_0_1_0_0_tAFOX_2 .addElement("mcc:MD_ScopeCode"); } root_9_0_1_0_0_0_tAFOX_2.addAttribute("codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/ML_gmxCodelists.xml#MD_ScopeCode"); if (valueMap_tAFOX_2.get("scopeCode") != null) { root_9_0_1_0_0_0_tAFOX_2.addAttribute("codeListValue", valueMap_tAFOX_2.get("scopeCode")); } root_9_0_1_0_0_0_tAFOX_2.setName("mcc:MD_ScopeCode"); root4Group_tAFOX_2 = subTreeRootParent_tAFOX_2; } else { subTreeRootParent_tAFOX_2 = root4Group_tAFOX_2; } // build group xml tree // build loop xml tree org.dom4j.Element loop_tAFOX_2; if (subTreeRootParent_tAFOX_2 .getNamespaceForPrefix("gfc") == null) { loop_tAFOX_2 = org.dom4j.DocumentHelper .createElement("carrierOfCharacteristics"); } else { loop_tAFOX_2 = org.dom4j.DocumentHelper .createElement("gfc:carrierOfCharacteristics"); } if (orders_tAFOX_2[0] == 0) { orders_tAFOX_2[0] = 2; } if (1 < orders_tAFOX_2.length) { orders_tAFOX_2[1] = 0; } subTreeRootParent_tAFOX_2.elements().add(orders_tAFOX_2[0]++, loop_tAFOX_2); loop_tAFOX_2.setName("gfc:carrierOfCharacteristics"); org.dom4j.Element loop_0_tAFOX_2; if (loop_tAFOX_2.getNamespaceForPrefix("gfc") == null) { loop_0_tAFOX_2 = loop_tAFOX_2 .addElement("FC_FeatureAttribute"); } else { loop_0_tAFOX_2 = loop_tAFOX_2 .addElement("gfc:FC_FeatureAttribute"); } loop_0_tAFOX_2.setName("gfc:FC_FeatureAttribute"); org.dom4j.Element loop_0_0_tAFOX_2; if (loop_0_tAFOX_2.getNamespaceForPrefix("gfc") == null) { loop_0_0_tAFOX_2 = loop_0_tAFOX_2.addElement("featureType"); } else { loop_0_0_tAFOX_2 = loop_0_tAFOX_2 .addElement("gfc:featureType"); } loop_0_0_tAFOX_2.setName("gfc:featureType"); org.dom4j.Element loop_0_0_0_tAFOX_2; if (loop_0_0_tAFOX_2.getNamespaceForPrefix("gfc") == null) { loop_0_0_0_tAFOX_2 = loop_0_0_tAFOX_2 .addElement("FC_FeatureType"); } else { loop_0_0_0_tAFOX_2 = loop_0_0_tAFOX_2 .addElement("gfc:FC_FeatureType"); } loop_0_0_0_tAFOX_2.setName("gfc:FC_FeatureType"); org.dom4j.Element loop_0_0_0_0_tAFOX_2; if (loop_0_0_0_tAFOX_2.getNamespaceForPrefix("gfc") == null) { loop_0_0_0_0_tAFOX_2 = loop_0_0_0_tAFOX_2 .addElement("typeName"); } else { loop_0_0_0_0_tAFOX_2 = loop_0_0_0_tAFOX_2 .addElement("gfc:typeName"); } loop_0_0_0_0_tAFOX_2.setName("gfc:typeName"); org.dom4j.Element loop_0_0_0_1_tAFOX_2; if (loop_0_0_0_tAFOX_2.getNamespaceForPrefix("gfc") == null) { loop_0_0_0_1_tAFOX_2 = loop_0_0_0_tAFOX_2 .addElement("definition"); } else { loop_0_0_0_1_tAFOX_2 = loop_0_0_0_tAFOX_2 .addElement("gfc:definition"); } loop_0_0_0_1_tAFOX_2.setName("gfc:definition"); org.dom4j.Element loop_0_0_0_1_0_tAFOX_2; if (loop_0_0_0_1_tAFOX_2.getNamespaceForPrefix("gco") == null) { loop_0_0_0_1_0_tAFOX_2 = loop_0_0_0_1_tAFOX_2 .addElement("CharacterString"); } else { loop_0_0_0_1_0_tAFOX_2 = loop_0_0_0_1_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("colType") != null) { nestXMLTool_tAFOX_2.setText(loop_0_0_0_1_0_tAFOX_2, valueMap_tAFOX_2.get("colType")); } loop_0_0_0_1_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element loop_0_0_0_2_tAFOX_2; if (loop_0_0_0_tAFOX_2.getNamespaceForPrefix("gfc") == null) { loop_0_0_0_2_tAFOX_2 = loop_0_0_0_tAFOX_2 .addElement("isAbstract"); } else { loop_0_0_0_2_tAFOX_2 = loop_0_0_0_tAFOX_2 .addElement("gfc:isAbstract"); } loop_0_0_0_2_tAFOX_2.setName("gfc:isAbstract"); org.dom4j.Element loop_0_0_0_2_0_tAFOX_2; if (loop_0_0_0_2_tAFOX_2.getNamespaceForPrefix("gco") == null) { loop_0_0_0_2_0_tAFOX_2 = loop_0_0_0_2_tAFOX_2 .addElement("Boolean"); } else { loop_0_0_0_2_0_tAFOX_2 = loop_0_0_0_2_tAFOX_2 .addElement("gco:Boolean"); } nestXMLTool_tAFOX_2.parseAndAdd(loop_0_0_0_2_0_tAFOX_2, "false"); loop_0_0_0_2_0_tAFOX_2.setName("gco:Boolean"); org.dom4j.Element loop_0_1_tAFOX_2; if (loop_0_tAFOX_2.getNamespaceForPrefix("gfc") == null) { loop_0_1_tAFOX_2 = loop_0_tAFOX_2 .addElement("constrainedBy"); } else { loop_0_1_tAFOX_2 = loop_0_tAFOX_2 .addElement("gfc:constrainedBy"); } loop_0_1_tAFOX_2.setName("gfc:constrainedBy"); org.dom4j.Element loop_0_1_0_tAFOX_2; if (loop_0_1_tAFOX_2.getNamespaceForPrefix("gfc") == null) { loop_0_1_0_tAFOX_2 = loop_0_1_tAFOX_2 .addElement("FC_Constraint"); } else { loop_0_1_0_tAFOX_2 = loop_0_1_tAFOX_2 .addElement("gfc:FC_Constraint"); } loop_0_1_0_tAFOX_2.setName("gfc:FC_Constraint"); org.dom4j.Element loop_0_1_0_0_tAFOX_2; if (loop_0_1_0_tAFOX_2.getNamespaceForPrefix("gfc") == null) { loop_0_1_0_0_tAFOX_2 = loop_0_1_0_tAFOX_2 .addElement("description"); } else { loop_0_1_0_0_tAFOX_2 = loop_0_1_0_tAFOX_2 .addElement("gfc:description"); } loop_0_1_0_0_tAFOX_2.addAttribute("gco:nilReason", "missing"); loop_0_1_0_0_tAFOX_2.setName("gfc:description"); org.dom4j.Element loop_0_2_tAFOX_2; if (loop_0_tAFOX_2.getNamespaceForPrefix("gfc") == null) { loop_0_2_tAFOX_2 = loop_0_tAFOX_2.addElement("memberName"); } else { loop_0_2_tAFOX_2 = loop_0_tAFOX_2 .addElement("gfc:memberName"); } if (valueMap_tAFOX_2.get("colName") != null) { nestXMLTool_tAFOX_2.setText(loop_0_2_tAFOX_2, valueMap_tAFOX_2.get("colName")); } loop_0_2_tAFOX_2.setName("gfc:memberName"); org.dom4j.Element loop_0_3_tAFOX_2; if (loop_0_tAFOX_2.getNamespaceForPrefix("gfc") == null) { loop_0_3_tAFOX_2 = loop_0_tAFOX_2.addElement("definition"); } else { loop_0_3_tAFOX_2 = loop_0_tAFOX_2 .addElement("gfc:definition"); } loop_0_3_tAFOX_2.setName("gfc:definition"); org.dom4j.Element loop_0_3_0_tAFOX_2; if (loop_0_3_tAFOX_2.getNamespaceForPrefix("gco") == null) { loop_0_3_0_tAFOX_2 = loop_0_3_tAFOX_2 .addElement("CharacterString"); } else { loop_0_3_0_tAFOX_2 = loop_0_3_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("colType") != null) { nestXMLTool_tAFOX_2.setText(loop_0_3_0_tAFOX_2, valueMap_tAFOX_2.get("colType")); } loop_0_3_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element loop_0_4_tAFOX_2; if (loop_0_tAFOX_2.getNamespaceForPrefix("gfc") == null) { loop_0_4_tAFOX_2 = loop_0_tAFOX_2.addElement("cardinality"); } else { loop_0_4_tAFOX_2 = loop_0_tAFOX_2 .addElement("gfc:cardinality"); } loop_0_4_tAFOX_2.addAttribute("gco:nilReason", "missing"); loop_0_4_tAFOX_2.setName("gfc:cardinality"); org.dom4j.Element loop_0_4_0_tAFOX_2; if (loop_0_4_tAFOX_2.getNamespaceForPrefix("gco") == null) { loop_0_4_0_tAFOX_2 = loop_0_4_tAFOX_2 .addElement("CharacterString"); } else { loop_0_4_0_tAFOX_2 = loop_0_4_tAFOX_2 .addElement("gco:CharacterString"); } loop_0_4_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element loop_0_5_tAFOX_2; if (loop_0_tAFOX_2.getNamespaceForPrefix("gfc") == null) { loop_0_5_tAFOX_2 = loop_0_tAFOX_2.addElement("valueType"); } else { loop_0_5_tAFOX_2 = loop_0_tAFOX_2 .addElement("gfc:valueType"); } loop_0_5_tAFOX_2.setName("gfc:valueType"); org.dom4j.Element loop_0_5_0_tAFOX_2; if (loop_0_5_tAFOX_2.getNamespaceForPrefix("gco") == null) { loop_0_5_0_tAFOX_2 = loop_0_5_tAFOX_2 .addElement("TypeName"); } else { loop_0_5_0_tAFOX_2 = loop_0_5_tAFOX_2 .addElement("gco:TypeName"); } loop_0_5_0_tAFOX_2.setName("gco:TypeName"); org.dom4j.Element loop_0_5_0_0_tAFOX_2; if (loop_0_5_0_tAFOX_2.getNamespaceForPrefix("gco") == null) { loop_0_5_0_0_tAFOX_2 = loop_0_5_0_tAFOX_2 .addElement("aName"); } else { loop_0_5_0_0_tAFOX_2 = loop_0_5_0_tAFOX_2 .addElement("gco:aName"); } loop_0_5_0_0_tAFOX_2.setName("gco:aName"); org.dom4j.Element loop_0_5_0_0_0_tAFOX_2; if (loop_0_5_0_0_tAFOX_2.getNamespaceForPrefix("gco") == null) { loop_0_5_0_0_0_tAFOX_2 = loop_0_5_0_0_tAFOX_2 .addElement("CharacterString"); } else { loop_0_5_0_0_0_tAFOX_2 = loop_0_5_0_0_tAFOX_2 .addElement("gco:CharacterString"); } if (valueMap_tAFOX_2.get("colType") != null) { nestXMLTool_tAFOX_2.setText(loop_0_5_0_0_0_tAFOX_2, valueMap_tAFOX_2.get("colType")); } loop_0_5_0_0_0_tAFOX_2.setName("gco:CharacterString"); org.dom4j.Element loop_0_6_tAFOX_2; if (loop_0_tAFOX_2.getNamespaceForPrefix("gfc") == null) { loop_0_6_tAFOX_2 = loop_0_tAFOX_2.addElement("listedValue"); } else { loop_0_6_tAFOX_2 = loop_0_tAFOX_2 .addElement("gfc:listedValue"); } loop_0_6_tAFOX_2.setName("gfc:listedValue"); tos_count_tAdvancedFileOutputXML_2++; /** * [tAdvancedFileOutputXML_2 * main ] stop */ } // End of branch "row4" } // C_01 // end for } } // End of branch "iso19115_3" } // close loop of lookup 'metadataProperties' // // G_TM_M_043 /** * [sOGRInfoInput_3 end ] start */ currentComponent = "sOGRInfoInput_3"; nb_line_sOGRInfoInput_3++; } } // Delete current dataset if (dataset_sOGRInfoInput_3 != null) dataset_sOGRInfoInput_3.delete(); globalMap.put("sOGRInfoInput_3_NB_LINE", nb_line_sOGRInfoInput_3); globalMap.put("sOGRInfoInput_3_NB_ERRORS", nbErrors_sOGRInfoInput_3); globalMap.put("sOGRInfoInput_3_ERRORS", errors_sOGRInfoInput_3); ok_Hash.put("sOGRInfoInput_3", true); end_Hash.put("sOGRInfoInput_3", System.currentTimeMillis()); /** * [sOGRInfoInput_3 end ] stop */ /** * [tReplaceList_1 end ] start */ currentComponent = "tReplaceList_1"; ok_Hash.put("tReplaceList_1", true); end_Hash.put("tReplaceList_1", System.currentTimeMillis()); /** * [tReplaceList_1 end ] stop */ /** * [tLogRow_1 end ] start */ currentComponent = "tLogRow_1"; ok_Hash.put("tLogRow_1", true); end_Hash.put("tLogRow_1", System.currentTimeMillis()); /** * [tLogRow_1 end ] stop */ /** * [tMap_1 end ] start */ currentComponent = "tMap_1"; // ############################### // # Lookup hashes releasing // ############################### ok_Hash.put("tMap_1", true); end_Hash.put("tMap_1", System.currentTimeMillis()); /** * [tMap_1 end ] stop */ /** * [tNormalize_1 end ] start */ currentComponent = "tNormalize_1"; globalMap.put("tNormalize_1_NB_LINE", nb_line_tNormalize_1); ok_Hash.put("tNormalize_1", true); end_Hash.put("tNormalize_1", System.currentTimeMillis()); /** * [tNormalize_1 end ] stop */ /** * [tExtractDelimitedFields_3 end ] start */ currentComponent = "tExtractDelimitedFields_3"; globalMap.put("tExtractDelimitedFields_3_NB_LINE", nb_line_tExtractDelimitedFields_3); ok_Hash.put("tExtractDelimitedFields_3", true); end_Hash.put("tExtractDelimitedFields_3", System.currentTimeMillis()); /** * [tExtractDelimitedFields_3 end ] stop */ /** * [tLogRow_2 end ] start */ currentComponent = "tLogRow_2"; ok_Hash.put("tLogRow_2", true); end_Hash.put("tLogRow_2", System.currentTimeMillis()); /** * [tLogRow_2 end ] stop */ /** * [tAdvancedFileOutputXML_2 end ] start */ currentComponent = "tAdvancedFileOutputXML_2"; java.io.FileOutputStream stream_tAFOX_2 = new java.io.FileOutputStream(fileName_tAFOX_2); org.dom4j.io.XMLWriter output_tAFOX_2 = new org.dom4j.io.XMLWriter(stream_tAFOX_2, format_tAFOX_2); if (doc_tAFOX_2.getRootElement() != null) { nestXMLTool_tAFOX_2.replaceDefaultNameSpace(doc_tAFOX_2.getRootElement()); output_tAFOX_2.write(doc_tAFOX_2); } output_tAFOX_2.close(); globalMap.put("tAdvancedFileOutputXML_2_NB_LINE", nb_line_tAFOX_2); ok_Hash.put("tAdvancedFileOutputXML_2", true); end_Hash.put("tAdvancedFileOutputXML_2", System.currentTimeMillis()); /** * [tAdvancedFileOutputXML_2 end ] stop */ /** * [sOGRInfoInput_1 end ] start */ currentComponent = "sOGRInfoInput_1"; nb_line_sOGRInfoInput_1++; } } // Delete current dataset if (dataset_sOGRInfoInput_1 != null) dataset_sOGRInfoInput_1.delete(); globalMap.put("sOGRInfoInput_1_NB_LINE", nb_line_sOGRInfoInput_1); globalMap.put("sOGRInfoInput_1_NB_ERRORS", nbErrors_sOGRInfoInput_1); globalMap.put("sOGRInfoInput_1_ERRORS", errors_sOGRInfoInput_1); ok_Hash.put("sOGRInfoInput_1", true); end_Hash.put("sOGRInfoInput_1", System.currentTimeMillis()); /** * [sOGRInfoInput_1 end ] stop */ /** * [tFlowToIterate_1 end ] start */ currentComponent = "tFlowToIterate_1"; globalMap.put("tFlowToIterate_1_NB_LINE", nb_line_tFlowToIterate_1); ok_Hash.put("tFlowToIterate_1", true); end_Hash.put("tFlowToIterate_1", System.currentTimeMillis()); /** * [tFlowToIterate_1 end ] stop */ } // end the resume } catch (java.lang.Exception e) { TalendException te = new TalendException(e, currentComponent, globalMap); throw te; } catch (java.lang.Error error) { throw error; } finally { // free memory for "tMap_1" globalMap.remove("tHash_Lookup_metadataProperties"); // free memory for "tReplaceList_1" globalMap.remove("tHash_geometryType"); try { /** * [sOGRInfoInput_1 finally ] start */ currentComponent = "sOGRInfoInput_1"; /** * [sOGRInfoInput_1 finally ] stop */ /** * [tFlowToIterate_1 finally ] start */ currentComponent = "tFlowToIterate_1"; /** * [tFlowToIterate_1 finally ] stop */ /** * [sOGRInfoInput_3 finally ] start */ currentComponent = "sOGRInfoInput_3"; /** * [sOGRInfoInput_3 finally ] stop */ /** * [tReplaceList_1 finally ] start */ currentComponent = "tReplaceList_1"; /** * [tReplaceList_1 finally ] stop */ /** * [tLogRow_1 finally ] start */ currentComponent = "tLogRow_1"; /** * [tLogRow_1 finally ] stop */ /** * [tMap_1 finally ] start */ currentComponent = "tMap_1"; /** * [tMap_1 finally ] stop */ /** * [tNormalize_1 finally ] start */ currentComponent = "tNormalize_1"; /** * [tNormalize_1 finally ] stop */ /** * [tExtractDelimitedFields_3 finally ] start */ currentComponent = "tExtractDelimitedFields_3"; /** * [tExtractDelimitedFields_3 finally ] stop */ /** * [tLogRow_2 finally ] start */ currentComponent = "tLogRow_2"; /** * [tLogRow_2 finally ] stop */ /** * [tAdvancedFileOutputXML_2 finally ] start */ currentComponent = "tAdvancedFileOutputXML_2"; /** * [tAdvancedFileOutputXML_2 finally ] stop */ } catch (java.lang.Exception e) { // ignore } catch (java.lang.Error error) { // ignore } resourceMap = null; } globalMap.put("sOGRInfoInput_1_SUBPROCESS_STATE", 1); }
From source file:net.sf.cpsolver.coursett.TimetableXMLSaver.java
License:Open Source License
public void save(File outFile) throws Exception { if (outFile == null) outFile = new File(iOutputFolder, "solution.xml"); outFile.getParentFile().mkdirs();//w w w. j a v a2 s . c o m sLogger.debug("Writting XML data to:" + outFile); Document document = DocumentHelper.createDocument(); document.addComment("University Course Timetabling"); if (iSaveCurrent && !getModel().assignedVariables().isEmpty()) { StringBuffer comments = new StringBuffer("Solution Info:\n"); Map<String, String> solutionInfo = (getSolution() == null ? getModel().getInfo() : getSolution().getInfo()); for (String key : new TreeSet<String>(solutionInfo.keySet())) { String value = solutionInfo.get(key); comments.append(" " + key + ": " + value + "\n"); } document.addComment(comments.toString()); } Element root = document.addElement("timetable"); root.addAttribute("version", "2.5"); root.addAttribute("initiative", getModel().getProperties().getProperty("Data.Initiative")); root.addAttribute("term", getModel().getProperties().getProperty("Data.Term")); root.addAttribute("year", String.valueOf(getModel().getYear())); root.addAttribute("created", String.valueOf(new Date())); root.addAttribute("nrDays", String.valueOf(Constants.DAY_CODES.length)); root.addAttribute("slotsPerDay", String.valueOf(Constants.SLOTS_PER_DAY)); if (!iConvertIds && getModel().getProperties().getProperty("General.SessionId") != null) root.addAttribute("session", getModel().getProperties().getProperty("General.SessionId")); if (iShowNames && !iConvertIds && getModel().getProperties().getProperty("General.SolverGroupId") != null) root.addAttribute("solverGroup", getId("solverGroup", getModel().getProperties().getProperty("General.SolverGroupId"))); HashMap<String, Element> roomElements = new HashMap<String, Element>(); Element roomsEl = root.addElement("rooms"); for (RoomConstraint roomConstraint : getModel().getRoomConstraints()) { Element roomEl = roomsEl.addElement("room").addAttribute("id", getId("room", roomConstraint.getResourceId())); roomEl.addAttribute("constraint", "true"); if (roomConstraint instanceof DiscouragedRoomConstraint) roomEl.addAttribute("discouraged", "true"); if (iShowNames) { roomEl.addAttribute("name", roomConstraint.getRoomName()); } if (!iConvertIds && roomConstraint.getBuildingId() != null) roomEl.addAttribute("building", getId("bldg", roomConstraint.getBuildingId())); roomElements.put(getId("room", roomConstraint.getResourceId()), roomEl); roomEl.addAttribute("capacity", String.valueOf(roomConstraint.getCapacity())); if (roomConstraint.getPosX() != null && roomConstraint.getPosY() != null) roomEl.addAttribute("location", roomConstraint.getPosX() + "," + roomConstraint.getPosY()); if (roomConstraint.getIgnoreTooFar()) roomEl.addAttribute("ignoreTooFar", "true"); if (!roomConstraint.getConstraint()) roomEl.addAttribute("fake", "true"); if (roomConstraint.getSharingModel() != null) { RoomSharingModel sharingModel = roomConstraint.getSharingModel(); Element sharingEl = roomEl.addElement("sharing"); sharingEl.addElement("pattern").addAttribute("unit", "6").setText(sharingModel.getPreferences()); sharingEl.addElement("freeForAll").addAttribute("value", String.valueOf(RoomSharingModel.sFreeForAllPrefChar)); sharingEl.addElement("notAvailable").addAttribute("value", String.valueOf(RoomSharingModel.sNotAvailablePrefChar)); for (int i = 0; i < sharingModel.getNrDepartments(); i++) { sharingEl.addElement("department").addAttribute("value", String.valueOf((char) ('0' + i))) .addAttribute("id", getId("dept", sharingModel.getDepartmentIds()[i])); } } if (roomConstraint.getType() != null && iShowNames) roomEl.addAttribute("type", roomConstraint.getType().toString()); } Element instructorsEl = root.addElement("instructors"); Element departmentsEl = root.addElement("departments"); HashMap<Long, String> depts = new HashMap<Long, String>(); Element configsEl = (iShowNames ? root.addElement("configurations") : null); HashSet<Configuration> configs = new HashSet<Configuration>(); Element classesEl = root.addElement("classes"); HashMap<Long, Element> classElements = new HashMap<Long, Element>(); List<Lecture> vars = new ArrayList<Lecture>(getModel().variables()); if (getModel().hasConstantVariables()) vars.addAll(getModel().constantVariables()); for (Lecture lecture : vars) { Placement placement = lecture.getAssignment(); if (lecture.isCommitted() && placement == null) placement = lecture.getInitialAssignment(); Placement initialPlacement = lecture.getInitialAssignment(); // if (initialPlacement==null) initialPlacement = // (Placement)lecture.getAssignment(); Placement bestPlacement = lecture.getBestAssignment(); Element classEl = classesEl.addElement("class").addAttribute("id", getId("class", lecture.getClassId())); classElements.put(lecture.getClassId(), classEl); if (iShowNames && lecture.getNote() != null) classEl.addAttribute("note", lecture.getNote()); if (iShowNames && !lecture.isCommitted()) classEl.addAttribute("ord", String.valueOf(lecture.getOrd())); if (iShowNames && lecture.getSolverGroupId() != null) classEl.addAttribute("solverGroup", getId("solverGroup", lecture.getSolverGroupId())); if (lecture.getParent() == null && lecture.getConfiguration() != null) { if (!iShowNames) classEl.addAttribute("offering", getId("offering", lecture.getConfiguration().getOfferingId().toString())); classEl.addAttribute("config", getId("config", lecture.getConfiguration().getConfigId().toString())); if (iShowNames && configs.add(lecture.getConfiguration())) { configsEl.addElement("config") .addAttribute("id", getId("config", lecture.getConfiguration().getConfigId().toString())) .addAttribute("limit", String.valueOf(lecture.getConfiguration().getLimit())) .addAttribute("offering", getId("offering", lecture.getConfiguration().getOfferingId().toString())); } } classEl.addAttribute("committed", (lecture.isCommitted() ? "true" : "false")); if (lecture.getParent() != null) classEl.addAttribute("parent", getId("class", lecture.getParent().getClassId())); if (lecture.getSchedulingSubpartId() != null) classEl.addAttribute("subpart", getId("subpart", lecture.getSchedulingSubpartId())); if (iShowNames && lecture.isCommitted() && placement != null && placement.getAssignmentId() != null) { classEl.addAttribute("assignment", getId("assignment", placement.getAssignmentId())); } if (!lecture.isCommitted()) { if (lecture.minClassLimit() == lecture.maxClassLimit()) { classEl.addAttribute("classLimit", String.valueOf(lecture.maxClassLimit())); } else { classEl.addAttribute("minClassLimit", String.valueOf(lecture.minClassLimit())); classEl.addAttribute("maxClassLimit", String.valueOf(lecture.maxClassLimit())); } if (lecture.roomToLimitRatio() != 1.0) classEl.addAttribute("roomToLimitRatio", String.valueOf(lecture.roomToLimitRatio())); } if (lecture.getNrRooms() != 1) classEl.addAttribute("nrRooms", String.valueOf(lecture.getNrRooms())); if (iShowNames) classEl.addAttribute("name", lecture.getName()); if (lecture.getDeptSpreadConstraint() != null) { classEl.addAttribute("department", getId("dept", lecture.getDeptSpreadConstraint().getDepartmentId())); depts.put(lecture.getDeptSpreadConstraint().getDepartmentId(), lecture.getDeptSpreadConstraint().getName()); } if (lecture.getScheduler() != null) classEl.addAttribute("scheduler", getId("dept", lecture.getScheduler())); for (InstructorConstraint ic : lecture.getInstructorConstraints()) { Element instrEl = classEl.addElement("instructor").addAttribute("id", getId("inst", ic.getResourceId())); if ((lecture.isCommitted() || iSaveCurrent) && placement != null) instrEl.addAttribute("solution", "true"); if (iSaveInitial && initialPlacement != null) instrEl.addAttribute("initial", "true"); if (iSaveBest && bestPlacement != null && !bestPlacement.equals(placement)) instrEl.addAttribute("best", "true"); } for (RoomLocation rl : lecture.roomLocations()) { Element roomLocationEl = classEl.addElement("room"); roomLocationEl.addAttribute("id", getId("room", rl.getId())); roomLocationEl.addAttribute("pref", String.valueOf(rl.getPreference())); if ((lecture.isCommitted() || iSaveCurrent) && placement != null && placement.hasRoomLocation(rl.getId())) roomLocationEl.addAttribute("solution", "true"); if (iSaveInitial && initialPlacement != null && initialPlacement.hasRoomLocation(rl.getId())) roomLocationEl.addAttribute("initial", "true"); if (iSaveBest && bestPlacement != null && !bestPlacement.equals(placement) && bestPlacement.hasRoomLocation(rl.getId())) roomLocationEl.addAttribute("best", "true"); if (!roomElements.containsKey(getId("room", rl.getId()))) { // room location without room constraint Element roomEl = roomsEl.addElement("room").addAttribute("id", getId("room", rl.getId())); roomEl.addAttribute("constraint", "false"); if (!iConvertIds && rl.getBuildingId() != null) roomEl.addAttribute("building", getId("bldg", rl.getBuildingId())); if (iShowNames) { roomEl.addAttribute("name", rl.getName()); } roomElements.put(getId("room", rl.getId()), roomEl); roomEl.addAttribute("capacity", String.valueOf(rl.getRoomSize())); if (rl.getPosX() != null && rl.getPosY() != null) roomEl.addAttribute("location", rl.getPosX() + "," + rl.getPosY()); if (rl.getIgnoreTooFar()) roomEl.addAttribute("ignoreTooFar", "true"); } } boolean first = true; for (TimeLocation tl : lecture.timeLocations()) { Element timeLocationEl = classEl.addElement("time"); timeLocationEl.addAttribute("days", sDF[7].format(Long.parseLong(Integer.toBinaryString(tl.getDayCode())))); timeLocationEl.addAttribute("start", String.valueOf(tl.getStartSlot())); timeLocationEl.addAttribute("length", String.valueOf(tl.getLength())); timeLocationEl.addAttribute("breakTime", String.valueOf(tl.getBreakTime())); if (iShowNames) { timeLocationEl.addAttribute("pref", String.valueOf(tl.getPreference())); timeLocationEl.addAttribute("npref", String.valueOf(tl.getNormalizedPreference())); } else { timeLocationEl.addAttribute("pref", String.valueOf(tl.getNormalizedPreference())); } if (!iConvertIds && tl.getTimePatternId() != null) timeLocationEl.addAttribute("pattern", getId("pat", tl.getTimePatternId())); if (first) { if (!iConvertIds && tl.getDatePatternId() != null) classEl.addAttribute("datePattern", getId("dpat", String.valueOf(tl.getDatePatternId()))); if (iShowNames) classEl.addAttribute("datePatternName", tl.getDatePatternName()); classEl.addAttribute("dates", bitset2string(tl.getWeekCode())); first = false; } if ((lecture.isCommitted() || iSaveCurrent) && placement != null && placement.getTimeLocation().equals(tl)) timeLocationEl.addAttribute("solution", "true"); if (iSaveInitial && initialPlacement != null && initialPlacement.getTimeLocation().equals(tl)) timeLocationEl.addAttribute("initial", "true"); if (iSaveBest && bestPlacement != null && !bestPlacement.equals(placement) && bestPlacement.getTimeLocation().equals(tl)) timeLocationEl.addAttribute("best", "true"); } } for (InstructorConstraint ic : getModel().getInstructorConstraints()) { if (iShowNames || ic.isIgnoreDistances()) { Element instrEl = instructorsEl.addElement("instructor").addAttribute("id", getId("inst", ic.getResourceId())); if (iShowNames) { if (ic.getPuid() != null && ic.getPuid().length() > 0) instrEl.addAttribute("puid", ic.getPuid()); instrEl.addAttribute("name", ic.getName()); if (ic.getType() != null && iShowNames) instrEl.addAttribute("type", ic.getType().toString()); } if (ic.isIgnoreDistances()) { instrEl.addAttribute("ignDist", "true"); } } if (ic.getAvailableArray() != null) { HashSet<Long> done = new HashSet<Long>(); for (int i = 0; i < ic.getAvailableArray().length; i++) { if (ic.getAvailableArray()[i] != null) { for (Placement placement : ic.getAvailableArray()[i]) { Lecture lecture = placement.variable(); if (done.add(lecture.getClassId())) { Element classEl = classElements.get(lecture.getClassId()); classEl.addElement("instructor") .addAttribute("id", getId("inst", ic.getResourceId())) .addAttribute("solution", "true"); } } } } } } if (instructorsEl.elements().isEmpty()) root.remove(instructorsEl); Element grConstraintsEl = root.addElement("groupConstraints"); for (GroupConstraint gc : getModel().getGroupConstraints()) { Element grEl = grConstraintsEl.addElement("constraint").addAttribute("id", getId("gr", String.valueOf(gc.getId()))); grEl.addAttribute("type", gc.getType().reference()); grEl.addAttribute("pref", gc.getPrologPreference()); for (Lecture l : gc.variables()) { grEl.addElement("class").addAttribute("id", getId("class", l.getClassId())); } } for (SpreadConstraint spread : getModel().getSpreadConstraints()) { Element grEl = grConstraintsEl.addElement("constraint").addAttribute("id", getId("gr", String.valueOf(spread.getId()))); grEl.addAttribute("type", "SPREAD"); grEl.addAttribute("pref", Constants.sPreferenceRequired); if (iShowNames) grEl.addAttribute("name", spread.getName()); for (Lecture l : spread.variables()) { grEl.addElement("class").addAttribute("id", getId("class", l.getClassId())); } } for (Constraint<Lecture, Placement> c : getModel().constraints()) { if (c instanceof MinimizeNumberOfUsedRoomsConstraint) { Element grEl = grConstraintsEl.addElement("constraint").addAttribute("id", getId("gr", String.valueOf(c.getId()))); grEl.addAttribute("type", "MIN_ROOM_USE"); grEl.addAttribute("pref", Constants.sPreferenceRequired); for (Lecture l : c.variables()) { grEl.addElement("class").addAttribute("id", getId("class", l.getClassId())); } } if (c instanceof MinimizeNumberOfUsedGroupsOfTime) { Element grEl = grConstraintsEl.addElement("constraint").addAttribute("id", getId("gr", String.valueOf(c.getId()))); grEl.addAttribute("type", ((MinimizeNumberOfUsedGroupsOfTime) c).getConstraintName()); grEl.addAttribute("pref", Constants.sPreferenceRequired); for (Lecture l : c.variables()) { grEl.addElement("class").addAttribute("id", getId("class", l.getClassId())); } } } for (ClassLimitConstraint clc : getModel().getClassLimitConstraints()) { Element grEl = grConstraintsEl.addElement("constraint").addAttribute("id", getId("gr", String.valueOf(clc.getId()))); grEl.addAttribute("type", "CLASS_LIMIT"); grEl.addAttribute("pref", Constants.sPreferenceRequired); if (clc.getParentLecture() != null) { grEl.addElement("parentClass").addAttribute("id", getId("class", clc.getParentLecture().getClassId())); } else grEl.addAttribute("courseLimit", String.valueOf(clc.classLimit() - clc.getClassLimitDelta())); if (clc.getClassLimitDelta() != 0) grEl.addAttribute("delta", String.valueOf(clc.getClassLimitDelta())); if (iShowNames) grEl.addAttribute("name", clc.getName()); for (Lecture l : clc.variables()) { grEl.addElement("class").addAttribute("id", getId("class", l.getClassId())); } } HashMap<Student, List<String>> students = new HashMap<Student, List<String>>(); for (Lecture lecture : vars) { for (Student student : lecture.students()) { List<String> enrls = students.get(student); if (enrls == null) { enrls = new ArrayList<String>(); students.put(student, enrls); } enrls.add(getId("class", lecture.getClassId())); } } Element studentsEl = root.addElement("students"); for (Student student : new TreeSet<Student>(students.keySet())) { Element stEl = studentsEl.addElement("student").addAttribute("id", getId("student", student.getId())); if (iShowNames) { if (student.getAcademicArea() != null) stEl.addAttribute("area", student.getAcademicArea()); if (student.getAcademicClassification() != null) stEl.addAttribute("classification", student.getAcademicClassification()); if (student.getMajor() != null) stEl.addAttribute("major", student.getMajor()); if (student.getCurriculum() != null) stEl.addAttribute("curriculum", student.getCurriculum()); } for (Map.Entry<Long, Double> entry : student.getOfferingsMap().entrySet()) { Long offeringId = entry.getKey(); Double weight = entry.getValue(); Element offEl = stEl.addElement("offering").addAttribute("id", getId("offering", offeringId.toString())); if (weight.doubleValue() != 1.0) offEl.addAttribute("weight", sStudentWeightFormat.format(weight)); } if (iExportStudentSectioning || getModel().unassignedVariables().isEmpty() || student.getOfferingsMap().isEmpty()) { List<String> lectures = students.get(student); Collections.sort(lectures); for (String classId : lectures) { stEl.addElement("class").addAttribute("id", classId); } } Map<Long, Set<Lecture>> canNotEnroll = student.canNotEnrollSections(); if (canNotEnroll != null) { for (Set<Lecture> canNotEnrollLects : canNotEnroll.values()) { for (Iterator<Lecture> i3 = canNotEnrollLects.iterator(); i3.hasNext();) { stEl.addElement("prohibited-class").addAttribute("id", getId("class", (i3.next()).getClassId())); } } } if (student.getCommitedPlacements() != null) { for (Placement placement : student.getCommitedPlacements()) { stEl.addElement("class").addAttribute("id", getId("class", placement.variable().getClassId())); } } } if (getModel().getProperties().getPropertyInt("MPP.GenTimePert", 0) > 0) { Element perturbationsEl = root.addElement("perturbations"); int nrChanges = getModel().getProperties().getPropertyInt("MPP.GenTimePert", 0); List<Lecture> lectures = new ArrayList<Lecture>(); while (lectures.size() < nrChanges) { Lecture lecture = ToolBox.random(getModel().assignedVariables()); if (lecture.isCommitted() || lecture.timeLocations().size() <= 1 || lectures.contains(lecture)) continue; Placement placement = lecture.getAssignment(); TimeLocation tl = placement.getTimeLocation(); perturbationsEl.addElement("class").addAttribute("id", getId("class", lecture.getClassId())) .addAttribute("days", sDF[7].format(Long.parseLong(Integer.toBinaryString(tl.getDayCode())))) .addAttribute("start", String.valueOf(tl.getStartSlot())) .addAttribute("length", String.valueOf(tl.getLength())); lectures.add(lecture); } } for (Map.Entry<Long, String> entry : depts.entrySet()) { Long id = entry.getKey(); String name = entry.getValue(); if (iShowNames) { departmentsEl.addElement("department").addAttribute("id", getId("dept", id.toString())) .addAttribute("name", name); } } if (departmentsEl.elements().isEmpty()) root.remove(departmentsEl); if (iShowNames) { Progress.getInstance(getModel()).save(root); try { getSolver().getClass().getMethod("save", new Class[] { Element.class }).invoke(getSolver(), new Object[] { root }); } catch (Exception e) { } } FileOutputStream fos = null; try { fos = new FileOutputStream(outFile); (new XMLWriter(fos, OutputFormat.createPrettyPrint())).write(document); fos.flush(); fos.close(); fos = null; } finally { try { if (fos != null) fos.close(); } catch (IOException e) { } } if (iConvertIds) iIdConvertor.save(); }
From source file:net.sf.jguard.core.util.XMLUtils.java
License:Open Source License
/** * remove in the ascendants elements all the <i>principalRef</i> references with the name of the * principal./*w ww . j av a2 s . c o m*/ * * @param root DOM4J Element of the document * @param principal */ public static void deletePrincipalRefs(Element root, RolePrincipal principal) { Element principalsElement = root.element(PRINCIPALS); List principalsRefList = principalsElement .selectNodes(PRINCIPAL_REF_NAME_REGEXP + principal.getLocalName() + "']"); for (Object aPrincipalsRefList : principalsRefList) { Element principalRef = (Element) aPrincipalsRefList; Element principalElement = principalRef.getParent(); principalElement.remove(principalRef); if (principalElement.elements(PRINCIPAL_REF).isEmpty()) { principalElement.getParent().remove(principalElement); } } }