當前位置: 首頁>>代碼示例>>Java>>正文


Java ProcessPropertyType類代碼示例

本文整理匯總了Java中net.opengis.om.x10.ProcessPropertyType的典型用法代碼示例。如果您正苦於以下問題:Java ProcessPropertyType類的具體用法?Java ProcessPropertyType怎麽用?Java ProcessPropertyType使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ProcessPropertyType類屬於net.opengis.om.x10包,在下文中一共展示了ProcessPropertyType類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: testGetObservationIoosSweEncoding

import net.opengis.om.x10.ProcessPropertyType; //導入依賴的package包/類
@Test
public void testGetObservationIoosSweEncoding() throws OwsExceptionReport, XmlException {
    XmlObject getObsResponse = sendGetObservation1RequestViaPox(NETWORK_OFFERING, IoosSosConstants.OM_PROFILE_M10,
            ImmutableList.of(STATION_ASSET.getAssetId()), ImmutableList.of(OBS_PROP),null).asXmlObject();
    assertNotNull(getObsResponse);
    assertThat(getObsResponse, is(instanceOf(ObservationCollectionDocument.class)));
    ObservationCollectionDocument obsCollectionDoc = (ObservationCollectionDocument) getObsResponse;
    ObservationCollectionType obsCollection = obsCollectionDoc.getObservationCollection();

    //TODO verify
    BoundingShapeType boundedBy = obsCollection.getBoundedBy();

    //TODO verify
    LocationPropertyType location = obsCollection.getLocation();

    assertThat(obsCollection.getMemberArray().length, is(1));
    ObservationPropertyType observationProperty = obsCollection.getMemberArray()[0];
    ObservationType observation = observationProperty.getObservation();
    assertThat(observation, notNullValue());

    //TODO verify
    FeaturePropertyType featureOfInterest = observation.getFeatureOfInterest();
    AbstractFeatureType feature = featureOfInterest.getFeature();

    //TODO verify
    ProcessPropertyType procedure = observation.getProcedure();
    AbstractProcessType process = procedure.getProcess();

    XmlObject result = observation.getResult();
    assertThat(result, notNullValue());

    //TODO verify
    DataRecordDocument swe2DataRecordDocument = castXmlAnyToClass(result, DataRecordDocument.class);
    DataRecordType swe2DataRecord = swe2DataRecordDocument.getDataRecord();

    //observationRecord definition
    assertThat(swe2DataRecord.getDefinition(), is(IoosSweConstants.OBSERVATION_RECORD_DEF));

    Field[] fields = swe2DataRecord.getFieldArray();
    Field stationsField = fields[0];
    assertThat(stationsField.getName(), is(IoosSweConstants.STATIONS));

    AbstractDataComponentType stationsAbstractDataComponent = stationsField.getAbstractDataComponent();
    assertThat(stationsAbstractDataComponent, is(instanceOf(DataRecordType.class)));
    DataRecordType stationsDataRecord = (DataRecordType) stationsAbstractDataComponent;
    assertThat(stationsDataRecord.getDefinition(), is(IoosSweConstants.STATIONS_DEF));
}
 
開發者ID:ioos,項目名稱:i52n-sos,代碼行數:48,代碼來源:IoosGetObservationIntegrationTest.java


注:本文中的net.opengis.om.x10.ProcessPropertyType類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。