Search in sources :

Example 1 with DateRange

use of org.codice.alliance.nsili.common.GIAS.DateRange in project alliance by codice.

the class NsiliFilterDelegateTest method generateAttributeInformation.

private static Map<String, List<AttributeInformation>> generateAttributeInformation() {
    List<AttributeInformation> attributeInformationList = new ArrayList<>();
    Domain domain = new Domain();
    domain.t(36);
    attributeInformationList.add(createAttributeInformation(NsiliConstants.NSIL_COMMON + "." + NsiliConstants.IDENTIFIER_UUID, AttributeType.TEXT, domain, NsiliFilterDelegate.EMPTY_STRING, NsiliFilterDelegate.EMPTY_STRING, RequirementMode.MANDATORY, NsiliFilterDelegate.EMPTY_STRING, false, true));
    domain = new Domain();
    DateRange dateRange = new DateRange();
    domain.d(dateRange);
    attributeInformationList.add(createAttributeInformation(NsiliConstants.NSIL_CARD + "." + NsiliConstants.DATE_TIME_MODIFIED, AttributeType.TEXT, domain, NsiliFilterDelegate.EMPTY_STRING, NsiliFilterDelegate.EMPTY_STRING, RequirementMode.MANDATORY, NsiliFilterDelegate.EMPTY_STRING, false, true));
    domain = new Domain();
    domain.g(RECTANGLE_DOMAIN);
    attributeInformationList.add(createAttributeInformation(NsiliConstants.NSIL_COVERAGE + "." + NsiliConstants.SPATIAL_GEOGRAPHIC_REF_BOX, AttributeType.UCOS_RECTANGLE, domain, NsiliFilterDelegate.EMPTY_STRING, NsiliFilterDelegate.EMPTY_STRING, RequirementMode.OPTIONAL, NsiliFilterDelegate.EMPTY_STRING, true, true));
    domain = new Domain();
    domain.ir(new IntegerRange(0, 100));
    attributeInformationList.add(createAttributeInformation(NsiliConstants.NSIL_IMAGERY + "." + NsiliConstants.NUMBER_OF_BANDS, AttributeType.INTEGER, domain, NsiliFilterDelegate.EMPTY_STRING, NsiliFilterDelegate.EMPTY_STRING, RequirementMode.MANDATORY, NsiliFilterDelegate.EMPTY_STRING, true, true));
    HashMap<String, List<AttributeInformation>> map = new HashMap<>();
    map.put(NsiliConstants.NSIL_ALL_VIEW, attributeInformationList);
    return map;
}
Also used : AttributeInformation(org.codice.alliance.nsili.common.GIAS.AttributeInformation) DateRange(org.codice.alliance.nsili.common.GIAS.DateRange) IntegerRange(org.codice.alliance.nsili.common.GIAS.IntegerRange) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) ArrayList(java.util.ArrayList) List(java.util.List) Matchers.containsString(org.hamcrest.Matchers.containsString) Domain(org.codice.alliance.nsili.common.GIAS.Domain)

Aggregations

ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 List (java.util.List)1 AttributeInformation (org.codice.alliance.nsili.common.GIAS.AttributeInformation)1 DateRange (org.codice.alliance.nsili.common.GIAS.DateRange)1 Domain (org.codice.alliance.nsili.common.GIAS.Domain)1 IntegerRange (org.codice.alliance.nsili.common.GIAS.IntegerRange)1 Matchers.containsString (org.hamcrest.Matchers.containsString)1