use of org.codice.ddf.spatial.ogc.csw.catalog.common.DescribeRecordRequest in project ddf by codice.
the class TestCswEndpoint method createDefaultDescribeRecordRequest.
/**
* Creates default DescribeRecordRequest GET request, with no sections specified
*
* @return Vanilla DescribeRecordRequest object
*/
private DescribeRecordRequest createDefaultDescribeRecordRequest() {
DescribeRecordRequest drr = new DescribeRecordRequest();
drr.setService(CswConstants.CSW);
drr.setVersion(CswConstants.VERSION_2_0_2);
drr.setRequest(CswConstants.DESCRIBE_RECORD);
drr.setNamespace("xmlns(" + VALID_PREFIX + "=" + CswConstants.CSW_OUTPUT_SCHEMA + ")");
return drr;
}
use of org.codice.ddf.spatial.ogc.csw.catalog.common.DescribeRecordRequest in project ddf by codice.
the class TestCswEndpoint method testDescribeRecordSingleTypeSingleNamespaceNoPrefixes.
@Test
public void testDescribeRecordSingleTypeSingleNamespaceNoPrefixes() {
DescribeRecordRequest drr = createDefaultDescribeRecordRequest();
drr.setTypeName(VALID_TYPE);
drr.setNamespace("xmlns(" + CswConstants.CSW_OUTPUT_SCHEMA + ")");
DescribeRecordResponseType drrt = null;
try {
drrt = csw.describeRecord(drr);
} catch (CswException e) {
fail("DescribeRecord failed with message '" + e.getMessage() + "'");
}
assertThat(drrt, notNullValue());
assertThat(drrt.getSchemaComponent(), notNullValue());
List<SchemaComponentType> schemaComponents = drrt.getSchemaComponent();
assertThat(schemaComponents.size(), is(1));
}
Aggregations