44 lines
1.2 KiB
Java
44 lines
1.2 KiB
Java
/**
|
|
*
|
|
*/
|
|
package org.gcube.common.metadataprofilediscovery;
|
|
|
|
import org.gcube.common.metadataprofilediscovery.bean.MetadataProfile;
|
|
import org.gcube.common.metadataprofilediscovery.reader.MetadataFormatDiscovery;
|
|
import org.gcube.common.scope.api.ScopeProvider;
|
|
import org.gcube.common.scope.impl.ScopeBean;
|
|
|
|
|
|
/**
|
|
* The Class TestMetadataFormatDiscovery.
|
|
*
|
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
|
* Jun 8, 2016
|
|
*/
|
|
public class TestMetadataFormatDiscovery {
|
|
|
|
/**
|
|
* Test.
|
|
*/
|
|
//@Test
|
|
public void test() {
|
|
|
|
String scopeString = "/gcube/devsec/devVRE";
|
|
String grMetadataProfileSecondaryType = "DataCatalogueMetadata";
|
|
final ScopeBean scope = new ScopeBean(scopeString);
|
|
MetadataFormatDiscovery reader;
|
|
try {
|
|
ScopeProvider.instance.set(scopeString);
|
|
reader = new MetadataFormatDiscovery(scope, grMetadataProfileSecondaryType);
|
|
//System.out.println(reader.getMetadataProfiles());
|
|
|
|
for (MetadataProfile metaProfile : reader.getMetadataProfiles()) {
|
|
System.out.println(metaProfile.getId() +", name: "+metaProfile.getName() +", type: "+metaProfile.getMetadataType());
|
|
}
|
|
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|