use of net.opengis.cat.csw.v_2_0_2.DescribeRecordType in project ddf by codice.
the class TestCswEndpoint method testPostDescribeRecordRequestMultipleTypes.
@Test
public void testPostDescribeRecordRequestMultipleTypes() {
DescribeRecordType drt = createDefaultDescribeRecordType();
List<QName> typeNames = new ArrayList<>();
typeNames.add(new QName(CswConstants.CSW_OUTPUT_SCHEMA, VALID_TYPE, VALID_PREFIX));
typeNames.add(new QName(CswConstants.CSW_OUTPUT_SCHEMA, "test", VALID_PREFIX));
drt.setTypeName(typeNames);
DescribeRecordResponseType drrt = null;
try {
drrt = csw.describeRecord(drt);
} catch (CswException e) {
fail("CswException caught during describeRecord GET request: " + e.getMessage());
}
assertThat(drrt, notNullValue());
assertThat(drrt.getSchemaComponent(), notNullValue());
List<SchemaComponentType> schemaComponents = drrt.getSchemaComponent();
assertThat(schemaComponents.size(), is(1));
}
use of net.opengis.cat.csw.v_2_0_2.DescribeRecordType in project ddf by codice.
the class TestCswEndpoint method testPostDescribeRecordRequestSingleTypePassed.
@Test
public void testPostDescribeRecordRequestSingleTypePassed() {
DescribeRecordType drt = createDefaultDescribeRecordType();
List<QName> typeNames = new ArrayList<>();
typeNames.add(new QName(CswConstants.CSW_OUTPUT_SCHEMA, VALID_TYPE, VALID_PREFIX));
drt.setTypeName(typeNames);
DescribeRecordResponseType drrt = null;
try {
drrt = csw.describeRecord(drt);
} catch (CswException e) {
fail("CswException caught during describeRecord POST request: " + e.getMessage());
}
assertThat(drrt, notNullValue());
assertThat(drrt.getSchemaComponent(), notNullValue());
List<SchemaComponentType> schemaComponents = drrt.getSchemaComponent();
assertThat(schemaComponents.size(), is(1));
}
use of net.opengis.cat.csw.v_2_0_2.DescribeRecordType in project ddf by codice.
the class TestCswEndpoint method testPostDescribeRecordRequestGMDTypePassed.
@Test
public void testPostDescribeRecordRequestGMDTypePassed() {
DescribeRecordType drt = createDefaultDescribeRecordType();
List<QName> typeNames = new ArrayList<>();
typeNames.add(new QName(GmdConstants.GMD_NAMESPACE, GmdConstants.GMD_LOCAL_NAME, GmdConstants.GMD_PREFIX));
drt.setTypeName(typeNames);
DescribeRecordResponseType drrt = null;
try {
drrt = csw.describeRecord(drt);
} catch (CswException e) {
fail("CswException caught during describeRecord POST request: " + e.getMessage());
}
assertThat(drrt, notNullValue());
assertThat(drrt.getSchemaComponent(), notNullValue());
List<SchemaComponentType> schemaComponents = drrt.getSchemaComponent();
assertThat(schemaComponents.size(), is(1));
}
use of net.opengis.cat.csw.v_2_0_2.DescribeRecordType in project ddf by codice.
the class TestCswEndpoint method testPostDescribeRecordValidSchemaLanguage.
@Test
public void testPostDescribeRecordValidSchemaLanguage() {
DescribeRecordType drt = createDefaultDescribeRecordType();
List<QName> typeNames = new ArrayList<>();
typeNames.add(new QName(CswConstants.CSW_OUTPUT_SCHEMA, VALID_TYPE, VALID_PREFIX));
drt.setTypeName(typeNames);
drt.setSchemaLanguage(CswConstants.SCHEMA_LANGUAGE_X_SCHEMA);
DescribeRecordResponseType drrt = null;
try {
drrt = csw.describeRecord(drt);
} 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));
}
use of net.opengis.cat.csw.v_2_0_2.DescribeRecordType in project ddf by codice.
the class CswEndpointTest method testPostDescribeRecordRequestMultipleTypes.
@Test
public void testPostDescribeRecordRequestMultipleTypes() {
DescribeRecordType drt = createDefaultDescribeRecordType();
List<QName> typeNames = new ArrayList<>();
typeNames.add(new QName(CswConstants.CSW_OUTPUT_SCHEMA, VALID_TYPE, VALID_PREFIX));
typeNames.add(new QName(CswConstants.CSW_OUTPUT_SCHEMA, "test", VALID_PREFIX));
drt.setTypeName(typeNames);
DescribeRecordResponseType drrt = null;
try {
drrt = csw.describeRecord(drt);
} catch (CswException e) {
fail("CswException caught during describeRecord GET request: " + e.getMessage());
}
assertThat(drrt, notNullValue());
assertThat(drrt.getSchemaComponent(), notNullValue());
List<SchemaComponentType> schemaComponents = drrt.getSchemaComponent();
assertThat(schemaComponents.size(), is(1));
}
Aggregations