Search in sources :

Example 1 with RGBColourImpl

use of org.codice.imaging.nitf.core.impl.RGBColourImpl in project alliance by codice.

the class TreUtilityTest method createFileHeader.

public static NitfHeader createFileHeader(DateTime fileDateTime) {
    TreCollection treCollection = new TreCollectionImpl();
    FileSecurityMetadata securityMetadata = createSecurityMetadata();
    NitfHeader nitfHeader = mock(NitfHeader.class);
    when(nitfHeader.getFileTitle()).thenReturn("TEST NITF");
    when(nitfHeader.getFileType()).thenReturn(FileType.NITF_TWO_ONE);
    when(nitfHeader.getComplexityLevel()).thenReturn(1);
    when(nitfHeader.getFileDateTime()).thenReturn(fileDateTime);
    when(nitfHeader.getOriginatingStationId()).thenReturn("LOCALHOST");
    when(nitfHeader.getStandardType()).thenReturn("BF01");
    when(nitfHeader.getFileBackgroundColour()).thenReturn(new RGBColourImpl((byte) 0, (byte) 0, (byte) 0));
    when(nitfHeader.getOriginatorsName()).thenReturn("");
    when(nitfHeader.getOriginatorsPhoneNumber()).thenReturn("");
    when(nitfHeader.getFileSecurityMetadata()).thenReturn(securityMetadata);
    when(nitfHeader.getTREsRawStructure()).thenReturn(treCollection);
    return nitfHeader;
}
Also used : RGBColourImpl(org.codice.imaging.nitf.core.impl.RGBColourImpl) NitfHeader(org.codice.imaging.nitf.core.header.NitfHeader) TreCollectionImpl(org.codice.imaging.nitf.core.tre.impl.TreCollectionImpl) FileSecurityMetadata(org.codice.imaging.nitf.core.security.FileSecurityMetadata) TreCollection(org.codice.imaging.nitf.core.tre.TreCollection)

Example 2 with RGBColourImpl

use of org.codice.imaging.nitf.core.impl.RGBColourImpl in project alliance by codice.

the class CatalogOutputAdapterTest method getNitfHeader.

private NitfHeader getNitfHeader(FileSecurityMetadata fileSecurityMetadata, DateTime dateTime) {
    NitfHeader nitfHeader = mock(NitfHeader.class);
    when(nitfHeader.getFileTitle()).thenReturn("FileTitle");
    when(nitfHeader.getStandardType()).thenReturn("BF01");
    when(nitfHeader.getOriginatingStationId()).thenReturn("U21SOO90");
    when(nitfHeader.getFileBackgroundColour()).thenReturn(new RGBColourImpl((byte) 0, (byte) 0, (byte) 0));
    when(nitfHeader.getFileDateTime()).thenReturn(dateTime);
    when(nitfHeader.getFileSecurityMetadata()).thenReturn(fileSecurityMetadata);
    when(nitfHeader.getOriginatorsName()).thenReturn("W.TEMPEL");
    when(nitfHeader.getOriginatorsPhoneNumber()).thenReturn("44 1480 84 5611");
    when(nitfHeader.getTREsRawStructure()).thenReturn(new TreCollectionImpl());
    return nitfHeader;
}
Also used : RGBColourImpl(org.codice.imaging.nitf.core.impl.RGBColourImpl) NitfHeader(org.codice.imaging.nitf.core.header.NitfHeader) TreCollectionImpl(org.codice.imaging.nitf.core.tre.impl.TreCollectionImpl)

Aggregations

NitfHeader (org.codice.imaging.nitf.core.header.NitfHeader)2 RGBColourImpl (org.codice.imaging.nitf.core.impl.RGBColourImpl)2 TreCollectionImpl (org.codice.imaging.nitf.core.tre.impl.TreCollectionImpl)2 FileSecurityMetadata (org.codice.imaging.nitf.core.security.FileSecurityMetadata)1 TreCollection (org.codice.imaging.nitf.core.tre.TreCollection)1