| | |
| | | private boolean useElementCount = true; |
| | | private ArrayList<byte[]> dgnFileHeader = null; |
| | | private String elmOutPath; |
| | | private String prefix = null; |
| | | |
| | | public OracleElementLogger(Connection connection) |
| | | { |
| | |
| | | this.elmOutPath = elmOutPath; |
| | | } |
| | | |
| | | public OracleElementLogger(Connection connection, int maxCount) |
| | | { |
| | | this.connection = connection; |
| | | elmOutPath = DEFAULT_ELMOUTPATH; |
| | | this.maxElmCount = maxCount; |
| | | } |
| | | |
| | | public OracleElementLogger(Connection connection, String elmOutPath, int maxCount) |
| | | { |
| | | this.connection = connection; |
| | | this.elmOutPath = elmOutPath; |
| | | this.maxElmCount = maxCount; |
| | | } |
| | | |
| | | public String getDataOutPath() |
| | | { |
| | | if (dataOut == null) |
| | |
| | | fch = null; |
| | | } |
| | | |
| | | File logFile = new File(getDataOutPath(), this.currentSchema + ".dgn"); |
| | | String outLogName = currentSchema + ".dgn"; |
| | | if (prefix != null) |
| | | { |
| | | outLogName = prefix + outLogName; |
| | | } |
| | | File logFile = new File(getDataOutPath(), outLogName); |
| | | while (logFile.exists()) |
| | | { |
| | | logFile = new File(getDataOutPath(), this.currentSchema + "-" |
| | | + (++logCount) + ".dgn"); |
| | | outLogName = this.currentSchema + "-" + (++logCount) + ".dgn"; |
| | | if (prefix != null) |
| | | { |
| | | outLogName = prefix + outLogName; |
| | | } |
| | | |
| | | logFile = new File(getDataOutPath(), outLogName); |
| | | } |
| | | |
| | | logger.warn("Create Dgn Logging File:" + logFile.toString()); |
| | |
| | | { |
| | | this.maxElmCount = maxElmCount; |
| | | } |
| | | |
| | | public String getLogPrefix() |
| | | { |
| | | return prefix; |
| | | } |
| | | |
| | | public void setLogPrefix(String prefix) |
| | | { |
| | | this.prefix = prefix; |
| | | } |
| | | } |