| | |
| | | package com.ximple.eofms; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.io.File; |
| | | import java.io.FilenameFilter; |
| | | import java.io.FileInputStream; |
| | | import java.io.IOException; |
| | | import java.io.FileNotFoundException; |
| | | import java.io.FilenameFilter; |
| | | import java.io.IOException; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.nio.channels.FileChannel; |
| | | import java.net.URL; |
| | | import java.net.MalformedURLException; |
| | | import java.net.URL; |
| | | import java.nio.channels.FileChannel; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | import org.apache.commons.logging.Log; |
| | | import org.apache.commons.logging.LogFactory; |
| | | import org.apache.commons.collections.map.MultiValueMap; |
| | | import org.apache.commons.digester.Digester; |
| | | import org.apache.commons.digester.xmlrules.DigesterLoader; |
| | | import org.apache.commons.collections.map.MultiValueMap; |
| | | import org.xml.sax.SAXException; |
| | | import org.apache.commons.logging.Log; |
| | | import org.apache.commons.logging.LogFactory; |
| | | import org.geotools.feature.Feature; |
| | | import org.xml.sax.SAXException; |
| | | |
| | | import com.vividsolutions.jts.geom.GeometryFactory; |
| | | |
| | | import com.ximple.io.dgn7.Dgn7fileReader; |
| | | import com.ximple.io.dgn7.Lock; |
| | | import com.ximple.eofms.filter.AbstractFLinkageDispatchableFilter; |
| | | import com.ximple.eofms.filter.ElementDispatcher; |
| | | import com.ximple.eofms.jobs.context.postgis.FeatureDgnConvertPostGISJobContext; |
| | | import com.ximple.io.dgn7.ComplexChainElement; |
| | | import com.ximple.io.dgn7.ComplexElement; |
| | | import com.ximple.io.dgn7.Dgn7fileException; |
| | | import com.ximple.io.dgn7.Dgn7fileReader; |
| | | import com.ximple.io.dgn7.Element; |
| | | import com.ximple.io.dgn7.ElementType; |
| | | import com.ximple.io.dgn7.ComplexElement; |
| | | import com.ximple.io.dgn7.FrammeAttributeData; |
| | | import com.ximple.eofms.filter.ElementDispatcher; |
| | | import com.ximple.eofms.filter.AbstractFLinkageDispatchableFilter; |
| | | import com.ximple.eofms.jobs.context.postgis.FeatureDgnConvertPostGISJobContext; |
| | | import com.ximple.io.dgn7.Lock; |
| | | |
| | | public class XElementParser implements Runnable |
| | | { |
| | | static Log logger = LogFactory.getLog(XElementParser.class); |
| | | static final GeometryFactory geometryFactory = new GeometryFactory(); |
| | | |
| | | static final boolean isCompactMode = true; |
| | | |
| | | private HashMap<String, String> dataConfig; |
| | | private ElementDispatcher elementDispatcher; |
| | |
| | | { |
| | | FrammeAttributeData linkage = |
| | | AbstractFLinkageDispatchableFilter.getFeatureLinkage(element); |
| | | if (linkage != null) |
| | | if ((isCompactMode) && (linkage != null)) |
| | | { |
| | | logger.warn("Unknown Element:" + element.getElementType().toString() + |
| | | ":type=" + element.getType() + ":lv=" + element.getLevelIndex() + ":id=" + |
| | |
| | | ComplexElement complex = (ComplexElement) element; |
| | | logger.warn("----Complex Element size=" + complex.size()); |
| | | } |
| | | } |
| | | |
| | | /* |
| | | logger.warn("Unknown Element:" + element.getElementType().toString() + |
| | | ":type=" + element.getType() + ":lv=" + element.getLevelIndex() + ":id=" + |
| | | (linkage == null ? "NULL" : (linkage.getFsc() + "|" + linkage.getComponentID()))); |
| | | manualElementProcess(element); |
| | | } else if (!isCompactMode) { |
| | | logger.warn("Unknown Element:" + element.getElementType().toString() + |
| | | ":type=" + element.getType() + ":lv=" + element.getLevelIndex() + ":id=" + |
| | | (linkage == null ? "NULL" : (linkage.getFsc() + "|" + linkage.getComponentID()))); |
| | | |
| | | if (element instanceof ComplexElement) |
| | | { |
| | | ComplexElement complex = (ComplexElement) element; |
| | | logger.warn("----Complex Element size=" + complex.size()); |
| | | if (element instanceof ComplexElement) |
| | | { |
| | | ComplexElement complex = (ComplexElement) element; |
| | | logger.warn("----Complex Element size=" + complex.size()); |
| | | } |
| | | } |
| | | */ |
| | | |
| | | return; |
| | | } |
| | |
| | | featuresContext.put(feature.getFeatureType(), feature); |
| | | } |
| | | |
| | | private void manualElementProcess(Element element) |
| | | { |
| | | } |
| | | |
| | | private void postProcessFeatureContext() |
| | | { |
| | | if (featuresContext.size() == 0) return; |