forked from geodmms/xdgnjobs

?? ?
2008-03-17 f26cdb4382420cb98e96237914cf21ae351ceecb
update for EOFM-17
1 files deleted
4 files modified
10 files added
434 ■■■■ changed files
.gitattributes 11 ●●●●● patch | view | raw | blame | history
ximple-spatialjob/pom.xml 22 ●●●●● patch | view | raw | blame | history
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/AbstractFLinkageHandlerStrategy.java 27 ●●●●● patch | view | raw | blame | history
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/CreateFeatureTypeStrategy.java 9 ●●●●● patch | view | raw | blame | history
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/CreateLineStringStrategy.java 30 ●●●●● patch | view | raw | blame | history
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/CreateTextStrategy.java 35 ●●●●● patch | view | raw | blame | history
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/DgnElementListener.java 12 ●●●●● patch | view | raw | blame | history
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/ElementDispatchableStrategy.java 12 ●●●●● patch | view | raw | blame | history
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/ElementDispatcher.java 31 ●●●●● patch | view | raw | blame | history
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/GeometryCoordinateDecorator.java 5 ●●●●● patch | view | raw | blame | history
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertDgn2ShpJob.java 55 ●●●● patch | view | raw | blame | history
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertJobContext.java 57 ●●●●● patch | view | raw | blame | history
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/TypeCompIdHandlerStrategy.java 43 ●●●●● patch | view | raw | blame | history
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/TypeCompLevelIdHandlerStrategy.java 46 ●●●●● patch | view | raw | blame | history
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/TypeIdHandlerStrategy.java 39 ●●●●● patch | view | raw | blame | history
.gitattributes
@@ -41,11 +41,20 @@
ximple-jobcarrier/src/main/resources/quartz_jobs.xml svneol=native#text/xml
ximple-jobcarrier/src/test/java/com/ximple/eofms/XQuartzJobCarrierTest.java svneol=native#text/plain
ximple-spatialjob/pom.xml svneol=native#text/xml
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/AbstractFLinkageHandlerStrategy.java svneol=native#text/plain
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/AbstractOracleDatabaseJob.java svneol=native#text/plain
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/DgnElementListener.java svneol=native#text/plain
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/CreateFeatureTypeStrategy.java svneol=native#text/plain
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/CreateLineStringStrategy.java svneol=native#text/plain
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/CreateTextStrategy.java svneol=native#text/plain
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/ElementDispatchableStrategy.java svneol=native#text/plain
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/ElementDispatcher.java svneol=native#text/plain
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/GeometryCoordinateDecorator.java svneol=native#text/plain
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertDgn2ShpJob.java svneol=native#text/plain
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertJobContext.java svneol=native#text/plain
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleUpgradeBlob2UDTJob.java svneol=native#text/plain
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/TypeCompIdHandlerStrategy.java svneol=native#text/plain
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/TypeCompLevelIdHandlerStrategy.java svneol=native#text/plain
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/TypeIdHandlerStrategy.java svneol=native#text/plain
ximple-spatialjob/src/main/java/com/ximple/eofms/util/BinConverter.java svneol=native#text/plain
ximple-spatialjob/src/main/java/com/ximple/eofms/util/Bits.java svneol=native#text/plain
ximple-spatialjob/src/main/java/com/ximple/eofms/util/ByteArrayCompressor.java svneol=native#text/plain
ximple-spatialjob/pom.xml
@@ -146,6 +146,11 @@
        <version>1.1.1</version>
      </dependency>
      <dependency>
        <groupId>commons-transaction</groupId>
        <artifactId>commons-transaction</artifactId>
        <version>1.2</version>
      </dependency>
      <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>1.2.15</version>
@@ -273,7 +278,22 @@
      <artifactId>commons-collections</artifactId>
      <groupId>commons-collections</groupId>
    </dependency>
    <dependency>
      <groupId>commons-digester</groupId>
      <artifactId>commons-digester</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-pool</groupId>
      <artifactId>commons-pool</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-transaction</groupId>
      <artifactId>commons-transaction</artifactId>
    </dependency>
    <dependency>
      <artifactId>log4j</artifactId>
      <groupId>log4j</groupId>
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/AbstractFLinkageHandlerStrategy.java
New file
@@ -0,0 +1,27 @@
package com.ximple.eofms.jobs;
import java.util.List;
import com.ximple.io.dgn7.Element;
import com.ximple.io.dgn7.FrammeAttributeData;
import com.ximple.io.dgn7.UserAttributeData;
public abstract class AbstractFLinkageHandlerStrategy implements ElementDispatchableStrategy
{
    protected FrammeAttributeData getFeatureLinkage(Element element)
    {
        if (!element.hasUserAttributeData())
            return null;
        List<UserAttributeData> usrDatas = element.getUserAttributeData();
        for (UserAttributeData anUsrData : usrDatas)
        {
            if (anUsrData instanceof FrammeAttributeData)
            {
                FrammeAttributeData featureLinkage = (FrammeAttributeData) anUsrData;
                return featureLinkage;
            }
        }
        return null;
    }
}
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/CreateFeatureTypeStrategy.java
New file
@@ -0,0 +1,9 @@
package com.ximple.eofms.jobs;
import org.geotools.feature.FeatureType;
import org.geotools.feature.SchemaException;
public interface CreateFeatureTypeStrategy
{
    public FeatureType createFeatureElement(String featureName) throws SchemaException;
}
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/CreateLineStringStrategy.java
New file
@@ -0,0 +1,30 @@
package com.ximple.eofms.jobs;
import org.geotools.feature.AttributeTypeFactory;
import org.geotools.feature.FeatureType;
import org.geotools.feature.FeatureTypeBuilder;
import org.geotools.feature.SchemaException;
import org.opengis.geometry.Geometry;
public class CreateLineStringStrategy implements CreateFeatureTypeStrategy
{
    FeatureTypeBuilder typeBuilder = null;
    public FeatureType createFeatureElement(String featureName) throws SchemaException
    {
        if (typeBuilder == null)
        {
            FeatureTypeBuilder typeBuilder = FeatureTypeBuilder.newInstance(featureName);
            typeBuilder.addType(AttributeTypeFactory.newAttributeType("GEOM", Geometry.class));
            typeBuilder.addType(AttributeTypeFactory.newAttributeType("TID", Integer.class));
            typeBuilder.addType(AttributeTypeFactory.newAttributeType("OID", Long.class));
            typeBuilder.addType(AttributeTypeFactory.newAttributeType("CID", Integer.class));
            typeBuilder.addType(AttributeTypeFactory.newAttributeType("LID", Integer.class));
            typeBuilder.addType(AttributeTypeFactory.newAttributeType("LEVEL", Integer.class));
            typeBuilder.addType(AttributeTypeFactory.newAttributeType("SYMCOLOR", Integer.class));
            typeBuilder.addType(AttributeTypeFactory.newAttributeType("SYMWEIGHT", Integer.class));
            typeBuilder.addType(AttributeTypeFactory.newAttributeType("SYMSTYLE", Integer.class));
        }
        return typeBuilder.getFeatureType();
    }
}
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/CreateTextStrategy.java
New file
@@ -0,0 +1,35 @@
package com.ximple.eofms.jobs;
import org.geotools.feature.AttributeTypeFactory;
import org.geotools.feature.FeatureType;
import org.geotools.feature.FeatureTypeBuilder;
import org.geotools.feature.SchemaException;
import org.opengis.geometry.Geometry;
public class CreateTextStrategy implements CreateFeatureTypeStrategy
{
    FeatureTypeBuilder typeBuilder = null;
    public FeatureType createFeatureElement(String featureName) throws SchemaException
    {
        if (typeBuilder == null)
        {
            typeBuilder = FeatureTypeBuilder.newInstance(featureName);
            typeBuilder.addType(AttributeTypeFactory.newAttributeType("GEOM", Geometry.class));
            typeBuilder.addType(AttributeTypeFactory.newAttributeType("TID", Integer.class));
            typeBuilder.addType(AttributeTypeFactory.newAttributeType("OID", Long.class));
            typeBuilder.addType(AttributeTypeFactory.newAttributeType("CID", Integer.class));
            typeBuilder.addType(AttributeTypeFactory.newAttributeType("LID", Integer.class));
            typeBuilder.addType(AttributeTypeFactory.newAttributeType("LEVEL", Integer.class));
            typeBuilder.addType(AttributeTypeFactory.newAttributeType("SYMCOLOR", Integer.class));
            typeBuilder.addType(AttributeTypeFactory.newAttributeType("SYMWEIGHT", Integer.class));
            typeBuilder.addType(AttributeTypeFactory.newAttributeType("SYMSTYLE", Integer.class));
            typeBuilder.addType(AttributeTypeFactory.newAttributeType("FONT", String.class));
            typeBuilder.addType(AttributeTypeFactory.newAttributeType("JUST", Integer.class));
            typeBuilder.addType(AttributeTypeFactory.newAttributeType("HEIGHT", Double.class));
            typeBuilder.addType(AttributeTypeFactory.newAttributeType("WIDTH", Double.class));
            typeBuilder.addType(AttributeTypeFactory.newAttributeType("ANGLE", Double.class));
        }
        return typeBuilder.getFeatureType();
    }
}
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/DgnElementListener.java
File was deleted
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/ElementDispatchableStrategy.java
New file
@@ -0,0 +1,12 @@
package com.ximple.eofms.jobs;
import org.geotools.feature.SchemaException;
import com.ximple.io.dgn7.Element;
public interface ElementDispatchableStrategy
{
    public boolean isDispatchable(Element element);
    public void execute(Element element) throws SchemaException;
}
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/ElementDispatcher.java
New file
@@ -0,0 +1,31 @@
package com.ximple.eofms.jobs;
import java.util.LinkedList;
import com.ximple.io.dgn7.Element;
public class ElementDispatcher
{
    private LinkedList<ElementDispatchableStrategy> rules;
    public ElementDispatcher()
    {
        rules = new LinkedList<ElementDispatchableStrategy>();
    }
    public void addRule(ElementDispatchableStrategy rule)
    {
        rules.add(rule);
    }
    public void execute(Element element)
    {
        for (ElementDispatchableStrategy rule : rules)
        {
            if (rule.isDispatchable(element))
            {
                rule.execute(element);
            }
        }
    }
}
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/GeometryCoordinateDecorator.java
New file
@@ -0,0 +1,5 @@
package com.ximple.eofms.jobs;
public interface GeometryCoordinateDecorator
{
}
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertDgn2ShpJob.java
@@ -1,9 +1,6 @@
package com.ximple.eofms.jobs;
import java.io.File;
import java.io.IOException;
import java.math.BigDecimal;
import java.net.MalformedURLException;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.sql.ResultSet;
@@ -17,19 +14,7 @@
import org.apache.commons.collections.map.LinkedMap;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.geotools.data.FeatureWriter;
import org.geotools.data.Transaction;
import org.geotools.data.shapefile.ShapefileDataStore;
import org.geotools.feature.AttributeTypeFactory;
import org.geotools.feature.Feature;
import org.geotools.feature.FeatureCollection;
import org.geotools.feature.FeatureCollections;
import org.geotools.feature.FeatureType;
import org.geotools.feature.FeatureTypeBuilder;
import org.geotools.feature.IllegalAttributeException;
import org.geotools.feature.SchemaException;
import org.geotools.feature.SimpleFeature;
import org.opengis.geometry.Geometry;
import org.quartz.JobDetail;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
@@ -48,7 +33,6 @@
import com.ximple.io.dgn7.Element;
import com.ximple.io.dgn7.ElementType;
import com.ximple.io.dgn7.IElementHandler;
import com.ximple.io.dgn7.LineElement;
import com.ximple.util.PrintfFormat;
/**
@@ -73,6 +57,8 @@
            this.second = second;
        }
    }
    GeometryFactory _geomFactory = new GeometryFactory();
    public Log getLogger()
    {
@@ -132,6 +118,7 @@
            {
                // OracleConnection connection = jobContext.getOracleConnection();
                // connection.commit();
                jobContext.commit();
                System.gc();
            }
        }
@@ -250,7 +237,9 @@
            try
            {
                onBinaryElement(raw);
                Element element = fetchBinaryElement(raw);
                jobContext.putFeatureCollection(element);
            } catch (Dgn7fileException e)
            {
                logger.warn("Dgn7Exception", e);
@@ -293,7 +282,8 @@
            try
            {
                onBinaryElement(rawDest);
                Element element = fetchBinaryElement(rawDest);
                // Feature feature = convertElementToFeature(element);
            } catch (Dgn7fileException e)
            {
                logger.warn("Dgn7Exception:" + e.getMessage(), e);
@@ -301,7 +291,7 @@
        }
    }
    private void onBinaryElement(byte[] raws) throws Dgn7fileException
    private Element fetchBinaryElement(byte[] raws) throws Dgn7fileException
    {
        ByteBuffer buffer = ByteBuffer.wrap(raws);
        buffer.order(ByteOrder.LITTLE_ENDIAN);
@@ -358,36 +348,20 @@
            }
        }
        Feature feature = convertElementToFeature(dgnElement);
        return dgnElement;
    }
    private Feature convertElementToFeature(Element dgnElement)
    {
        GeometryFactory geomFactory = new GeometryFactory();
        FeatureTypeBuilder typeBuilder = FeatureTypeBuilder.newInstance("Line");
        typeBuilder.addType(AttributeTypeFactory.newAttributeType("GEOM", Geometry.class));
        typeBuilder.addType(AttributeTypeFactory.newAttributeType("TID", Integer.class));
        typeBuilder.addType(AttributeTypeFactory.newAttributeType("OID", Long.class));
        typeBuilder.addType(AttributeTypeFactory.newAttributeType("CID", Integer.class));
        typeBuilder.addType(AttributeTypeFactory.newAttributeType("LID", Integer.class));
        typeBuilder.addType(AttributeTypeFactory.newAttributeType("LEVEL", Integer.class));
        typeBuilder.addType(AttributeTypeFactory.newAttributeType("SYMCOLOR", Integer.class));
        typeBuilder.addType(AttributeTypeFactory.newAttributeType("SYMWEIGHT", Integer.class));
        typeBuilder.addType(AttributeTypeFactory.newAttributeType("SYMSTYLE", Integer.class));
        typeBuilder.addType(AttributeTypeFactory.newAttributeType("FONT", String.class));
        typeBuilder.addType(AttributeTypeFactory.newAttributeType("JUST", Integer.class));
        typeBuilder.addType(AttributeTypeFactory.newAttributeType("HEIGHT", Double.class));
        typeBuilder.addType(AttributeTypeFactory.newAttributeType("WIDTH", Double.class));
        typeBuilder.addType(AttributeTypeFactory.newAttributeType("ANGLE", Double.class));
        // typeBuilder.setNamespace(new URI(""));
        /*
        Feature feature = null;
        try
        {
            FeatureType featureType = typeBuilder.getFeatureType();
            feature = featureType.create(new Object[]{
                    ((LineElement) dgnElement).toGeometry(geomFactory)
                    ((LineElement) dgnElement).toGeometry(_geomFactory)
            });
            FeatureCollection features = FeatureCollections.newCollection();
@@ -412,6 +386,7 @@
        {
            logger.warn(e.getMessage(), e);
        }
        */
        return null;
@@ -435,8 +410,4 @@
        return true;
    }
    public FeatureCollection loopupFeatureCollection(String name)
    {
        return null;
    }
}
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertJobContext.java
@@ -6,10 +6,16 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.geotools.feature.AttributeTypeFactory;
import org.geotools.feature.FeatureCollection;
import org.geotools.feature.FeatureTypeBuilder;
import org.opengis.geometry.Geometry;
import com.vividsolutions.jts.util.Assert;
import oracle.jdbc.OracleConnection;
import com.ximple.io.dgn7.Element;
public class OracleConvertJobContext
{
@@ -173,7 +179,7 @@
            + "    END;";
    protected static final String TRG_ELMINDEX =
                    "CREATE OR REPLACE TRIGGER \"%s\".\"%s\"\n"
            "CREATE OR REPLACE TRIGGER \"%s\".\"%s\"\n"
                    + "    AFTER INSERT OR UPDATE OR DELETE ON \"%s\".\"%s\"\n"
                    + "    REFERENCING OLD AS OLD NEW AS NEW FOR EACH ROW\n"
                    + "    BEGIN\n"
@@ -202,10 +208,6 @@
    protected static final String SMTM_GRANTOBJECTTYPE = "GRANT EXECUTE ANY TYPE TO \"" + UDT_SCHEMA + "\"";
    private String _oracleHost;
    private String _oracleInstance;
    private String _oraclePort;
    static
    {
        try
@@ -231,12 +233,26 @@
        return builder.toString();
    }
    private String _oracleHost;
    private String _oracleInstance;
    private String _oraclePort;
    private OracleConnection oracleConnection = null;
    private Properties properties;
    private ElementDispatcher elementDispatcher;
    public OracleConvertJobContext()
    {
        properties = new Properties();
        elementDispatcher = createElementDispatcher();
    }
    private ElementDispatcher createElementDispatcher()
    {
        ElementDispatcher dispatcher = new ElementDispatcher();
        dispatcher.addRule(new TypeCompIdHandlerStrategy(106, 0));
        return dispatcher;
    }
    public void setLogin(String userName, String password)
@@ -288,4 +304,35 @@
        _oracleInstance = oracleInstance;
        _oraclePort = oraclePort;
    }
    public FeatureCollection putFeatureCollection(Element element)
    {
        return null;
    }
    public FeatureCollection createFeatureCollection(Element element)
    {
        FeatureTypeBuilder typeBuilder = FeatureTypeBuilder.newInstance("Line");
        typeBuilder.addType(AttributeTypeFactory.newAttributeType("GEOM", Geometry.class));
        typeBuilder.addType(AttributeTypeFactory.newAttributeType("TID", Integer.class));
        typeBuilder.addType(AttributeTypeFactory.newAttributeType("OID", Long.class));
        typeBuilder.addType(AttributeTypeFactory.newAttributeType("CID", Integer.class));
        typeBuilder.addType(AttributeTypeFactory.newAttributeType("LID", Integer.class));
        typeBuilder.addType(AttributeTypeFactory.newAttributeType("LEVEL", Integer.class));
        typeBuilder.addType(AttributeTypeFactory.newAttributeType("SYMCOLOR", Integer.class));
        typeBuilder.addType(AttributeTypeFactory.newAttributeType("SYMWEIGHT", Integer.class));
        typeBuilder.addType(AttributeTypeFactory.newAttributeType("SYMSTYLE", Integer.class));
        typeBuilder.addType(AttributeTypeFactory.newAttributeType("FONT", String.class));
        typeBuilder.addType(AttributeTypeFactory.newAttributeType("JUST", Integer.class));
        typeBuilder.addType(AttributeTypeFactory.newAttributeType("HEIGHT", Double.class));
        typeBuilder.addType(AttributeTypeFactory.newAttributeType("WIDTH", Double.class));
        typeBuilder.addType(AttributeTypeFactory.newAttributeType("ANGLE", Double.class));
        return null;
    }
    public void commit()
    {
    }
}
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/TypeCompIdHandlerStrategy.java
New file
@@ -0,0 +1,43 @@
package com.ximple.eofms.jobs;
import org.geotools.feature.FeatureType;
import org.geotools.feature.SchemaException;
import com.ximple.io.dgn7.Element;
import com.ximple.io.dgn7.FrammeAttributeData;
public class TypeCompIdHandlerStrategy extends AbstractFLinkageHandlerStrategy
{
    private String name;
    private int tid;
    private int cid;
    private CreateFeatureTypeStrategy createStrategy;
    public TypeCompIdHandlerStrategy(String fname,
                                     CreateFeatureTypeStrategy createStrategy,
                                     int tid, int compid)
    {
        this.name = fname;
        this.tid = tid;
        this.cid = compid;
        this.createStrategy = createStrategy;
    }
    public boolean isDispatchable(Element element)
    {
        FrammeAttributeData featureLinkage = getFeatureLinkage(element);
        return featureLinkage != null && tid == featureLinkage.getFsc() &&
                (cid == featureLinkage.getComponentID());
    }
    public void execute(Element element)
    {
        try
        {
            FeatureType ftype = createStrategy.createFeatureElement(name);
        } catch (SchemaException e)
        {
            e.printStackTrace();
        }
    }
}
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/TypeCompLevelIdHandlerStrategy.java
New file
@@ -0,0 +1,46 @@
package com.ximple.eofms.jobs;
import org.geotools.feature.FeatureType;
import org.geotools.feature.SchemaException;
import com.ximple.io.dgn7.Element;
import com.ximple.io.dgn7.FrammeAttributeData;
public class TypeCompLevelIdHandlerStrategy extends AbstractFLinkageHandlerStrategy
{
    private String name;
    private int tid;
    private int cid;
    private int lid;
    private CreateFeatureTypeStrategy createStrategy;
    public TypeCompLevelIdHandlerStrategy(String fname,
                                          CreateFeatureTypeStrategy createStrategy,
                                          int tid, int compid, int level)
    {
        this.name = fname;
        this.tid = tid;
        this.cid = compid;
        this.lid = level;
        this.createStrategy = createStrategy;
    }
    public boolean isDispatchable(Element element)
    {
        FrammeAttributeData featureLinkage = getFeatureLinkage(element);
        return featureLinkage != null && tid == featureLinkage.getFsc() &&
                (cid == featureLinkage.getComponentID()) &&
                (lid == element.getLevelIndex());
    }
    public void execute(Element element)
    {
        try
        {
            FeatureType ftype = createStrategy.createFeatureElement(name);
        } catch (SchemaException e)
        {
            e.printStackTrace();
        }
    }
}
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/TypeIdHandlerStrategy.java
New file
@@ -0,0 +1,39 @@
package com.ximple.eofms.jobs;
import org.geotools.feature.FeatureType;
import org.geotools.feature.SchemaException;
import com.ximple.io.dgn7.Element;
import com.ximple.io.dgn7.FrammeAttributeData;
public class TypeIdHandlerStrategy extends AbstractFLinkageHandlerStrategy
{
    private String name;
    private int tid;
    private CreateFeatureTypeStrategy createStrategy;
    public TypeIdHandlerStrategy(String fname, CreateFeatureTypeStrategy createStrategy,
                                 int tid)
    {
        this.name = fname;
        this.tid = tid;
        this.createStrategy = createStrategy;
    }
    public boolean isDispatchable(Element element)
    {
        FrammeAttributeData featureLinkage = getFeatureLinkage(element);
        return featureLinkage != null && tid == featureLinkage.getFsc();
    }
    public void execute(Element element)
    {
        try
        {
            FeatureType ftype = createStrategy.createFeatureElement(name);
        } catch (SchemaException e)
        {
            e.printStackTrace();
        }
    }
}