use of ddf.catalog.data.impl.types.CoreAttributes in project ddf by codice.
the class RegistryTransformerTest method setUp.
@Before
public void setUp() {
registryTransformer = new RegistryTransformer();
parser = new XmlParser();
metacardTypes = new ArrayList<>();
metacardTypes.addAll(Arrays.asList(new RegistryObjectMetacardType(), new TopicAttributes(), new MediaAttributes(), new ContactAttributes(), new CoreAttributes(), new DateTimeAttributes()));
metacardType = new MetacardTypeImpl("registryMetacard", metacardTypes);
registryTransformer.setParser(parser);
registryTransformer.setRegistryMetacardType(metacardType);
System.setProperty(RegistryConstants.REGISTRY_ID_PROPERTY, "identityRegistryId");
}
use of ddf.catalog.data.impl.types.CoreAttributes in project ddf by codice.
the class SaxEventHandlerUtilsTest method setup.
@BeforeClass
public static void setup() {
CoreAttributes coreAttributes = new CoreAttributes();
descriptors.add(coreAttributes.getAttributeDescriptor(CoreAttributes.ID));
descriptors.add(coreAttributes.getAttributeDescriptor(CoreAttributes.LANGUAGE));
}
use of ddf.catalog.data.impl.types.CoreAttributes in project ddf by codice.
the class TestTransactionRequestConverter method setup.
@Before
public void setup() {
cswRecordConverter = mock(Converter.class);
when(cswRecordConverter.canConvert(any())).thenReturn(true);
new CoreAttributes().getAttributeDescriptors().stream().forEach(d -> mockRegistry.register(d));
new ContactAttributes().getAttributeDescriptors().stream().forEach(d -> mockRegistry.register(d));
new LocationAttributes().getAttributeDescriptors().stream().forEach(d -> mockRegistry.register(d));
new MediaAttributes().getAttributeDescriptors().stream().forEach(d -> mockRegistry.register(d));
new TopicAttributes().getAttributeDescriptors().stream().forEach(d -> mockRegistry.register(d));
new AssociationsAttributes().getAttributeDescriptors().stream().forEach(d -> mockRegistry.register(d));
xStream = new XStream(new Xpp3Driver());
xStream.registerConverter(new TransactionRequestConverter(cswRecordConverter, mockRegistry));
xStream.alias(CswConstants.CSW_TRANSACTION, CswTransactionRequest.class);
}
use of ddf.catalog.data.impl.types.CoreAttributes in project ddf by codice.
the class TestTransactionMessageBodyReader method setup.
@Before
public void setup() {
cswRecordConverter = new CswRecordConverter(CswQueryFactoryTest.getCswMetacardType());
new CoreAttributes().getAttributeDescriptors().stream().forEach(d -> registry.register(d));
new ContactAttributes().getAttributeDescriptors().stream().forEach(d -> registry.register(d));
new LocationAttributes().getAttributeDescriptors().stream().forEach(d -> registry.register(d));
new MediaAttributes().getAttributeDescriptors().stream().forEach(d -> registry.register(d));
new TopicAttributes().getAttributeDescriptors().stream().forEach(d -> registry.register(d));
new AssociationsAttributes().getAttributeDescriptors().stream().forEach(d -> registry.register(d));
}
Aggregations