| | |
| | | |
| | | 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 |
| | | { |
| | |
| | | + " 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" |
| | |
| | | |
| | | protected static final String SMTM_GRANTOBJECTTYPE = "GRANT EXECUTE ANY TYPE TO \"" + UDT_SCHEMA + "\""; |
| | | |
| | | private String _oracleHost; |
| | | private String _oracleInstance; |
| | | private String _oraclePort; |
| | | |
| | | static |
| | | { |
| | | try |
| | |
| | | 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) |
| | |
| | | _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() |
| | | { |
| | | |
| | | } |
| | | } |