|
|
|
@ -27,40 +27,37 @@ public class TestDataCatalogueMetadataFormatReader {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Test.
|
|
|
|
|
* @throws Exception
|
|
|
|
|
*/
|
|
|
|
|
@Test
|
|
|
|
|
public void test() {
|
|
|
|
|
try {
|
|
|
|
|
public void test() throws Exception {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// String scopeString = "/gcube/devsec/devVRE";
|
|
|
|
|
// String grMetadataProfileSecondaryType = "DataCatalogueMetadata";
|
|
|
|
|
|
|
|
|
|
String scopeString = "/gcube/devsec/devVRE";
|
|
|
|
|
String grMetadataProfileSecondaryType = "GeoNaMetadata";
|
|
|
|
|
|
|
|
|
|
ScopeProvider.instance.set(scopeString);
|
|
|
|
|
MetadataProfileReader reader = new MetadataProfileReader(grMetadataProfileSecondaryType);
|
|
|
|
|
int i = 0;
|
|
|
|
|
|
|
|
|
|
String scopeString = "/gcube/devsec/devVRE";
|
|
|
|
|
String grMetadataProfileSecondaryType = "GeoNaMetadata";
|
|
|
|
|
|
|
|
|
|
ScopeProvider.instance.set(scopeString);
|
|
|
|
|
MetadataProfileReader reader = new MetadataProfileReader(grMetadataProfileSecondaryType);
|
|
|
|
|
int i = 0;
|
|
|
|
|
|
|
|
|
|
List<NamespaceCategory> categs = reader.getListOfNamespaceCategories();
|
|
|
|
|
for (NamespaceCategory namespaceCategory : categs) {
|
|
|
|
|
logger.trace("\n\n "+ ++i +".) Category: "+namespaceCategory);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
i = 0;
|
|
|
|
|
for (MetadataProfile mt : reader.getListOfMetadataProfiles()) {
|
|
|
|
|
List<NamespaceCategory> categs = reader.getListOfNamespaceCategories();
|
|
|
|
|
for (NamespaceCategory namespaceCategory : categs) {
|
|
|
|
|
logger.trace("\n\n "+ ++i +".) Category: "+namespaceCategory);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(mt==null)
|
|
|
|
|
continue;
|
|
|
|
|
i = 0;
|
|
|
|
|
for (MetadataProfile mt : reader.getListOfMetadataProfiles()) {
|
|
|
|
|
|
|
|
|
|
MetadataFormat metadataFormat = reader.getMetadataFormatForMetadataProfile(mt);
|
|
|
|
|
logger.trace("\n\n "+ ++i +".) Metadata source: "+metadataFormat.getMetadataSource().substring(0, 100));
|
|
|
|
|
}
|
|
|
|
|
if(mt==null)
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
// TODO Auto-generated catch block
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
MetadataFormat metadataFormat = reader.getMetadataFormatForMetadataProfile(mt);
|
|
|
|
|
logger.trace("\n\n "+ ++i +".) Metadata source: "+metadataFormat.getMetadataSource().substring(0, 100));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|