Request( Operation operation, String negotiatedVersion, String datasetPath, GridDataset dataset) { this.operation = operation; this.negotiatedVersion = negotiatedVersion; this.datasetPath = datasetPath; this.dataset = dataset; this.availableCoverageNames = new ArrayList<String>(); for ( GridDataset.Gridset gs : this.dataset.getGridsets() ) { this.availableCoverageNames.add( gs.getGeoCoordSystem().getName() ); } if ( operation == null ) throw new IllegalArgumentException( "Non-null operation required." ); if ( this.negotiatedVersion == null ) throw new IllegalArgumentException( "Non-null negotiated version required." ); if ( ! this.negotiatedVersion.equals( expectedVersion) ) throw new IllegalArgumentException( "Version <" + negotiatedVersion + "> not as expected <" + expectedVersion + ">." ); if ( this.datasetPath == null ) throw new IllegalArgumentException( "Non-null dataset path required." ); if ( this.dataset == null ) throw new IllegalArgumentException( "Non-null dataset required." ); }
public int compare(GridDataset.Gridset gridset1, GridDataset.Gridset gridset2) { GridCoordSystem cs1 = gridset1.getGeoCoordSystem(); GridCoordSystem cs2 = gridset2.getGeoCoordSystem(); if (cs1.getDomain().size() != cs2.getDomain().size()) return cs1.getDomain().size() - cs2.getDomain().size(); return cs1.getName().compareTo(cs2.getName()); } }
public int compare(GridDataset.Gridset gridset1, GridDataset.Gridset gridset2) { GridCoordSystem cs1 = gridset1.getGeoCoordSystem(); GridCoordSystem cs2 = gridset2.getGeoCoordSystem(); if (cs1.getDomain().size() != cs2.getDomain().size()) return cs1.getDomain().size() - cs2.getDomain().size(); return cs1.getName().compareTo(cs2.getName()); } }
public int compare(GridDataset.Gridset gridset1, GridDataset.Gridset gridset2) { GridCoordSystem cs1 = gridset1.getGeoCoordSystem(); GridCoordSystem cs2 = gridset2.getGeoCoordSystem(); if (cs1.getDomain().size() != cs2.getDomain().size()) return cs1.getDomain().size() - cs2.getDomain().size(); return cs1.getName().compareTo(cs2.getName()); } }
public WcsDataset( GridDataset dataset, String datasetPath ) { this.datasetPath = datasetPath; int pos = datasetPath.lastIndexOf('/'); this.datasetName = ( pos > 0 ) ? datasetPath.substring( pos + 1 ) : datasetPath; this.dataset = dataset; this.availableCoverages = new HashMap<String, WcsCoverage>(); for ( GridDataset.Gridset curGridset : this.dataset.getGridsets() ) { GridCoordSystem gcs = curGridset.getGeoCoordSystem(); if ( ! gcs.isRegularSpatial() ) continue; this.availableCoverages.put( gcs.getName(), new WcsCoverage( curGridset, this) ); } }
private Element writeCoordSys(GridCoordSystem cs) { Element csElem = new Element("coordSys"); csElem.setAttribute("name", cs.getName()); List axes = cs.getCoordinateAxes(); for (int i = 0; i < axes.size(); i++) { CoordinateAxis axis = (CoordinateAxis) axes.get(i); Element axisElem = new Element("axisRef"); axisElem.setAttribute("name", axis.getFullName()); csElem.addContent(axisElem); } List cts = cs.getCoordinateTransforms(); for (int j = 0; j < cts.size(); j++) { CoordinateTransform ct = (CoordinateTransform) cts.get(j); Element elem = new Element("coordTransRef"); elem.setAttribute("name", ct.getName()); csElem.addContent(elem); } return csElem; }
private Element writeCoordSys(GridCoordSystem cs) { Element csElem = new Element("coordSys"); csElem.setAttribute("name", cs.getName()); List axes = cs.getCoordinateAxes(); for (int i = 0; i < axes.size(); i++) { CoordinateAxis axis = (CoordinateAxis) axes.get(i); Element axisElem = new Element("axisRef"); axisElem.setAttribute("name", axis.getFullName()); csElem.addContent(axisElem); } List cts = cs.getCoordinateTransforms(); for (int j = 0; j < cts.size(); j++) { CoordinateTransform ct = (CoordinateTransform) cts.get(j); Element elem = new Element("coordTransRef"); elem.setAttribute("name", ct.getName()); csElem.addContent(elem); } return csElem; }
private Element writeCoordSys(GridCoordSystem cs) { Element csElem = new Element("coordSys"); csElem.setAttribute("name", cs.getName()); List axes = cs.getCoordinateAxes(); for (int i = 0; i < axes.size(); i++) { CoordinateAxis axis = (CoordinateAxis) axes.get(i); Element axisElem = new Element("axisRef"); axisElem.setAttribute("name", axis.getFullName()); csElem.addContent(axisElem); } List cts = cs.getCoordinateTransforms(); for (int j = 0; j < cts.size(); j++) { CoordinateTransform ct = (CoordinateTransform) cts.get(j); Element elem = new Element("coordTransRef"); elem.setAttribute("name", ct.getName()); csElem.addContent(elem); } return csElem; }
private Element genGetCovOpsElement() { // OperationsMetadata/Operation (owcs) @name="GetCoverage" Element getCovOpsElem = new Element( "Operation", owcsNS ); getCovOpsElem.setAttribute( "name", Request.Operation.GetCoverage.toString() ); // Add DCP/HTTP/GET element with xlink to this server. // OperationsMetadata/Operation/DCP/HTTP/{GET|POST} (owcs) [1..*] // - @type=simple, @xlink:title, @xlink:href getCovOpsElem.addContent( new Element( "DCP", owcsNS ).addContent( new Element( "HTTP", owcsNS ).addContent( new Element( "GET", owcsNS ).setAttribute( "href", serverURI.toString(), xlinkNS ) ) ) ); // Add the "Service", "Version", "AcceptVersions", and "Sections" parameters. // OperationsMetadata/Operation/Parameter (owcs) [0..*] getCovOpsElem.addContent( genParamElement( "service", Collections.singletonList( "WCS" ) ) ); getCovOpsElem.addContent( genParamElement( "version", Collections.singletonList( "1.1.0" ) ) ); getCovOpsElem.addContent( genParamElement( "store", Collections.singletonList( "False" ) ) ); List<String> idList = new ArrayList<String>(); for ( GridDataset.Gridset gs : this.dataset.getGridsets() ) { idList.add( gs.getGeoCoordSystem().getName() ); } getCovOpsElem.addContent( genParamElement( "Identifier", idList ) ); // No constraints or metadata for this operation. // OperationsMetadata/Operation/Constraint (owcs) [0..*] // OperationsMetadata/Operation/Metadata (ows) [0..*] return getCovOpsElem; }
private Element genDescCovOpsElement() { // OperationsMetadata/Operation (owcs) @name="DescribeCoverage" Element descCovOpsElem = new Element( "Operation", owcsNS ); descCovOpsElem.setAttribute( "name", Request.Operation.DescribeCoverage.toString() ); // Add DCP/HTTP/GET element with xlink to this server. // OperationsMetadata/Operation/DCP/HTTP/{GET|POST} (owcs) [1..*] // - @type=simple, @xlink:title, @xlink:href descCovOpsElem.addContent( new Element( "DCP", owcsNS ).addContent( new Element( "HTTP", owcsNS ).addContent( new Element( "GET", owcsNS ).setAttribute( "href", serverURI.toString(), xlinkNS ) ) ) ); // Add the "Service", "Version", "AcceptVersions", and "Sections" parameters. // OperationsMetadata/Operation/Parameter (owcs) [0..*] descCovOpsElem.addContent( genParamElement( "service", Collections.singletonList( "WCS" ) ) ); descCovOpsElem.addContent( genParamElement( "version", Collections.singletonList( "1.1.0" ) ) ); List<String> idList = new ArrayList<String>(); for ( GridDataset.Gridset gs : this.dataset.getGridsets() ) { idList.add( gs.getGeoCoordSystem().getName()); } descCovOpsElem.addContent( genParamElement( "Identifier", idList ) ); // No constraints or metadata for this operation. // OperationsMetadata/Operation/Constraint (owcs) [0..*] // OperationsMetadata/Operation/Metadata (ows) [0..*] return descCovOpsElem; }
private Element writeGridSet(GridDataset.Gridset gridset) { Element csElem = new Element("gridSet"); GridCoordSystem cs = gridset.getGeoCoordSystem(); csElem.setAttribute("name", cs.getName());
private Element writeGridSet(GridDataset.Gridset gridset) { Element csElem = new Element("gridSet"); GridCoordSystem cs = gridset.getGeoCoordSystem(); csElem.setAttribute("name", cs.getName());
private Element writeGridSet(GridDataset.Gridset gridset) { Element csElem = new Element("gridSet"); GridCoordSystem cs = gridset.getGeoCoordSystem(); csElem.setAttribute("name", cs.getName());