Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt tests to new demo #79

Merged
merged 4 commits into from
Apr 2, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,16 @@ Map<String, TileDataSet> extractTileDataSets()
}

private DefaultTileDataSet buildTileDataSet( RequestParams requestParams, TileMatrixSet tms, WMSClient client,
String outputFormat ) {
String outputFormat )
throws ResourceInitException {
List<String> layers = splitNullSafe( requestParams.getLayers() );

for ( String l : layers ) {
if ( !client.hasLayer( l ) ) {
throw new ResourceInitException( "The layer named " + l + " is not available from the remote WMS." );
}
}

List<String> styles = splitNullSafe( requestParams.getStyles() );
String format = requestParams.getFormat();
String crs = requestParams.getCRS();
Expand All @@ -123,7 +131,9 @@ private DefaultTileDataSet buildTileDataSet( RequestParams requestParams, TileMa

List<TileDataLevel> dataLevels = new ArrayList<TileDataLevel>();
for ( TileMatrix tm : tms.getTileMatrices() ) {
TileDataLevel m = new RemoteWMSTileDataLevel( tm, format, layers, styles, client, outputFormat, crs, defaultGetMap, defaultGetFeatureInfo, hardGetMap, hardGetFeatureInfo );
TileDataLevel m = new RemoteWMSTileDataLevel( tm, format, layers, styles, client, outputFormat, crs,
defaultGetMap, defaultGetFeatureInfo, hardGetMap,
hardGetFeatureInfo );
dataLevels.add( 0, m );
}
return new DefaultTileDataSet( dataLevels, tms, "image/" + outputFormat );
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<RemoteWMS xmlns="http://www.deegree.org/remoteows/wms" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.deegree.org/remoteows/wms remotewms.xsd" configVersion="3.1.0">
<CapabilitiesDocumentLocation
location="http://deegree3-demo.deegree.org:80/utah-workspace/services?request=GetCapabilities&amp;service=WMS&amp;version=1.1.1" />
location="http://deegree3-demo.deegree.org/utah-workspace/services?request=GetCapabilities&amp;service=WMS&amp;version=1.1.1" />
</RemoteWMS>
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<OutputFormat>image/png</OutputFormat>
<RequestParams>
<!-- [1] Comma-separated list of layer names -->
<Layers>CountyBoundaries,CountyNames</Layers>
<Layers>countyboundaries,countynames</Layers>
<!-- [0..1] Comma-separated list of styles -->
<Styles>default,default</Styles>
<!-- [1] Image format -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<OutputFormat>image/png</OutputFormat>
<RequestParams>
<!-- [1] Comma-separated list of layer names -->
<Layers>CountyBoundaries,CountyNames</Layers>
<Layers>countyboundaries,countynames</Layers>
<!-- [0..1] Comma-separated list of styles -->
<Styles>default,default</Styles>
<!-- [1] Image format -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<TileMatrixSetId>utah</TileMatrixSetId>
<OutputFormat>image/png</OutputFormat>
<RequestParams>
<Layers>SatelliteProvo,DominantVegetation</Layers>
<Layers>orthophoto,dominantvegetation</Layers>
<Styles>default,default</Styles>
<Format>image/png</Format>
<CRS>EPSG:26912</CRS>
Expand All @@ -23,7 +23,7 @@
<TileMatrixSetId>utah</TileMatrixSetId>
<OutputFormat>image/png</OutputFormat>
<RequestParams>
<Layers>DominantVegetation</Layers>
<Layers>dominantvegetation</Layers>
<Styles>default</Styles>
<Format>image/png</Format>
<CRS>EPSG:26912</CRS>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<OutputFormat>image/png</OutputFormat>
<RequestParams>
<!-- [1] Comma-separated list of layer names -->
<Layers>SatelliteProvo,DominantVegetation</Layers>
<Layers>orthophoto,dominantvegetation</Layers>
<!-- [0..1] Comma-separated list of styles -->
<Styles>default,default</Styles>
<!-- [1] Image format -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<OutputFormat>image/png</OutputFormat>
<RequestParams>
<!-- [1] Comma-separated list of layer names -->
<Layers>SatelliteProvo</Layers>
<Layers>orthophoto</Layers>
<!-- [0..1] Comma-separated list of styles -->
<Styles>default</Styles>
<!-- [1] Image format -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<OutputFormat>image/png</OutputFormat>
<RequestParams>
<!-- [1] Comma-separated list of layer names -->
<Layers>SatelliteProvo</Layers>
<Layers>orthophoto</Layers>
<!-- [0..1] Comma-separated list of styles -->
<Styles>default</Styles>
<!-- [1] Image format -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<OutputFormat>image/png</OutputFormat>
<RequestParams>
<!-- [1] Comma-separated list of layer names -->
<Layers>SatelliteProvo,DominantVegetation</Layers>
<Layers>orthophoto,dominantvegetation</Layers>
<!-- [0..1] Comma-separated list of styles -->
<Styles>default,default</Styles>
<!-- [1] Image format -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
import javax.xml.namespace.QName;
import javax.xml.stream.FactoryConfigurationError;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamConstants;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;

Expand All @@ -59,7 +58,6 @@
import org.deegree.commons.xml.CommonNamespaces;
import org.deegree.commons.xml.schema.SchemaValidator;
import org.deegree.commons.xml.stax.XMLStreamUtils;
import org.deegree.protocol.ows.capabilities.OWSCommon110CapabilitiesAdapter;
import org.deegree.protocol.wfs.WFSConstants;
import org.deegree.protocol.wmts.client.Layer;
import org.deegree.protocol.wmts.client.WMTSClient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

opt = document.getElementById('<?name>')
if(!opt){
opt = newnode(sw, 'option', 'SGID500_DominantVegetation')
opt.setAttribute('id', 'SGID500_DominantVegetation')
opt.setAttribute('value', 'SGID500_DominantVegetation')
opt = newnode(sw, 'option', 'DominantVegetation')
opt.setAttribute('id', 'DominantVegetation')
opt.setAttribute('value', 'DominantVegetation')
}


Expand Down Expand Up @@ -55,112 +55,107 @@ if(!opt){
this[document.getElementById('theswitch').value + "_switchfunction"]()
}

if(! this.SGID500_DominantVegetation_switchfunction){
this.SGID500_DominantVegetation_switchfunction = function(){
if(! this.DominantVegetation_switchfunction){
this.DominantVegetation_switchfunction = function(){
var div = document.getElementById('table')
while(div.firstChild) div.removeChild(div.firstChild)
var table = this.tbody(this.table(div))
var row = tr(table)
th(row, "Field").style.cssText = headerStyle
th(row, "Value").style.cssText = headerStyle
for(var i in SGID500_DominantVegetation){
for(var i in DominantVegetation){
row = tr(table)
td(row, 'GML ID').style.cssText = headerStyle
td(row, 'SGID500_DOMINANTVEGETATION_329').style.cssText = headerStyle
SGID500_DominantVegetation[i](table)
td(row, 'DOMINANTVEGETATION_329').style.cssText = headerStyle
DominantVegetation[i](table)
}
}

SGID500_DominantVegetation = []
DominantVegetation = []
}

SGID500_DominantVegetation[SGID500_DominantVegetation.length] = function (table) {
DominantVegetation[DominantVegetation.length] = function (table) {
var odd = true
var row

row = tr(table)
td(row, 'OBJECTID').style.cssText = odd ? oddStyle : evenStyle
td(row, 'objectid').style.cssText = odd ? oddStyle : evenStyle
td(row, '330').style.cssText = odd ? oddStyle : evenStyle
odd = !odd

row = tr(table)
td(row, 'CODE').style.cssText = odd ? oddStyle : evenStyle
td(row, 'code').style.cssText = odd ? oddStyle : evenStyle
td(row, '202').style.cssText = odd ? oddStyle : evenStyle
odd = !odd

row = tr(table)
td(row, 'DOM').style.cssText = odd ? oddStyle : evenStyle
td(row, 'B2').style.cssText = odd ? oddStyle : evenStyle
odd = !odd

row = tr(table)
td(row, 'SS1').style.cssText = odd ? oddStyle : evenStyle
td(row, 'ss1').style.cssText = odd ? oddStyle : evenStyle
td(row, 'B1').style.cssText = odd ? oddStyle : evenStyle
odd = !odd

row = tr(table)
td(row, 'SS2').style.cssText = odd ? oddStyle : evenStyle
td(row, 'ss2').style.cssText = odd ? oddStyle : evenStyle
td(row, 'A1').style.cssText = odd ? oddStyle : evenStyle
odd = !odd

row = tr(table)
td(row, 'SS3').style.cssText = odd ? oddStyle : evenStyle
td(row, 'ss3').style.cssText = odd ? oddStyle : evenStyle
td(row, 'B6').style.cssText = odd ? oddStyle : evenStyle
odd = !odd

row = tr(table)
td(row, 'SS4').style.cssText = odd ? oddStyle : evenStyle
td(row, 'ss4').style.cssText = odd ? oddStyle : evenStyle
td(row, 'a2').style.cssText = odd ? oddStyle : evenStyle
odd = !odd

row = tr(table)
td(row, 'SS5').style.cssText = odd ? oddStyle : evenStyle
td(row, 'ss5').style.cssText = odd ? oddStyle : evenStyle
td(row, 'a6').style.cssText = odd ? oddStyle : evenStyle
odd = !odd

row = tr(table)
td(row, 'SS6').style.cssText = odd ? oddStyle : evenStyle
td(row, 'ss6').style.cssText = odd ? oddStyle : evenStyle
td(row, 'b3').style.cssText = odd ? oddStyle : evenStyle
odd = !odd

row = tr(table)
td(row, 'SS7').style.cssText = odd ? oddStyle : evenStyle
td(row, 'ss7').style.cssText = odd ? oddStyle : evenStyle
td(row, 'b4').style.cssText = odd ? oddStyle : evenStyle
odd = !odd

row = tr(table)
td(row, 'SS8').style.cssText = odd ? oddStyle : evenStyle
td(row, 'ss8').style.cssText = odd ? oddStyle : evenStyle
td(row, 'b7').style.cssText = odd ? oddStyle : evenStyle
odd = !odd

row = tr(table)
td(row, 'SS9').style.cssText = odd ? oddStyle : evenStyle
td(row, 'ss9').style.cssText = odd ? oddStyle : evenStyle
td(row, 'b8').style.cssText = odd ? oddStyle : evenStyle
odd = !odd

row = tr(table)
td(row, 'SS10').style.cssText = odd ? oddStyle : evenStyle
td(row, 'ss10').style.cssText = odd ? oddStyle : evenStyle
td(row, 'b17').style.cssText = odd ? oddStyle : evenStyle
odd = !odd

row = tr(table)
td(row, 'LAB').style.cssText = odd ? oddStyle : evenStyle
td(row, 'lab').style.cssText = odd ? oddStyle : evenStyle
td(row, 'B').style.cssText = odd ? oddStyle : evenStyle
odd = !odd

row = tr(table)
td(row, 'SHAPE_AREA').style.cssText = odd ? oddStyle : evenStyle
td(row, 'area').style.cssText = odd ? oddStyle : evenStyle
td(row, '3281815517.40').style.cssText = odd ? oddStyle : evenStyle
odd = !odd

row = tr(table)
td(row, 'SHAPE_LEN').style.cssText = odd ? oddStyle : evenStyle
td(row, 'length').style.cssText = odd ? oddStyle : evenStyle
td(row, '1283380.64563').style.cssText = odd ? oddStyle : evenStyle
odd = !odd

}

if(!first) first = SGID500_DominantVegetation_switchfunction
if(!first) first = DominantVegetation_switchfunction


</script>
Expand Down
Binary file not shown.
Loading