private DomainSubsetType parseDomainSubset(Map kvp) { final DomainSubsetType domainSubset = Wcs111Factory.eINSTANCE.createDomainSubsetType(); // either bbox or timesequence must be there BoundingBoxType bbox = (BoundingBoxType) kvp.get("BoundingBox"); TimeSequenceType timeSequence = (TimeSequenceType) kvp.get("TemporalSubset"); if (timeSequence == null && bbox == null) throw new WcsException( "Bounding box cannot be null, TimeSequence has not been specified", WcsExceptionCode.MissingParameterValue, "BoundingBox"); domainSubset.setBoundingBox(bbox); domainSubset.setTemporalSubset(timeSequence); return domainSubset; }
TimeSequenceType results = Wcs111Factory.eINSTANCE.createTimeSequenceType(); TimePeriodType timePeriod = Wcs111Factory.eINSTANCE.createTimePeriodType(); Date beginPosition = cvtToGmt(begining.getPosition().getDate()); Date endPosition = cvtToGmt(ending.getPosition().getDate());
private OutputType parseOutputElement(Map kvp) throws Exception { final OutputType output = Wcs111Factory.eINSTANCE.createOutputType(); output.setGridCRS(Wcs111Factory.eINSTANCE.createGridCrsType()); // check and set store Boolean store = (Boolean) kvp.get("store"); if (store != null) output.setStore(store.booleanValue()); // check and set format String format = (String) kvp.get("format"); if (format == null) throw new WcsException("format parameter is mandatory", MissingParameterValue, "format"); output.setFormat(format); // set the other gridcrs properties final GridCrsType gridCRS = output.getGridCRS(); gridCRS.setGridBaseCRS((String) kvp.get("gridBaseCrs")); gridCRS.setGridType((String) kvp.get("gridType")); gridCRS.setGridCS((String) kvp.get("gridCS")); gridCRS.setGridOrigin((Double[]) kvp.get("GridOrigin")); gridCRS.setGridOffsets((Double[]) kvp.get("GridOffsets")); return output; }
public Object visit(ASTRangeSubset node, Object data) { RangeSubsetType rs = wcsf.createRangeSubsetType(); for (int i = 0; i < node.jjtGetNumChildren(); i++) { ASTFieldSubset fs = (ASTFieldSubset) node.jjtGetChild(i); FieldSubsetType fst = (FieldSubsetType) fs.jjtAccept(this, data); rs.getFieldSubset().add(fst); } return rs; }
public Object visit(ASTAxisSubset node, Object data) { AxisSubsetType as = wcsf.createAxisSubsetType(); as.setIdentifier(((SimpleNode) node.jjtGetChild(0)).getContent()); for (int i = 1; i < node.jjtGetNumChildren(); i++) { as.getKey().add(node.jjtGetChild(i).jjtAccept(this, null)); } return as; }
public Object visit(ASTFieldSubset node, Object data) { FieldSubsetType fs = wcsf.createFieldSubsetType(); for (int i = 0; i < node.jjtGetNumChildren(); i++) { Node child = node.jjtGetChild(i); if (child instanceof ASTFieldId) { CodeType id = owsf.createCodeType(); id.setValue((String) child.jjtAccept(this, null)); fs.setIdentifier(id); } else if (child instanceof ASTInterpolation) { fs.setInterpolationType((String) child.jjtAccept(this, null)); } else if (child instanceof ASTAxisSubset) { fs.getAxisSubset().add(child.jjtAccept(this, null)); } } return fs; }
@Override public Object parse(String value) throws Exception { TimeSequenceType timeSequence = Wcs111Factory.eINSTANCE.createTimeSequenceType(); WCSInfo info = geoServer.getService(WCSInfo.class); int maxRequestedDimensionValues = info.getMaxRequestedDimensionValues(); TimeParser parser = new TimeParser(maxRequestedDimensionValues); Collection<Date> timePositions = (Collection<Date>) parser.parse(value); for (Date tp : timePositions) { timeSequence.getTimePosition().add(tp); } return timeSequence; } }
private OutputType parseOutputElement(Map kvp) throws Exception { final OutputType output = Wcs111Factory.eINSTANCE.createOutputType(); output.setGridCRS(Wcs111Factory.eINSTANCE.createGridCrsType());
public Object visit(ASTRangeSubset node, Object data) { RangeSubsetType rs = wcsf.createRangeSubsetType(); for (int i = 0; i < node.jjtGetNumChildren(); i++) { ASTFieldSubset fs = (ASTFieldSubset) node.jjtGetChild(i); FieldSubsetType fst = (FieldSubsetType) fs.jjtAccept(this, data); rs.getFieldSubset().add(fst); } return rs; }
public Object visit(ASTAxisSubset node, Object data) { AxisSubsetType as = wcsf.createAxisSubsetType(); as.setIdentifier(((SimpleNode) node.jjtGetChild(0)).getContent()); for (int i = 1; i < node.jjtGetNumChildren(); i++) { as.getKey().add(node.jjtGetChild(i).jjtAccept(this, null)); } return as; }
public Object visit(ASTFieldSubset node, Object data) { FieldSubsetType fs = wcsf.createFieldSubsetType(); for (int i = 0; i < node.jjtGetNumChildren(); i++) { Node child = node.jjtGetChild(i); if(child instanceof ASTFieldId) { CodeType id = owsf.createCodeType(); id.setValue((String) child.jjtAccept(this, null)); fs.setIdentifier(id); } else if(child instanceof ASTInterpolation) { fs.setInterpolationType((String) child.jjtAccept(this, null)); } else if(child instanceof ASTAxisSubset) { fs.getAxisSubset().add(child.jjtAccept(this, null)); } } return fs; }
private DomainSubsetType parseDomainSubset(Map kvp) { final DomainSubsetType domainSubset = Wcs111Factory.eINSTANCE.createDomainSubsetType(); // either bbox or timesequence must be there BoundingBoxType bbox = (BoundingBoxType) kvp.get("BoundingBox"); TimeSequenceType timeSequence = (TimeSequenceType) kvp.get("TimeSequence"); if (timeSequence == null && bbox == null) throw new WcsException( "Bounding box cannot be null, TimeSequence has not been specified", WcsExceptionCode.MissingParameterValue, "BoundingBox"); domainSubset.setBoundingBox(bbox); domainSubset.setTemporalSubset(timeSequence); return domainSubset; }