svnno****@sourc*****
svnno****@sourc*****
2008年 9月 18日 (木) 04:51:13 JST
Revision: 1933 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=jiemamy&view=rev&rev=1933 Author: daisuke_m Date: 2008-09-18 04:51:13 +0900 (Thu, 18 Sep 2008) Log Message: ----------- Share project "org.jiemamy.spec" into "svn+ssh://svn.sourceforge.jp/svnroot/jiemamy" Added Paths: ----------- artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/adapter/ artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/adapter/Adaptable.java artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/ artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/CanceledException.java artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/DataTypeNotFoundException.java artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/DriverNotFoundException.java artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/ElementNotFoundException.java artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/ExportException.java artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/GenericModelingModeException.java artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/IllegalDataTypeImplementationException.java artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/IllegalDataTypeMappingException.java artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/IllegalDialectImplementation.java artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/ImportException.java artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/JiemamyException.java artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/JiemamyRuntimeException.java artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/MappingValueNotFoundException.java artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/TooManyElementsException.java artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/package-info.java -------------- next part -------------- Added: artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/adapter/Adaptable.java =================================================================== --- artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/adapter/Adaptable.java (rev 0) +++ artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/adapter/Adaptable.java 2008-09-17 19:51:13 UTC (rev 1933) @@ -0,0 +1,53 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. + * Created on 2008/07/19 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ +package org.jiemamy.spec.adapter; + +import java.util.List; + +/** + * アダプタを適用可能な型である事を示すインターフェイス。 + * + * <p>Eclipseに実装されたIAdaptableインターフェイスと同様の考え方のインターフェイスである以下のWebサイトの解説がわかりやすい。</p> + * + * <p>cf. http://www.masatom.in/pukiwiki/index.php?cmd=read&page=Eclipse%2F%A5%D7%A5%E9%A5%B0%A5%A4%A5%F3%B3%AB%C8%AF%A4%CETIPS%BD%B8%2Forg.eclipse.core.runtime.IAdaptable </p> + * + * @author daisuke + */ +public interface Adaptable { + + /** + * 指定したアダプタを適用したインスタンスを取得する。 + * 既にアダプタが適用済みであった場合、既存のアダプタの上にさらに要求されたアダプタを適用するか、 + * 既存のアダプタを除去した上で要求されたアダプタを適用するかは実装に依存する。 + * @param <T> アダプタが持つ型 + * @param adapter アダプタクラス + * @return アダプタのインスタンス + */ + <T>T getAdapter(Class<T> adapter); + + List<Object> getAdapters(); + + /** + * 指定したアダプタを適用できるかどうか調べる。 + * @param adapter アダプタクラス + * @return 適用可能の場合 <code>true</code> + */ + boolean hasAdapter(Class<?> adapter); + +} Property changes on: artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/adapter/Adaptable.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/CanceledException.java =================================================================== --- artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/CanceledException.java (rev 0) +++ artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/CanceledException.java 2008-09-17 19:51:13 UTC (rev 1933) @@ -0,0 +1,31 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. + * Created on 2008/08/03 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ +package org.jiemamy.spec.exception; + +import org.jiemamy.spec.extension.Exporter; +import org.jiemamy.spec.extension.Importer; + +/** + * {@link Importer} / {@link Exporter} がダイアログでキャンセルされた時にスローされる例外。 + * @author daisuke + */ + @ SuppressWarnings("serial") +public class CanceledException extends JiemamyException { + +} Property changes on: artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/CanceledException.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/DataTypeNotFoundException.java =================================================================== --- artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/DataTypeNotFoundException.java (rev 0) +++ artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/DataTypeNotFoundException.java 2008-09-17 19:51:13 UTC (rev 1933) @@ -0,0 +1,40 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. + * Created on 2008/07/07 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ +package org.jiemamy.spec.exception; + +import org.jiemamy.spec.extension.Dialect; +import org.jiemamy.spec.model.datatype.DataType; + +/** + * 該当する{@link DataType}の実装が見つからない時にスローされる例外。 + * @author daisuke + */ + @ SuppressWarnings("serial") +public class DataTypeNotFoundException extends JiemamyException { + + /** + * コンストラクタ。 + * @param dialect 検索対象SQL方言 + * @param typeName 型名 + * @category instance creation + */ + public DataTypeNotFoundException(Dialect dialect, String typeName) { + super("\"" + typeName + "\" is not found in " + dialect + "."); + } +} Property changes on: artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/DataTypeNotFoundException.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/DriverNotFoundException.java =================================================================== --- artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/DriverNotFoundException.java (rev 0) +++ artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/DriverNotFoundException.java 2008-09-17 19:51:13 UTC (rev 1933) @@ -0,0 +1,49 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. + * Created on 2008/07/26 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ +package org.jiemamy.spec.exception; + +/** + * JDBCドライバクラスが、JARファイル内から見つからなかった時にスローされる例外。 + * @author daisuke + */ + @ SuppressWarnings("serial") +public class DriverNotFoundException extends Exception { + + /** 見つからなかったドライバクラス名 */ + private String className; + + + /** + * コンストラクタ。 + * @param className 見つからなかったドライバクラス名 + * @category instance creation + */ + public DriverNotFoundException(String className) { + this.className = className; + } + + /** + * 見つからなかったドライバクラス名を取得する。 + * @return ドライバクラス名 + */ + protected String getClassName() { + return className; + } + +} Property changes on: artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/DriverNotFoundException.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/ElementNotFoundException.java =================================================================== --- artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/ElementNotFoundException.java (rev 0) +++ artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/ElementNotFoundException.java 2008-09-17 19:51:13 UTC (rev 1933) @@ -0,0 +1,63 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. + * Created on 2008/06/22 + * + * This file is part of Jiemamy-core. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ +package org.jiemamy.spec.exception; + +import org.jiemamy.spec.model.ColumnModel; +import org.jiemamy.spec.model.RootModel; +import org.jiemamy.spec.model.connection.ForeignKeyModel; +import org.jiemamy.spec.model.node.TableModel; + +/** + * 指定された名前の要素が見つからない時スローされる例外。 + * @author daisuke + */ + @ SuppressWarnings("serial") +public class ElementNotFoundException extends JiemamyRuntimeException { + + /** + * コンストラクタ。 + * @param fkModel 外部キーモデル + * @param referenceColumn 参照カラム + * @category instance creation + */ + public ElementNotFoundException(ForeignKeyModel fkModel, ColumnModel referenceColumn) { + super(referenceColumn.getName() + "(" + referenceColumn.getId() + ")" + " is not found in " + fkModel + "."); + } + + /** + * コンストラクタ。 + * @param rootModelImpl ルートモデル + * @param entityName エンティティ名 + * @category instance creation + */ + public ElementNotFoundException(RootModel rootModelImpl, String entityName) { + super(entityName + " is not found in RootModelImpl."); + } + + /** + * コンストラクタ。 + * @param tableModel 検索対象親テーブル + * @param columnName カラム名 + * @category instance creation + */ + public ElementNotFoundException(TableModel tableModel, String columnName) { + super(columnName + " is not found in " + tableModel + "."); + } + +} Property changes on: artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/ElementNotFoundException.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/ExportException.java =================================================================== --- artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/ExportException.java (rev 0) +++ artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/ExportException.java 2008-09-17 19:51:13 UTC (rev 1933) @@ -0,0 +1,65 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. + * Created on 2008/07/12 + * + * Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ +package org.jiemamy.spec.exception; + +import org.jiemamy.spec.extension.Exporter; + +/** + * {@link Exporter}実行時に問題が発生した場合にスローされる例外。 + * @author daisuke + */ + @ SuppressWarnings("serial") +public class ExportException extends JiemamyException { + + /** + * コンストラクタ。 + * @category instance creation + */ + public ExportException() { + } + + /** + * コンストラクタ。 + * @param cause 原因 + * @category instance creation + */ + public ExportException(Exception cause) { + super(cause); + } + + /** + * コンストラクタ。 + * @param message メッセージ + * @category instance creation + */ + public ExportException(String message) { + super(message); + } + + /** + * コンストラクタ。 + * @param message メッセージ + * @param cause 原因 + * @category instance creation + */ + public ExportException(String message, Exception cause) { + super(message, cause); + } + +} Property changes on: artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/ExportException.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/GenericModelingModeException.java =================================================================== --- artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/GenericModelingModeException.java (rev 0) +++ artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/GenericModelingModeException.java 2008-09-17 19:51:13 UTC (rev 1933) @@ -0,0 +1,33 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. + * Created on 2008/07/21 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ +package org.jiemamy.spec.exception; + +import org.jiemamy.spec.model.datatype.DataType; + +/** + * Genericモデリング時に、具体的{@link DataType}を取得しようとした時にスローされる例外。 + * + * <p>具体的 {@link DataType}とは、特定のRDBMS専用の型として登録された(実装された、ではない){@link DataType}である。</p> + * + * @author daisuke + */ + @ SuppressWarnings("serial") +public class GenericModelingModeException extends Exception { + +} Property changes on: artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/GenericModelingModeException.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/IllegalDataTypeImplementationException.java =================================================================== --- artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/IllegalDataTypeImplementationException.java (rev 0) +++ artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/IllegalDataTypeImplementationException.java 2008-09-17 19:51:13 UTC (rev 1933) @@ -0,0 +1,60 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. + * Created on 2008/07/08 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ +package org.jiemamy.spec.exception; + +import org.jiemamy.spec.model.datatype.DataType; + +/** + * Dialectコンポーネントにおいて、{@link DataType}が不正に実装されている場合にスローされる。 + * @author daisuke + */ + @ SuppressWarnings("serial") +public class IllegalDataTypeImplementationException extends JiemamyRuntimeException { + + /** + * コンストラクタ。 + * @param clazz + * @param cause + * @category instance creation + */ + public IllegalDataTypeImplementationException(Class<? extends DataType> clazz, Exception cause) { + super(cause); + } + + /** + * コンストラクタ。 + * @param dataType + * @param e + * @category instance creation + */ + public IllegalDataTypeImplementationException(DataType dataType, InstantiationException e) { + super(e); + } + + /** + * コンストラクタ。 + * @param dataType + * @param message + * @category instance creation + */ + public IllegalDataTypeImplementationException(DataType dataType, String message) { + super(message); + } + +} Property changes on: artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/IllegalDataTypeImplementationException.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/IllegalDataTypeMappingException.java =================================================================== --- artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/IllegalDataTypeMappingException.java (rev 0) +++ artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/IllegalDataTypeMappingException.java 2008-09-17 19:51:13 UTC (rev 1933) @@ -0,0 +1,48 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. + * Created on 2008/07/20 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ +package org.jiemamy.spec.exception; + +import org.jiemamy.spec.extension.DataTypeMapping; +import org.jiemamy.spec.model.datatype.DataType; + +/** + * Dialectコンポーネントによって{@link DataTypeMapping}が不正に設定されている場合にスローされる例外。 + * @author daisuke + */ + @ SuppressWarnings("serial") +public class IllegalDataTypeMappingException extends RuntimeException { + + /** + * コンストラクタ。 + * @param dataTypeClass キー + * @category instance creation + */ + public IllegalDataTypeMappingException(Class<? extends DataType> dataTypeClass) { + super("DataType was not found for key [" + dataTypeClass.getName() + "]"); + } + + /** + * コンストラクタ。 + * @param e + * @category instance creation + */ + public IllegalDataTypeMappingException(DataTypeNotFoundException e) { + super(e); + } +} Property changes on: artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/IllegalDataTypeMappingException.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/IllegalDialectImplementation.java =================================================================== --- artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/IllegalDialectImplementation.java (rev 0) +++ artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/IllegalDialectImplementation.java 2008-09-17 19:51:13 UTC (rev 1933) @@ -0,0 +1,37 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. + * Created on 2008/08/30 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ +package org.jiemamy.spec.exception; + +/** + * SQL方言の実装が不正である時にスローされる例外。 + * @author daisuke + */ + @ SuppressWarnings("serial") +public class IllegalDialectImplementation extends RuntimeException { + + /** + * コンストラクタ。 + * @param message + * @category instance creation + */ + public IllegalDialectImplementation(String message) { + super(message); + } + +} Property changes on: artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/IllegalDialectImplementation.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/ImportException.java =================================================================== --- artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/ImportException.java (rev 0) +++ artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/ImportException.java 2008-09-17 19:51:13 UTC (rev 1933) @@ -0,0 +1,65 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. + * Created on 2008/07/12 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ +package org.jiemamy.spec.exception; + +import org.jiemamy.spec.extension.Importer; + +/** + * {@link Importer}実行時に問題が発生した場合にスローされる例外。 + * @author daisuke + */ + @ SuppressWarnings("serial") +public class ImportException extends JiemamyException { + + /** + * コンストラクタ。 + * @category instance creation + */ + public ImportException() { + } + + /** + * コンストラクタ。 + * @param message メッセージ + * @category instance creation + */ + public ImportException(String message) { + super(message); + } + + /** + * コンストラクタ。 + * @param message メッセージ + * @param cause 原因 + * @category instance creation + */ + public ImportException(String message, Throwable cause) { + super(message, cause); + } + + /** + * コンストラクタ。 + * @param cause 原因 + * @category instance creation + */ + public ImportException(Throwable cause) { + super(cause); + } + +} Property changes on: artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/ImportException.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/JiemamyException.java =================================================================== --- artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/JiemamyException.java (rev 0) +++ artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/JiemamyException.java 2008-09-17 19:51:13 UTC (rev 1933) @@ -0,0 +1,68 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. + * Created on 2008/06/09 + * + * This file is part of Jiemamy-core. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ +package org.jiemamy.spec.exception; + +/** + * Jiemamyからスローされるチェック例外の基底クラス。 + * + * <p>Jiemamy自身のコードは、基本的にこのクラス以外を基底クラスに持つチェック例外を生成し、スローしてはならない。 + * 必ずこのクラスを拡張した例外を投げる。</p> + * + * @author daisuke + */ + @ SuppressWarnings("serial") +public class JiemamyException extends Exception { + + /** + * コンストラクタ。 + * @category instance creation + */ + public JiemamyException() { + super(); + } + + /** + * コンストラクタ。 + * @param message メッセージ + * @category instance creation + */ + public JiemamyException(String message) { + super(message); + } + + /** + * コンストラクタ。 + * @param message メッセージ + * @param cause 原因 + * @category instance creation + */ + public JiemamyException(String message, Throwable cause) { + super(message, cause); + } + + /** + * コンストラクタ。 + * @param cause 原因 + * @category instance creation + */ + public JiemamyException(Throwable cause) { + super(cause); + } + +} Property changes on: artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/JiemamyException.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/JiemamyRuntimeException.java =================================================================== --- artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/JiemamyRuntimeException.java (rev 0) +++ artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/JiemamyRuntimeException.java 2008-09-17 19:51:13 UTC (rev 1933) @@ -0,0 +1,68 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. + * Created on 2008/06/09 + * + * This file is part of Jiemamy-core. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ +package org.jiemamy.spec.exception; + +/** + * Jiemamyからスローされる非チェック例外の基底クラス。 + * + * <p>Jiemamy自身のコードは、基本的にこのクラス以外を基底クラスに持つ非チェック例外を生成し、スローしてはならない。 + * 必ずこのクラスを拡張した例外を投げる。</p> + * + * @author daisuke + */ + @ SuppressWarnings("serial") +public class JiemamyRuntimeException extends RuntimeException { + + /** + * コンストラクタ。 + * @category instance creation + */ + public JiemamyRuntimeException() { + super(); + } + + /** + * コンストラクタ。 + * @param message メッセージ + * @category instance creation + */ + public JiemamyRuntimeException(String message) { + super(message); + } + + /** + * コンストラクタ。 + * @param message メッセージ + * @param cause 原因 + * @category instance creation + */ + public JiemamyRuntimeException(String message, Throwable cause) { + super(message, cause); + } + + /** + * コンストラクタ。 + * @param cause 原因 + * @category instance creation + */ + public JiemamyRuntimeException(Throwable cause) { + super(cause); + } + +} Property changes on: artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/JiemamyRuntimeException.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/MappingValueNotFoundException.java =================================================================== --- artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/MappingValueNotFoundException.java (rev 0) +++ artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/MappingValueNotFoundException.java 2008-09-17 19:51:13 UTC (rev 1933) @@ -0,0 +1,30 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. + * Created on 2008/06/22 + * + * This file is part of Jiemamy-core. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ +package org.jiemamy.spec.exception; + +import org.jiemamy.spec.model.dataset.RecordModel; + +/** + * {@link RecordModel}に対して問い合わせた値が「特定されない状態」である場合にスローされる例外。 + * @author daisuke + */ + @ SuppressWarnings("serial") +public class MappingValueNotFoundException extends JiemamyException { + +} Property changes on: artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/MappingValueNotFoundException.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/TooManyElementsException.java =================================================================== --- artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/TooManyElementsException.java (rev 0) +++ artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/TooManyElementsException.java 2008-09-17 19:51:13 UTC (rev 1933) @@ -0,0 +1,56 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. + * Created on 2008/06/22 + * + * This file is part of Jiemamy-core. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ +package org.jiemamy.spec.exception; + +import java.util.List; + +import org.jiemamy.spec.model.JiemamyModel; + +/** + * 問い合わせの結果、同名の要素が複数存在する時スローされる例外。 + * @author daisuke + */ + @ SuppressWarnings("serial") +public class TooManyElementsException extends JiemamyException { + + /** 見つかった同名要素のリスト */ + private List<? extends JiemamyModel> elements; + + + /** + * コンストラクタ。 + * @param parent 検索対象親モデル + * @param name 名前 + * @param elements 見つかった同名要素のリスト + * @category instance creation + */ + public TooManyElementsException(JiemamyModel parent, String name, List<? extends JiemamyModel> elements) { + super(name + " exists two or more in " + parent + "."); + this.elements = elements; + } + + /** + * 見つかった同名要素のリストを取得する。 + * @return 見つかった同名要素のリスト + */ + public List<? extends JiemamyModel> getElements() { + return elements; + } + +} Property changes on: artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/TooManyElementsException.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/package-info.java =================================================================== --- artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/package-info.java (rev 0) +++ artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/package-info.java 2008-09-17 19:51:13 UTC (rev 1933) @@ -0,0 +1,2 @@ +package org.jiemamy.spec.exception; + Property changes on: artemis/trunk/org.jiemamy.spec/src/main/java/org/jiemamy/spec/exception/package-info.java ___________________________________________________________________ Name: svn:mime-type + text/plain