Search in sources :

Example 6 with Domain

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

the class NsiliAttributesGenerator method getNsilEntityAttributes.

public static List<AttributeInformation> getNsilEntityAttributes() {
    String prefix = NsiliConstants.NSIL_ENTITY + ".";
    Domain domain;
    List<AttributeInformation> attributes = new ArrayList<>();
    domain = new Domain();
    domain.l(getEntityTypeOptions());
    attributes.add(new AttributeInformation(prefix + NsiliConstants.TYPE, AttributeType.TEXT, domain, "", "", RequirementMode.MANDATORY, "Information rating of the data source and the information of the data source upon which the report is generated by assessing the Reliability of the Source and Credibility of the Information according to STANAG 2511, 2190 and 2191. The rating is specified by the combination of reliability and credibility values, e.g. B2. If the report is generated upon multiple source, multiple ratings are separated by commas (e.g. B2,C3,C6).", false, true));
    domain = new Domain();
    domain.t(255);
    attributes.add(new AttributeInformation(prefix + NsiliConstants.NAME, AttributeType.TEXT, domain, "", "", RequirementMode.MANDATORY, "The name identifying the entity.", false, true));
    domain = new Domain();
    domain.t(255);
    attributes.add(new AttributeInformation(prefix + NsiliConstants.ALIAS, AttributeType.TEXT, domain, "", "", RequirementMode.OPTIONAL, "The alias of the entity.", false, true));
    return attributes;
}
Also used : AttributeInformation(org.codice.alliance.nsili.common.GIAS.AttributeInformation) ArrayList(java.util.ArrayList) Domain(org.codice.alliance.nsili.common.GIAS.Domain)

Example 7 with Domain

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

the class NsiliAttributesGenerator method getNsilTdlAttributes.

public static List<AttributeInformation> getNsilTdlAttributes() {
    String prefix = NsiliConstants.NSIL_TDL + ".";
    Domain domain;
    List<AttributeInformation> attributes = new ArrayList<>();
    domain = new Domain();
    domain.ir(new IntegerRange(0, 127));
    attributes.add(new AttributeInformation(prefix + NsiliConstants.ACTIVITY, AttributeType.INTEGER, domain, "", "", RequirementMode.OPTIONAL, "A number that together with the 'platform' number defines the identity of a track", false, true));
    domain = new Domain();
    domain.l(getTdlMessageNumberOptions());
    attributes.add(new AttributeInformation(prefix + NsiliConstants.MESSAGE_NUM, AttributeType.TEXT, domain, "", "", RequirementMode.MANDATORY, "The Link 16 J Series message number.", false, true));
    domain = new Domain();
    domain.ir(new IntegerRange(0, 63));
    attributes.add(new AttributeInformation(prefix + NsiliConstants.PLATFORM, AttributeType.INTEGER, domain, "", "", RequirementMode.OPTIONAL, "A number that together with the 'activity' number defines the identity of a track", false, true));
    domain = new Domain();
    domain.t(10);
    attributes.add(new AttributeInformation(prefix + NsiliConstants.TRACK_NUM, AttributeType.TEXT, domain, "", "", RequirementMode.OPTIONAL, "Link 16 J Series track number for the track found in the product. The track number shall be in the decoded 5-character format (e.g. EK627).", false, true));
    return attributes;
}
Also used : AttributeInformation(org.codice.alliance.nsili.common.GIAS.AttributeInformation) IntegerRange(org.codice.alliance.nsili.common.GIAS.IntegerRange) ArrayList(java.util.ArrayList) Domain(org.codice.alliance.nsili.common.GIAS.Domain)

Example 8 with Domain

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

the class AttributeInformationGenerator method generateMandatoryNSIL_ALL_VIEWAttributeList.

// All attributes here are queryable
private static AttributeInformation[] generateMandatoryNSIL_ALL_VIEWAttributeList() {
    List<AttributeInformation> attributeInformationList = new ArrayList<>();
    Domain domain = new Domain();
    domain.t(36);
    attributeInformationList.add(createAttributeInformation(NsiliConstants.IDENTIFIER_UUID, AttributeType.TEXT, domain, "", "", RequirementMode.MANDATORY, "", false, true));
    domain = new Domain();
    domain.l(NsiliConstants.getContentStrings().toArray(new String[NsiliConstants.getContentStrings().size()]));
    attributeInformationList.add(createAttributeInformation(NsiliConstants.TYPE, AttributeType.TEXT, domain, "", "", RequirementMode.MANDATORY, "", false, true));
    domain = new Domain();
    domain.t(159);
    attributeInformationList.add(createAttributeInformation(NsiliConstants.TARGET_NUMBER, AttributeType.TEXT, domain, "", "", RequirementMode.OPTIONAL, "", false, true));
    domain = new Domain();
    domain.t(200);
    attributeInformationList.add(createAttributeInformation(NsiliConstants.SOURCE, AttributeType.TEXT, domain, "", "", RequirementMode.OPTIONAL, "", false, true));
    domain = new Domain();
    domain.t(40);
    attributeInformationList.add(createAttributeInformation(NsiliConstants.IDENTIFIER_MISSION, AttributeType.TEXT, domain, "", "", RequirementMode.OPTIONAL, "", false, true));
    domain = new Domain();
    domain.d(DATE_RANGE);
    attributeInformationList.add(createAttributeInformation(NsiliConstants.DATE_TIME_DECLARED, AttributeType.UCOS_ABS_TIME, domain, "UTC", "", RequirementMode.OPTIONAL, "", true, true));
    attributeInformationList.add(createAttributeInformation(NsiliConstants.DATE_TIME_MODIFIED, AttributeType.UCOS_ABS_TIME, domain, "UTC", "", RequirementMode.OPTIONAL, "", false, true));
    domain = new Domain();
    domain.g(RECTANGLE_DOMAIN);
    attributeInformationList.add(createAttributeInformation(NsiliConstants.SPATIAL_GEOGRAPHIC_REF_BOX, AttributeType.UCOS_RECTANGLE, domain, "", "", RequirementMode.OPTIONAL, "", true, true));
    domain = new Domain();
    domain.fps(FLOATING_POINT_RANGE);
    attributeInformationList.add(createAttributeInformation(NsiliConstants.IDENTIFIER_JOB, AttributeType.FLOATING_POINT, domain, "", "", RequirementMode.MANDATORY, "", false, true));
    domain = new Domain();
    domain.ir(new IntegerRange(0, 2147483647));
    attributeInformationList.add(createAttributeInformation(NsiliConstants.NUMBER_OF_TARGET_REPORTS, AttributeType.INTEGER, domain, "", "", RequirementMode.MANDATORY, "", false, true));
    domain = new Domain();
    domain.l(IMAGERY_DOMAIN);
    attributeInformationList.add(createAttributeInformation(NsiliConstants.CATEGORY, AttributeType.TEXT, domain, "", "", RequirementMode.MANDATORY, "", false, true));
    domain = new Domain();
    domain.l(DECOMPRESSION_TECHNIQUE);
    attributeInformationList.add(createAttributeInformation(NsiliConstants.DECOMPRESSION_TECHNIQUE, AttributeType.TEXT, domain, "", "", RequirementMode.MANDATORY, "", false, true));
    domain = new Domain();
    domain.t(10);
    attributeInformationList.add(createAttributeInformation(NsiliConstants.IDENTIFIER, AttributeType.TEXT, domain, "", "", RequirementMode.MANDATORY, "", false, true));
    domain = new Domain();
    domain.ir(new IntegerRange(0, 99999));
    attributeInformationList.add(createAttributeInformation(NsiliConstants.NUMBER_OF_BANDS, AttributeType.INTEGER, domain, "", "", RequirementMode.MANDATORY, "", false, true));
    domain = new Domain();
    domain.t(200);
    attributeInformationList.add(createAttributeInformation(NsiliConstants.RECIPIENT, AttributeType.TEXT, domain, "", "", RequirementMode.MANDATORY, "", false, true));
    domain = new Domain();
    domain.t(2048);
    attributeInformationList.add(createAttributeInformation(NsiliConstants.MESSAGE_BODY, AttributeType.TEXT, domain, "", "", RequirementMode.MANDATORY, "", false, true));
    domain = new Domain();
    domain.l(MESSAGE_TYPE);
    attributeInformationList.add(createAttributeInformation(NsiliConstants.MESSAGE_TYPE, AttributeType.TEXT, domain, "", "", RequirementMode.MANDATORY, "", false, true));
    domain = new Domain();
    domain.l(CLASSIFICATION_DOMAIN);
    attributeInformationList.add(createAttributeInformation(NsiliConstants.CLASSIFICATION, AttributeType.TEXT, domain, "", "", RequirementMode.MANDATORY, "", true, true));
    domain = new Domain();
    domain.t(20);
    attributeInformationList.add(createAttributeInformation(NsiliConstants.POLICY, AttributeType.TEXT, domain, "", "", RequirementMode.MANDATORY, "", true, true));
    domain = new Domain();
    domain.t(50);
    attributeInformationList.add(createAttributeInformation(NsiliConstants.RELEASABILITY, AttributeType.TEXT, domain, "", "", RequirementMode.MANDATORY, "", true, true));
    domain = new Domain();
    domain.t(0);
    attributeInformationList.add(createAttributeInformation(NsiliConstants.PART_IDENTIFIER, AttributeType.TEXT, domain, "", "", RequirementMode.MANDATORY, "", false, true));
    domain = new Domain();
    domain.t(200);
    attributeInformationList.add(createAttributeInformation(NsiliConstants.CREATOR, AttributeType.TEXT, domain, "", "", RequirementMode.MANDATORY, "", true, true));
    domain = new Domain();
    domain.l(ENCODING_SCHEMES);
    attributeInformationList.add(createAttributeInformation(NsiliConstants.ENCODING_SCHEME, AttributeType.TEXT, domain, "", "", RequirementMode.MANDATORY, "", false, true));
    AttributeInformation[] attributeInformationArray = new AttributeInformation[attributeInformationList.size()];
    for (int i = 0; i < attributeInformationArray.length; i++) {
        attributeInformationArray[i] = attributeInformationList.get(i);
    }
    return attributeInformationArray;
}
Also used : AttributeInformation(org.codice.alliance.nsili.common.GIAS.AttributeInformation) IntegerRange(org.codice.alliance.nsili.common.GIAS.IntegerRange) ArrayList(java.util.ArrayList) Domain(org.codice.alliance.nsili.common.GIAS.Domain)

Example 9 with Domain

use of org.codice.alliance.nsili.common.GIAS.Domain 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)

Example 10 with Domain

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

the class NsiliAttributesGenerator method getNsilGmtiAttributes.

public static List<AttributeInformation> getNsilGmtiAttributes() {
    String prefix = NsiliConstants.NSIL_GMTI + ".";
    Domain domain;
    List<AttributeInformation> attributes = new ArrayList<>();
    domain = new Domain();
    domain.fr(new FloatingPointRange(0.0, 4294967295.0));
    attributes.add(new AttributeInformation(prefix + NsiliConstants.IDENTIFIER_JOB, AttributeType.FLOATING_POINT, domain, "", "", RequirementMode.MANDATORY, "A platform-assigned number identifying the specific requestor task to which the packet pertains. The Job ID shall be unique within a mission.", false, true));
    domain = new Domain();
    domain.ir(POSITIVE_INT_RANGE);
    attributes.add(new AttributeInformation(prefix + NsiliConstants.NUMBER_OF_TARGET_REPORTS, AttributeType.INTEGER, domain, "", "", RequirementMode.MANDATORY, "The total number of target reports within all the dwells in the file.", false, true));
    return attributes;
}
Also used : AttributeInformation(org.codice.alliance.nsili.common.GIAS.AttributeInformation) FloatingPointRange(org.codice.alliance.nsili.common.GIAS.FloatingPointRange) ArrayList(java.util.ArrayList) Domain(org.codice.alliance.nsili.common.GIAS.Domain)

Aggregations

ArrayList (java.util.ArrayList)29 AttributeInformation (org.codice.alliance.nsili.common.GIAS.AttributeInformation)29 Domain (org.codice.alliance.nsili.common.GIAS.Domain)29 IntegerRange (org.codice.alliance.nsili.common.GIAS.IntegerRange)7 HashMap (java.util.HashMap)2 List (java.util.List)2 DateRange (org.codice.alliance.nsili.common.GIAS.DateRange)1 FloatingPointRange (org.codice.alliance.nsili.common.GIAS.FloatingPointRange)1 Matchers.containsString (org.hamcrest.Matchers.containsString)1 Matchers.anyString (org.mockito.Matchers.anyString)1