use of org.codice.ddf.registry.common.metacard.RegistryObjectMetacardType in project ddf by codice.
the class IdentityNodeInitializationTest method setUp.
@Before
public void setUp() throws Exception {
parser = spy(new XmlParser());
identityNodeInitialization = spy(new IdentityNodeInitialization());
registryTransformer = spy(new RegistryTransformer());
metacardMarshaller = spy(new MetacardMarshaller(parser));
registryTransformer.setParser(parser);
registryTransformer.setRegistryMetacardType(new RegistryObjectMetacardType());
identityNodeInitialization.setRegistryTransformer(registryTransformer);
identityNodeInitialization.setMetacardMarshaller(metacardMarshaller);
identityNodeInitialization.setFederationAdminService(federationAdminService);
identityNodeInitialization.setExecutorService(executorService);
System.setProperty(SystemInfo.SITE_NAME, TEST_SITE_NAME);
System.setProperty(SystemInfo.VERSION, TEST_VERSION);
testMetacard = getTestMetacard();
testMetacard.setAttribute(new AttributeImpl(Metacard.METADATA, ""));
}
use of org.codice.ddf.registry.common.metacard.RegistryObjectMetacardType in project ddf by codice.
the class RegistryPublicationActionProviderTest method getRegistryMetacard.
private Metacard getRegistryMetacard(String regId) {
MetacardImpl mcard = new MetacardImpl(new RegistryObjectMetacardType());
mcard.setTags(Collections.singleton(RegistryConstants.REGISTRY_TAG));
if (StringUtils.isNotEmpty(regId)) {
mcard.setAttribute(RegistryObjectMetacardType.REGISTRY_ID, regId);
}
return mcard;
}
use of org.codice.ddf.registry.common.metacard.RegistryObjectMetacardType in project ddf by codice.
the class RegistryPublicationManagerTest method getRegistryMetacard.
private Metacard getRegistryMetacard(String regId) {
MetacardImpl mcard = new MetacardImpl(new RegistryObjectMetacardType());
mcard.setTags(Collections.singleton(RegistryConstants.REGISTRY_TAG));
if (StringUtils.isNotEmpty(regId)) {
mcard.setAttribute(RegistryObjectMetacardType.REGISTRY_ID, regId);
}
return mcard;
}
use of org.codice.ddf.registry.common.metacard.RegistryObjectMetacardType in project ddf by codice.
the class TestRegistryStore method getDefaultMetacard.
private MetacardImpl getDefaultMetacard() {
InputStream inputStream = getClass().getResourceAsStream("/csw-full-registry-package.xml");
BufferedReader buffer = new BufferedReader(new InputStreamReader(inputStream));
String xml = buffer.lines().collect(Collectors.joining("\n"));
MetacardImpl mcard = new MetacardImpl(new RegistryObjectMetacardType());
mcard.setId("testId");
mcard.setTags(Collections.singleton(RegistryConstants.REGISTRY_TAG));
mcard.setAttribute(RegistryObjectMetacardType.REGISTRY_ID, "registryId");
mcard.setContentTypeName(RegistryConstants.REGISTRY_NODE_METACARD_TYPE_NAME);
mcard.setMetadata(xml);
mcard.setTitle("testRegistryMetacard");
return mcard;
}
use of org.codice.ddf.registry.common.metacard.RegistryObjectMetacardType in project ddf by codice.
the class RegistryReportBuilderTest method setup.
@Before
public void setup() {
parser = new XmlParser();
registryTransformer = spy(new RegistryTransformer());
registryTransformer.setParser(parser);
registryTransformer.setRegistryMetacardType(new RegistryObjectMetacardType());
configurator = parser.configureParser(Arrays.asList(RegistryObjectType.class.getPackage().getName(), EbrimConstants.OGC_FACTORY.getClass().getPackage().getName(), EbrimConstants.GML_FACTORY.getClass().getPackage().getName()), this.getClass().getClassLoader());
reportHelper = new RegistryReportBuilder();
reportHelper.setup();
}
Aggregations