org.deegree.commons.tom.ows.Version.toString()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(10.0k)|赞(0)|评价(0)|浏览(80)

本文整理了Java中org.deegree.commons.tom.ows.Version.toString()方法的一些代码示例,展示了Version.toString()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Version.toString()方法的具体详情如下:
包路径:org.deegree.commons.tom.ows.Version
类名称:Version
方法名:toString

Version.toString介绍

暂无

代码示例

代码示例来源:origin: deegree/deegree3

/**
 * Constructs a new <code>GetCapabilities</code> request that specifies the requested version in a pre-OWS fashion
 * (see section D.11 of OGC 06-121r3).
 * 
 * @param version
 *            old-style version information, may be <code>null</code>
 */
public GetCapabilities( Version version ) {
  if ( version != null ) {
    this.version = version.toString();
  }
}

代码示例来源:origin: deegree/deegree3

/**
 * Returns the offered protocol versions.
 * 
 * @return the offered protocol versions
 */
public List<String> getOfferedVersions() {
  List<String> versions = new ArrayList<String>( offeredVersions.size() );
  for ( Version version : offeredVersions ) {
    versions.add( version.toString() );
  }
  return versions;
}

代码示例来源:origin: deegree/deegree3

private static void writeVersionAndUpdateSequence( XMLStreamWriter writer, int updateSequence )
            throws XMLStreamException {
  writer.writeAttribute( "version", VERSION_100.toString() );
  writer.writeAttribute( "updateSequence", Integer.toString( updateSequence ) );
}

代码示例来源:origin: deegree/deegree3

/**
 * @param writer
 * @param versions
 * @param owsNS
 * @throws XMLStreamException
 */
private static void exportVersions( XMLStreamWriter writer, List<Version> versions, String owsNS,
                  String versionElementName )
            throws XMLStreamException {
  if ( versions != null && !versions.isEmpty() ) {
    for ( Version version : versions ) {
      writeElement( writer, owsNS, versionElementName, version.toString() );
    }
  }
}

代码示例来源:origin: deegree/deegree3

/**
 * @param writer
 * @param coverages
 * @param updateSequence
 * @throws XMLStreamException
 */
public static void export( XMLStreamWriter writer, List<WCSCoverage> coverages, int updateSequence )
            throws XMLStreamException {
  writer.setDefaultNamespace( WCS_100_NS );
  writer.writeStartElement( WCS_100_NS, "CoverageDescription" );
  writer.writeAttribute( "version", VERSION_100.toString() );
  writer.writeAttribute( "updateSequence", Integer.toString( updateSequence ) );
  writer.writeDefaultNamespace( WCS_100_NS );
  writer.writeNamespace( GML_PREFIX, GML_NS );
  writer.writeNamespace( XSI_PREFIX, XSINS );
  writer.writeNamespace( XLINK_PREFIX, XLN_NS );
  writer.writeAttribute( XSINS, "schemaLocation", WCS_100_NS + " " + WCS_100_SCHEMA );
  for ( WCSCoverage coverage : coverages ) {
    exportCoverageOffering( writer, coverage );
  }
  writer.writeEndElement(); // CoverageDescription
  writer.writeEndDocument();
}

代码示例来源:origin: deegree/deegree3

private XMLExceptionSerializer getDefaultExceptionSerializer() {
  List<String> offeredVersions = getOfferedVersions();
  if ( offeredVersions.contains( VERSION_200.toString() ) ) {
    return new OWS110ExceptionReportSerializer( VERSION_200 );
  } else if ( offeredVersions.contains( VERSION_110.toString() ) ) {
    return new OWS100ExceptionReportSerializer();
  }
  return new PreOWSExceptionReportSerializer( "application/vnd.ogc.se_xml" );
}

代码示例来源:origin: deegree/deegree3

/**
 * Exports the correct recognized request and determines to which version export it should delegate the request
 */
private void export( XMLStreamWriter xmlWriter, GetRecordById getRecBI, Version version, MetadataStore<?> store )
            throws XMLStreamException, OWSException, MetadataStoreException {
  List<String> supportedVersions = profile.getSupportedVersions();
  if ( supportedVersions.contains( version.toString() ) ) {
    export202( xmlWriter, getRecBI, store );
  } else {
    StringBuilder sb = new StringBuilder();
    sb.append( "Version '" ).append( version );
    sb.append( "' is not supported." );
    sb.append( " Supported versions are " );
    boolean isFirst = true;
    for ( String v : supportedVersions ) {
      if ( isFirst ) {
        isFirst = false;
      } else {
        sb.append( ", " );
      }
      sb.append( v );
    }
    throw new IllegalArgumentException( sb.toString() );
  }
}

代码示例来源:origin: deegree/deegree3

private Map<String, String> buildGetTileKvpMap( GetTile request ) {
  Map<String, String> kvp = new LinkedHashMap<String, String>();
  kvp.put( "service", "WMTS" );
  kvp.put( "request", "GetTile" );
  kvp.put( "version", VERSION_100.toString() );
  kvp.put( "layer", request.getLayer() );
  kvp.put( "style", request.getStyle() );
  kvp.put( "format", request.getFormat() );
  kvp.put( "tilematrixset", request.getTileMatrixSet() );
  kvp.put( "tilematrix", request.getTileMatrix() );
  kvp.put( "tilerow", "" + request.getTileRow() );
  kvp.put( "tilecol", "" + request.getTileCol() );
  return kvp;
}

代码示例来源:origin: deegree/deegree3

throws XMLStreamException, MetadataStoreException {
List<String> supportedVersions = profile.getSupportedVersions();
if ( supportedVersions.contains( version.toString() ) ) {
  export202( writer, typeNames );
} else {

代码示例来源:origin: deegree/deegree3

private Map<String, String> buildGetFeatureInfoKvpMap( GetFeatureInfo request ) {
  Map<String, String> kvp = new LinkedHashMap<String, String>();
  kvp.put( "service", "WMTS" );
  kvp.put( "request", "GetFeatureInfo" );
  kvp.put( "version", VERSION_100.toString() );
  kvp.put( "layer", request.getLayer() );
  kvp.put( "style", request.getStyle() );
  kvp.put( "info_format", request.getInfoFormat() );
  kvp.put( "tilematrixset", request.getTileMatrixSet() );
  kvp.put( "tilematrix", request.getTileMatrix() );
  kvp.put( "tilerow", Long.toString( request.getTileRow() ) );
  kvp.put( "tilecol", Long.toString( request.getTileCol() ) );
  kvp.put( "i", Integer.toString( request.getI() ) );
  kvp.put( "j", Integer.toString( request.getJ() ) );
  return kvp;
}

代码示例来源:origin: deegree/deegree3

private void initOfferedVersions( SupportedVersions supportedVersions ) {
  List<String> versions = null;
  if ( supportedVersions != null ) {
    versions = supportedVersions.getVersion();
  }
  if ( versions == null || versions.isEmpty() ) {
    LOG.info( "No protocol versions specified. Activating all implemented versions." );
    ImplementationMetadata<?> md = ( (OWSProvider) getMetadata().getProvider() ).getImplementationMetadata();
    versions = new ArrayList<String>( md.getImplementedVersions().size() );
    for ( Version version : md.getImplementedVersions() ) {
      versions.add( version.toString() );
    }
  }
  validateAndSetOfferedVersions( versions );
}

代码示例来源:origin: deegree/deegree3

private void initOfferedVersions( SupportedVersions supportedVersions ) {
  List<String> versions = null;
  if ( supportedVersions != null ) {
    versions = supportedVersions.getVersion();
  }
  if ( versions == null || versions.isEmpty() ) {
    LOG.info( "No protocol versions specified. Activating all implemented versions." );
    ImplementationMetadata<?> md = ( (OWSProvider) getMetadata().getProvider() ).getImplementationMetadata();
    versions = new ArrayList<String>( md.getImplementedVersions().size() );
    for ( Version version : md.getImplementedVersions() ) {
      versions.add( version.toString() );
    }
  }
  validateAndSetOfferedVersions( versions );
}

代码示例来源:origin: deegree/deegree3

xmlWriter.writeNamespace( "wfs", WFS_NS );
xmlWriter.writeNamespace( "ogc", OGCNS );
xmlWriter.writeAttribute( "version", VERSION_100.toString() );

代码示例来源:origin: deegree/deegree3

xmlWriter.writeNamespace( "ogc", OGCNS );
xmlWriter.writeAttribute( "version", VERSION_110.toString() );

代码示例来源:origin: deegree/deegree3

"Only WFS-GetGmlObject 1.1.0 serialization is supported by this encoder" );
writer.writeAttribute( "version", version.toString() );

代码示例来源:origin: deegree/deegree3

private void sendResponse200( HttpResponseBuffer response )
            throws XMLStreamException, IOException {
  String ns = WFS_200_NS;
  String schemaLocation = ns + " " + WFS_200_SCHEMA_URL;
  XMLStreamWriter xmlWriter = getXMLResponseWriter( response, "text/xml", schemaLocation );
  xmlWriter.setPrefix( "wfs", WFS_200_NS );
  xmlWriter.writeStartElement( WFS_200_NS, "TransactionResponse" );
  xmlWriter.writeAttribute( "version", VERSION_200.toString() );
  xmlWriter.writeNamespace( "wfs", WFS_200_NS );
  xmlWriter.writeNamespace( "fes", FES_20_NS );
  xmlWriter.writeStartElement( WFS_200_NS, "TransactionSummary" );
  writeElement( xmlWriter, WFS_200_NS, "totalInserted", "" + inserted.getTotal() );
  writeElement( xmlWriter, WFS_200_NS, "totalUpdated", "" + updated.getTotal() );
  writeElement( xmlWriter, WFS_200_NS, "totalReplaced", "" + replaced.getTotal() );
  writeElement( xmlWriter, WFS_200_NS, "totalDeleted", "" + deleted );
  xmlWriter.writeEndElement();
  writeActionResults200( xmlWriter, "InsertResults", inserted );
  writeActionResults200( xmlWriter, "UpdateResults", updated );
  writeActionResults200( xmlWriter, "ReplaceResults", replaced );
  xmlWriter.writeEndElement();
  xmlWriter.flush();
}

代码示例来源:origin: deegree/deegree3

private static Version parseVersion( Map<String, String> kvp )
              throws OWSException {
    String version = KVPUtils.getRequired( kvp, "VERSION" );
    if ( !Version.parseVersion( version ).equals( VERSION_100 ) ) {
      throw new OWSException( "Version must be: " + VERSION_100.toString(), OWSException.INVALID_PARAMETER_VALUE );
    }
    return VERSION_100;
  }
}

代码示例来源:origin: deegree/deegree3

LinkedHashMap<String, String> kvp = new LinkedHashMap<String, String>();
kvp.put( "service", "WFS" );
kvp.put( "version", version.getOGCVersion().toString() );
kvp.put( "request", "GetFeature" );
kvp.put( "typeName", ftName.getLocalPart() );

代码示例来源:origin: deegree/deegree3

private Map<String, String> buildGetFeatureInfoParamMap( GetFeatureInfo gfi, Map<String, String> hardParams ) {
  Map<String, String> params = new HashMap<String, String>();
  params.put( "request", "GetFeatureInfo" );
  params.put( "version", wmsVersion.toString() );
  params.put( "service", "WMS" );
  String csvLayerNames = join( ",", gfi.getQueryLayers() );

代码示例来源:origin: deegree/deegree3

LinkedHashMap<String, String> kvp = new LinkedHashMap<String, String>();
kvp.put( "service", "WFS" );
kvp.put( "version", version.getOGCVersion().toString() );
kvp.put( "request", "DescribeFeatureType" );

相关文章