root / org.gvsig.xmlschema / library / trunk / org.gvsig.xmlschema / org.gvsig.xmlschema.lib / org.gvsig.xmlschema.lib.impl / src-test / org / gvsig / xmlschema / lib / impl / reader / EuroRoadsSchemaReaderTest.java @ 127
History | View | Annotate | Download (2.92 KB)
1 |
package org.gvsig.xmlschema.lib.impl.reader; |
---|---|
2 |
|
3 |
import org.gvsig.xmlschema.lib.api.som.IXSComplexTypeDefinition; |
4 |
import org.gvsig.xmlschema.lib.api.som.IXSElementDeclaration; |
5 |
|
6 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
7 |
*
|
8 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
9 |
*
|
10 |
* This program is free software; you can redistribute it and/or
|
11 |
* modify it under the terms of the GNU General Public License
|
12 |
* as published by the Free Software Foundation; either version 2
|
13 |
* of the License, or (at your option) any later version.
|
14 |
*
|
15 |
* This program is distributed in the hope that it will be useful,
|
16 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
17 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
18 |
* GNU General Public License for more details.
|
19 |
*
|
20 |
* You should have received a copy of the GNU General Public License
|
21 |
* along with this program; if not, write to the Free Software
|
22 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
23 |
*
|
24 |
* For more information, contact:
|
25 |
*
|
26 |
* Generalitat Valenciana
|
27 |
* Conselleria d'Infraestructures i Transport
|
28 |
* Av. Blasco Ib??ez, 50
|
29 |
* 46010 VALENCIA
|
30 |
* SPAIN
|
31 |
*
|
32 |
* +34 963862235
|
33 |
* gvsig@gva.es
|
34 |
* www.gvsig.gva.es
|
35 |
*
|
36 |
* or
|
37 |
*
|
38 |
* IVER T.I. S.A
|
39 |
* Salamanca 50
|
40 |
* 46005 Valencia
|
41 |
* Spain
|
42 |
*
|
43 |
* +34 963163400
|
44 |
* dac@iver.es
|
45 |
*/
|
46 |
/* CVS MESSAGES:
|
47 |
*
|
48 |
* $Id: EuroRoadsSchemaReaderTest.java 161 2007-06-28 13:05:27Z jorpiell $
|
49 |
* $Log$
|
50 |
* Revision 1.3 2007/06/28 13:04:33 jorpiell
|
51 |
* The Qname has been updated to the 1.5 JVM machine. The schema validation is made in the GPEWriterHandlerImplementor class
|
52 |
*
|
53 |
* Revision 1.2 2007/06/22 12:21:18 jorpiell
|
54 |
* The typeNotFoundException has been deleted. It never was thrown
|
55 |
*
|
56 |
* Revision 1.1 2007/06/14 16:15:03 jorpiell
|
57 |
* builds to create the jars generated and add the schema code to the libGPEProject
|
58 |
*
|
59 |
* Revision 1.1 2007/06/14 13:50:07 jorpiell
|
60 |
* The schema jar name has been changed
|
61 |
*
|
62 |
* Revision 1.1 2007/06/08 07:31:20 jorpiell
|
63 |
* Add the euroRoadS test
|
64 |
*
|
65 |
*
|
66 |
*/
|
67 |
/**
|
68 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es)
|
69 |
*/
|
70 |
public class EuroRoadsSchemaReaderTest extends SchemaReaderBaseTest{ |
71 |
private String targetNamespace = "http://www.euroroads.org"; |
72 |
private String linkElement = "LinkAttribute"; |
73 |
//private String linkType = "LinkAttributeType";
|
74 |
|
75 |
/*
|
76 |
* (non-Javadoc)
|
77 |
* @see org.gvsig.gpe.schema.reader.SchemaReaderBaseTest#getFile()
|
78 |
*/
|
79 |
public String getFile() { |
80 |
return "testdata/EuroRoadS.xsd"; |
81 |
} |
82 |
|
83 |
/*
|
84 |
* (non-Javadoc)
|
85 |
* @see org.gvsig.gpe.schema.reader.SchemaReaderBaseTest#makeAsserts()
|
86 |
*/
|
87 |
public void makeAsserts(){ |
88 |
IXSElementDeclaration element = getSchema().getElementDeclarationByName(targetNamespace, linkElement); |
89 |
System.out.println(element.getQName().getLocalPart());
|
90 |
assertEquals(element.getQName().getLocalPart(), linkElement); |
91 |
assertTrue(element.getTypeDefinition() instanceof IXSComplexTypeDefinition);
|
92 |
|
93 |
} |
94 |
|
95 |
} |