Search in sources :

Example 1 with IntegerRange

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

the class NsiliAttributesGenerator method getNsilExploitationInfoAttributes.

public static List<AttributeInformation> getNsilExploitationInfoAttributes() {
    String prefix = NsiliConstants.NSIL_EXPLOITATION_INFO + ".";
    Domain domain;
    List<AttributeInformation> attributes = new ArrayList<>();
    domain = new Domain();
    domain.t(400);
    attributes.add(new AttributeInformation(prefix + NsiliConstants.DESCRIPTION, AttributeType.TEXT, domain, "", "", RequirementMode.OPTIONAL, "A textual description of the performed exploitation.", false, true));
    domain = new Domain();
    domain.ir(new IntegerRange(0, 9));
    attributes.add(new AttributeInformation(prefix + NsiliConstants.LEVEL, AttributeType.INTEGER, domain, "", "", RequirementMode.OPTIONAL, "The degree of exploitation performed on the original data. A value of '0' means that the product is not exploited. The interpretation of other attribute values is currently undefined.", false, true));
    domain = new Domain();
    domain.bv(false);
    attributes.add(new AttributeInformation(prefix + NsiliConstants.AUTO_GENERATED, AttributeType.BOOLEAN_DATA, domain, "", "", RequirementMode.OPTIONAL, "A flag indicating if the exploitation was automatically generated", false, true));
    domain = new Domain();
    domain.l(getSubjectiveQualityCodeOptions());
    attributes.add(new AttributeInformation(prefix + NsiliConstants.SUBJ_QUALITY_CODE, AttributeType.TEXT, domain, "", "", RequirementMode.OPTIONAL, "A code that indicates a subjective rating of the quality of the image or video.", 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 2 with IntegerRange

use of org.codice.alliance.nsili.common.GIAS.IntegerRange 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 3 with IntegerRange

use of org.codice.alliance.nsili.common.GIAS.IntegerRange 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 4 with IntegerRange

use of org.codice.alliance.nsili.common.GIAS.IntegerRange 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 5 with IntegerRange

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

the class NsiliAttributesGenerator method getNsilStreamAttributes.

public static List<AttributeInformation> getNsilStreamAttributes() {
    String prefix = NsiliConstants.NSIL_STREAM + ".";
    Domain domain;
    List<AttributeInformation> attributes = new ArrayList<>();
    domain = new Domain();
    domain.bv(false);
    attributes.add(new AttributeInformation(prefix + NsiliConstants.ARCHIVED, AttributeType.BOOLEAN_DATA, domain, "", "", RequirementMode.OPTIONAL, "Indicates whether the stream has been archived. Set to \"YES\" if the file has been archived, otherwise set to \"NO\".", true, true));
    domain = new Domain();
    domain.t(200);
    attributes.add(new AttributeInformation(prefix + NsiliConstants.ARCHIVE_INFORMATION, AttributeType.TEXT, domain, "", "", RequirementMode.OPTIONAL, "Additional archiving information in free text form allowing the archived data (stream data) to be found and possibly be restored to the server storage. This information could contain the date when the data was archived and point of contact for retrieving the archived data.", true, true));
    domain = new Domain();
    domain.t(200);
    attributes.add(new AttributeInformation(prefix + NsiliConstants.CREATOR, AttributeType.TEXT, domain, "", "", RequirementMode.OPTIONAL, "An entity responsible for providing the stream. Creator is responsible for the intellectual or creative content of the stream.", true, true));
    domain = new Domain();
    domain.d(DATE_RANGE);
    attributes.add(new AttributeInformation(prefix + NsiliConstants.DATE_TIME_DECLARED, AttributeType.UCOS_ABS_TIME, domain, "", "", RequirementMode.MANDATORY, "Date and time on which the stream was declared, filed or stored.", true, true));
    domain = new Domain();
    domain.l(getNsilStreamStandardOptions());
    attributes.add(new AttributeInformation(prefix + NsiliConstants.STANDARD, AttributeType.TEXT, domain, "", "", RequirementMode.OPTIONAL, "The standard that the streamed data complies with.", false, true));
    domain = new Domain();
    domain.t(10);
    attributes.add(new AttributeInformation(prefix + NsiliConstants.STANDARD_VERSION, AttributeType.TEXT, domain, "", "", RequirementMode.OPTIONAL, "Version of product standard E.g. \"1.0\".", true, true));
    domain = new Domain();
    domain.t(0);
    attributes.add(new AttributeInformation(prefix + NsiliConstants.SOURCE_URL, AttributeType.TEXT, domain, "", "", RequirementMode.OPTIONAL, "The address and access protocol in the form of an URL by which a user can directly access the data stream. For RTSP, HTTP, HTTPS and JPIP a standard URL syntax will be used (could include port number). For UDP/RTP, a URL notation using a '@-character-notaton' is used to allow a URL to define a broadcasted stream or a multicasted stream. A UDP broadcast source on port 8105 would be defined as 'udp://@:8105', a RTP broadcast source would be defined as 'rtp://@:8105'; similarly multicasted UDP/RTP source would be defined as 'udp://@multicast_address:port' or 'udp://@multicast_address:port'. This UDP/RTP @-syntax is identical to what is being used by the VideoLAN VLC application. For the broadcast situation it is assumed that the network takes care about forwarding the broadcasts between the LANs (e.g. using NIRIS) so the stream consumer does not need of the LAN-location of the or origial stream source. Note 1: Contrary to the productURL this attribute is queryable. This would allow clients to only discover streams using protocols that the client can consume. Note 2: When a stream is archived and no longer online, the sourceURL attribute shall be removed.", false, true));
    domain = new Domain();
    domain.ir(new IntegerRange(3, 16383));
    attributes.add(new AttributeInformation(prefix + NsiliConstants.PROGRAM_ID, AttributeType.INTEGER, domain, "", "", RequirementMode.OPTIONAL, "The program ID determines the stream ID within the Transport Stream that contains the PMT (Program Mapping Table) of the stream. In cases where the Transport Stream would contain more than one stream, this would allow clients to find quickly the program being advertised.", 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)

Aggregations

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