Search in sources :

Example 1 with Aggregate

use of org.apache.sis.storage.Aggregate in project sis by apache.

the class StoreTest method verifyContent.

/**
 * Verifies that the given metadata contains one of the given identifiers.
 * The identifiers that are found are removed from the given set.
 */
private static void verifyContent(final Aggregate store, final Set<String> identifiers) throws DataStoreException {
    for (final Resource resource : store.components()) {
        assertNotNull("resource", resource);
        for (Identification info : resource.getMetadata().getIdentificationInfo()) {
            final String id = Citations.getIdentifier(info.getCitation());
            assertTrue(id, identifiers.remove(id));
            if (resource instanceof Aggregate) {
                verifyContent((Aggregate) resource, identifiers);
            }
        }
    }
}
Also used : Resource(org.apache.sis.storage.Resource) Identification(org.opengis.metadata.identification.Identification) Aggregate(org.apache.sis.storage.Aggregate)

Aggregations

Aggregate (org.apache.sis.storage.Aggregate)1 Resource (org.apache.sis.storage.Resource)1 Identification (org.opengis.metadata.identification.Identification)1