svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.metadata.basic / org.gvsig.metadata.basic.swing / org.gvsig.metadata.swing.basic.api / src / main / java / org / gvsig / metadata / swing / basic / api / CreateJMetadataPanelException.java @ 40769
History | View | Annotate | Download (1.67 KB)
1 | 40769 | jjdelcerro | /**
|
---|---|---|---|
2 | * gvSIG. Desktop Geographic Information System.
|
||
3 | 40608 | jjdelcerro | *
|
4 | 40769 | jjdelcerro | * Copyright (C) 2007-2013 gvSIG Association.
|
5 | *
|
||
6 | 40608 | jjdelcerro | * This program is free software; you can redistribute it and/or
|
7 | * modify it under the terms of the GNU General Public License
|
||
8 | 40769 | jjdelcerro | * as published by the Free Software Foundation; either version 3
|
9 | 40608 | jjdelcerro | * of the License, or (at your option) any later version.
|
10 | 40769 | jjdelcerro | *
|
11 | 40608 | jjdelcerro | * This program is distributed in the hope that it will be useful,
|
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
14 | * GNU General Public License for more details.
|
||
15 | 40769 | jjdelcerro | *
|
16 | 40608 | jjdelcerro | * You should have received a copy of the GNU General Public License
|
17 | * along with this program; if not, write to the Free Software
|
||
18 | 40769 | jjdelcerro | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19 | 40608 | jjdelcerro | * MA 02110-1301, USA.
|
20 | 40769 | jjdelcerro | *
|
21 | * For any additional information, do not hesitate to contact us
|
||
22 | * at info AT gvsig.com, or visit our website www.gvsig.com.
|
||
23 | 40608 | jjdelcerro | */
|
24 | package org.gvsig.metadata.swing.basic.api; |
||
25 | |||
26 | import org.gvsig.metadata.Metadata; |
||
27 | import org.gvsig.metadata.exceptions.MetadataException; |
||
28 | |||
29 | public class CreateJMetadataPanelException extends MetadataException { |
||
30 | |||
31 | /**
|
||
32 | *
|
||
33 | */
|
||
34 | private static final long serialVersionUID = 7989045357127054749L; |
||
35 | |||
36 | public CreateJMetadataPanelException(Metadata metadata, Throwable cause) { |
||
37 | super(
|
||
38 | "Can't create a JMetadataPanel based on this metadata: '%(metadata)'",
|
||
39 | cause, |
||
40 | "_cant_create_a_JMetadataPanel_based_on_this_metadata_XmetadataX",
|
||
41 | serialVersionUID |
||
42 | ); |
||
43 | String name;
|
||
44 | try {
|
||
45 | name = metadata.getMetadataName(); |
||
46 | } catch(Exception e) { |
||
47 | name = null;
|
||
48 | } |
||
49 | if( name==null ) { |
||
50 | name = "(unknow)";
|
||
51 | } |
||
52 | setValue("metadata", name);
|
||
53 | } |
||
54 | } |