use of org.codice.ddf.spatial.ogc.csw.catalog.common.GetRecordsRequest in project ddf by codice.
the class CswQueryFactoryTest method createDefaultGetRecordsRequest.
/**
* Creates default GetRecordsRequest GET request, with no sections specified
*
* @return Vanilla valid GetRecordsRequest object
*/
private GetRecordsRequest createDefaultGetRecordsRequest() {
GetRecordsRequest grr = new GetRecordsRequest();
grr.setService(CswConstants.CSW);
grr.setVersion(CswConstants.VERSION_2_0_2);
grr.setRequest(CswConstants.GET_RECORDS);
grr.setNamespace(CswConstants.XMLNS_DEFINITION_PREFIX + CswConstants.CSW_NAMESPACE_PREFIX + CswConstants.EQUALS + CswConstants.CSW_OUTPUT_SCHEMA + CswConstants.XMLNS_DEFINITION_POSTFIX + CswConstants.COMMA + CswConstants.XMLNS_DEFINITION_PREFIX + CswConstants.OGC_NAMESPACE_PREFIX + CswConstants.EQUALS + CswConstants.OGC_SCHEMA + CswConstants.XMLNS_DEFINITION_POSTFIX + CswConstants.COMMA + CswConstants.XMLNS_DEFINITION_PREFIX + CswConstants.GML_NAMESPACE_PREFIX + CswConstants.EQUALS + CswConstants.GML_SCHEMA + CswConstants.XMLNS_DEFINITION_POSTFIX + CswConstants.COMMA);
grr.setOutputSchema(CswConstants.CSW_OUTPUT_SCHEMA);
grr.setOutputFormat(CswConstants.OUTPUT_FORMAT_XML);
grr.setTypeNames(VALID_TYPES);
return grr;
}
use of org.codice.ddf.spatial.ogc.csw.catalog.common.GetRecordsRequest in project ddf by codice.
the class TestCswEndpoint method testGetRecordsNullRequest.
@Test(expected = CswException.class)
public void testGetRecordsNullRequest() throws CswException {
GetRecordsRequest grr = null;
csw.getRecords(grr);
}
use of org.codice.ddf.spatial.ogc.csw.catalog.common.GetRecordsRequest in project ddf by codice.
the class TestCswEndpoint method testGetRecordsNoVersion.
@Test
public void testGetRecordsNoVersion() throws CswException {
GetRecordsRequest grr = createDefaultGetRecordsRequest();
grr.setVersion(null);
csw.getRecords(grr);
}
use of org.codice.ddf.spatial.ogc.csw.catalog.common.GetRecordsRequest in project ddf by codice.
the class TestCswEndpoint method testGetRecordsInvalidTypeNames.
@Test(expected = CswException.class)
public void testGetRecordsInvalidTypeNames() throws CswException {
GetRecordsRequest grr = createDefaultGetRecordsRequest();
grr.setTypeNames(BAD_TYPES);
csw.getRecords(grr);
}
use of org.codice.ddf.spatial.ogc.csw.catalog.common.GetRecordsRequest in project ddf by codice.
the class TestCswEndpoint method createDefaultGetRecordsRequest.
/**
* Creates default GetRecordsRequest GET request, with no sections specified
*
* @return Vanilla valid GetRecordsRequest object
*/
private GetRecordsRequest createDefaultGetRecordsRequest() {
GetRecordsRequest grr = new GetRecordsRequest();
grr.setService(CswConstants.CSW);
grr.setVersion(CswConstants.VERSION_2_0_2);
grr.setRequest(CswConstants.GET_RECORDS);
grr.setNamespace(CswConstants.XMLNS_DEFINITION_PREFIX + CswConstants.CSW_NAMESPACE_PREFIX + CswConstants.EQUALS + CswConstants.CSW_OUTPUT_SCHEMA + CswConstants.XMLNS_DEFINITION_POSTFIX + CswConstants.COMMA + CswConstants.XMLNS_DEFINITION_PREFIX + CswConstants.OGC_NAMESPACE_PREFIX + CswConstants.EQUALS + CswConstants.OGC_SCHEMA + CswConstants.XMLNS_DEFINITION_POSTFIX + CswConstants.COMMA + CswConstants.XMLNS_DEFINITION_PREFIX + CswConstants.GML_NAMESPACE_PREFIX + CswConstants.EQUALS + CswConstants.GML_SCHEMA + CswConstants.XMLNS_DEFINITION_POSTFIX + CswConstants.COMMA);
grr.setOutputSchema(CswConstants.CSW_OUTPUT_SCHEMA);
grr.setOutputFormat(CswConstants.OUTPUT_FORMAT_XML);
grr.setTypeNames(VALID_TYPES);
return grr;
}
Aggregations