Search in sources :

Example 1 with DateTimeAttributes

use of ddf.catalog.data.impl.types.DateTimeAttributes in project alliance by codice.

the class DAGConverterTest method setUp.

@Before
public void setUp() throws Exception {
    this.orb = ORB.init();
    int year = 2016;
    int month = 01;
    int dayOfMonth = 29;
    int hourOfDay = 17;
    int minute = 05;
    int second = 10;
    cal = new GregorianCalendar(year, month, dayOfMonth, hourOfDay, minute, second);
    dagConverter = new DAGConverter(mockResourceReader);
    List<MetacardType> types = new ArrayList<>();
    types.add(new AssociationsAttributes());
    types.add(new ContactAttributes());
    types.add(new DateTimeAttributes());
    types.add(new LocationAttributes());
    types.add(new IsrAttributes());
    types.add(new SecurityAttributes());
    MetacardTypeImpl metacardTypeImpl = new MetacardTypeImpl("NsiliMetacardType", types);
    dagConverter.setNsiliMetacardType(metacardTypeImpl);
    setupMocks();
}
Also used : ContactAttributes(ddf.catalog.data.impl.types.ContactAttributes) LocationAttributes(ddf.catalog.data.impl.types.LocationAttributes) GregorianCalendar(java.util.GregorianCalendar) ArrayList(java.util.ArrayList) MetacardTypeImpl(ddf.catalog.data.impl.MetacardTypeImpl) MetacardType(ddf.catalog.data.MetacardType) SecurityAttributes(org.codice.alliance.catalog.core.api.impl.types.SecurityAttributes) ResultDAGConverter(org.codice.alliance.nsili.common.ResultDAGConverter) DateTimeAttributes(ddf.catalog.data.impl.types.DateTimeAttributes) AssociationsAttributes(ddf.catalog.data.impl.types.AssociationsAttributes) IsrAttributes(org.codice.alliance.catalog.core.api.impl.types.IsrAttributes) Before(org.junit.Before)

Example 2 with DateTimeAttributes

use of ddf.catalog.data.impl.types.DateTimeAttributes 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");
}
Also used : XmlParser(org.codice.ddf.parser.xml.XmlParser) ContactAttributes(ddf.catalog.data.impl.types.ContactAttributes) DateTimeAttributes(ddf.catalog.data.impl.types.DateTimeAttributes) CoreAttributes(ddf.catalog.data.impl.types.CoreAttributes) MediaAttributes(ddf.catalog.data.impl.types.MediaAttributes) MetacardTypeImpl(ddf.catalog.data.impl.MetacardTypeImpl) RegistryObjectMetacardType(org.codice.ddf.registry.common.metacard.RegistryObjectMetacardType) TopicAttributes(ddf.catalog.data.impl.types.TopicAttributes) Before(org.junit.Before)

Aggregations

MetacardTypeImpl (ddf.catalog.data.impl.MetacardTypeImpl)2 ContactAttributes (ddf.catalog.data.impl.types.ContactAttributes)2 DateTimeAttributes (ddf.catalog.data.impl.types.DateTimeAttributes)2 Before (org.junit.Before)2 MetacardType (ddf.catalog.data.MetacardType)1 AssociationsAttributes (ddf.catalog.data.impl.types.AssociationsAttributes)1 CoreAttributes (ddf.catalog.data.impl.types.CoreAttributes)1 LocationAttributes (ddf.catalog.data.impl.types.LocationAttributes)1 MediaAttributes (ddf.catalog.data.impl.types.MediaAttributes)1 TopicAttributes (ddf.catalog.data.impl.types.TopicAttributes)1 ArrayList (java.util.ArrayList)1 GregorianCalendar (java.util.GregorianCalendar)1 IsrAttributes (org.codice.alliance.catalog.core.api.impl.types.IsrAttributes)1 SecurityAttributes (org.codice.alliance.catalog.core.api.impl.types.SecurityAttributes)1 ResultDAGConverter (org.codice.alliance.nsili.common.ResultDAGConverter)1 XmlParser (org.codice.ddf.parser.xml.XmlParser)1 RegistryObjectMetacardType (org.codice.ddf.registry.common.metacard.RegistryObjectMetacardType)1