test_class.declarator: EPUBMETADATA_KEY = "EPUBMetadata"
test_class.modifier: private static final
test_class.original_string: private static final String EPUBMETADATA_KEY = "EPUBMetadata";
test_class.type: String
test_class.var_name: EPUBMETADATA_KEY
test_class.declarator: CHILDRENSLIT_SRC_FILEPATH = "src/test/resources/epub/epub3-valid-childrens-literature.epub"
test_class.modifier: private static final
test_class.original_string: private static final String CHILDRENSLIT_SRC_FILEPATH = "src/test/resources/epub/epub3-valid-childrens-literature.epub";
test_class.type: String
test_class.var_name: CHILDRENSLIT_SRC_FILEPATH
test_class.declarator: MINIMAL_EPUB_FILEPATH = "src/test/resources/epub/epub2-minimal.epub"
test_class.modifier: private static final
test_class.original_string: private static final String MINIMAL_EPUB_FILEPATH = "src/test/resources/epub/epub2-minimal.epub";
test_class.type: String
test_class.var_name: MINIMAL_EPUB_FILEPATH
test_class.declarator: WRONG_EXT_NOT_AN_EPUB_FILEPATH = "src/test/resources/epub/not-an-epub.docx"
test_class.modifier: private static final
test_class.original_string: private static final String WRONG_EXT_NOT_AN_EPUB_FILEPATH = "src/test/resources/epub/not-an-epub.docx";
test_class.type: String
test_class.var_name: WRONG_EXT_NOT_AN_EPUB_FILEPATH
test_class.declarator: RIGHT_EXT_NOT_AN_EPUB_FILEPATH = "src/test/resources/epub/not-an-epub.epub"
test_class.modifier: private static final
test_class.original_string: private static final String RIGHT_EXT_NOT_AN_EPUB_FILEPATH = "src/test/resources/epub/not-an-epub.epub";
test_class.type: String
test_class.var_name: RIGHT_EXT_NOT_AN_EPUB_FILEPATH
test_class.declarator: ZIPPED_EPUB_FILEPATH = "src/test/resources/epub/epub3-zipped-childrens-literature.epub"
test_class.modifier: private static final
test_class.original_string: private static final String ZIPPED_EPUB_FILEPATH = "src/test/resources/epub/epub3-zipped-childrens-literature.epub";
test_class.type: String
test_class.var_name: ZIPPED_EPUB_FILEPATH
test_class.declarator: EPUB2_WITH_WARNING_FILEPATH = "src/test/resources/epub/epub2-with-warning-minimal.epub"
test_class.modifier: private static final
test_class.original_string: private static final String EPUB2_WITH_WARNING_FILEPATH = "src/test/resources/epub/epub2-with-warning-minimal.epub";
test_class.type: String
test_class.var_name: EPUB2_WITH_WARNING_FILEPATH
test_class.declarator: EPUB3_WITH_MULTIMEDIA_FILEPATH = "src/test/resources/epub/epub3-valid-multimedia.epub"
test_class.modifier: private static final
test_class.original_string: private static final String EPUB3_WITH_MULTIMEDIA_FILEPATH = "src/test/resources/epub/epub3-valid-multimedia.epub";
test_class.type: String
test_class.var_name: EPUB3_WITH_MULTIMEDIA_FILEPATH
test_class.declarator: EMPTY_EPUB_FILEPATH = "src/test/resources/epub/empty.epub"
test_class.modifier: private static final
test_class.original_string: private static final String EMPTY_EPUB_FILEPATH = "src/test/resources/epub/empty.epub";
test_class.type: String
test_class.var_name: EMPTY_EPUB_FILEPATH
test_class.declarator: EPUB_WRONG_EXT_FILEPATH = "src/test/resources/epub/epub3-wrong-ext-childrens-literature.wrong"
test_class.modifier: private static final
test_class.original_string: private static final String EPUB_WRONG_EXT_FILEPATH = "src/test/resources/epub/epub3-wrong-ext-childrens-literature.wrong";
test_class.type: String
test_class.var_name: EPUB_WRONG_EXT_FILEPATH
test_class.declarator: EPUB_MISSING_FONT_FILEPATH = "src/test/resources/epub/epub2-missing-fontresource.epub"
test_class.modifier: private static final
test_class.original_string: private static final String EPUB_MISSING_FONT_FILEPATH = "src/test/resources/epub/epub2-missing-fontresource.epub";
test_class.type: String
test_class.var_name: EPUB_MISSING_FONT_FILEPATH
test_class.declarator: EPUB_OBFUSCATED_FONT_FILEPATH = "src/test/resources/epub/epub3-font-obfuscated-wasteland.epub"
test_class.modifier: private static final
test_class.original_string: private static final String EPUB_OBFUSCATED_FONT_FILEPATH = "src/test/resources/epub/epub3-font-obfuscated-wasteland.epub";
test_class.type: String
test_class.var_name: EPUB_OBFUSCATED_FONT_FILEPATH
test_class.declarator: EPUB2_WITH_ERROR_FILEPATH = "src/test/resources/epub/epub2-with-error-minimal.epub"
test_class.modifier: private static final
test_class.original_string: private static final String EPUB2_WITH_ERROR_FILEPATH = "src/test/resources/epub/epub2-with-error-minimal.epub";
test_class.type: String
test_class.var_name: EPUB2_WITH_ERROR_FILEPATH
test_class.declarator: EPUB2_MISSING_OPF_FILEPATH = "src/test/resources/epub/epub2-no-opf-minimal.epub"
test_class.modifier: private static final
test_class.original_string: private static final String EPUB2_MISSING_OPF_FILEPATH = "src/test/resources/epub/epub2-no-opf-minimal.epub";
test_class.type: String
test_class.var_name: EPUB2_MISSING_OPF_FILEPATH
test_class.declarator: EPUB3_FIXED_LAYOUT_FILEPATH = "src/test/resources/epub/epub3-valid-fixedlayout-page-blanche.epub"
test_class.modifier: private static final
test_class.original_string: private static final String EPUB3_FIXED_LAYOUT_FILEPATH = "src/test/resources/epub/epub3-valid-fixedlayout-page-blanche.epub";
test_class.type: String
test_class.var_name: EPUB3_FIXED_LAYOUT_FILEPATH
test_class.declarator: EPUB2_ENCRYPTION = "src/test/resources/epub/epub2-valid-minimal-encryption.epub"
test_class.modifier: private static final
test_class.original_string: private static final String EPUB2_ENCRYPTION = "src/test/resources/epub/epub2-valid-minimal-encryption.epub";
test_class.type: String
test_class.var_name: EPUB2_ENCRYPTION
test_class.declarator: EPUB3_TITLE_ENCODING = "src/test/resources/epub/epub3-multiple-renditions.epub"
test_class.modifier: private static final
test_class.original_string: private static final String EPUB3_TITLE_ENCODING = "src/test/resources/epub/epub3-multiple-renditions.epub";
test_class.type: String
test_class.var_name: EPUB3_TITLE_ENCODING
test_class.declarator: EXPECTED_MEDIATYPE = "application/epub+zip"
test_class.modifier: private static final
test_class.original_string: private static final String EXPECTED_MEDIATYPE = "application/epub+zip";
test_class.type: String
test_class.var_name: EXPECTED_MEDIATYPE
test_class.declarator: EXPECTED_VERSION_3_2 = "3.2"
test_class.modifier: private static final
test_class.original_string: private static final String EXPECTED_VERSION_3_2 = "3.2";
test_class.type: String
test_class.var_name: EXPECTED_VERSION_3_2
test_class.declarator: PNG_MIMETYPE = "image/png"
test_class.modifier: private static final
test_class.original_string: private static final String PNG_MIMETYPE = "image/png";
test_class.type: String
test_class.var_name: PNG_MIMETYPE
test_class.declarator: XHTML_MIMETYPE = "application/xhtml+xml"
test_class.modifier: private static final
test_class.original_string: private static final String XHTML_MIMETYPE = "application/xhtml+xml";
test_class.type: String
test_class.var_name: XHTML_MIMETYPE
test_class.declarator: NCX_MIMETYPE = "application/x-dtbncx+xml"
test_class.modifier: private static final
test_class.original_string: private static final String NCX_MIMETYPE = "application/x-dtbncx+xml";
test_class.type: String
test_class.var_name: NCX_MIMETYPE
test_class.declarator: JPG_MIMETYPE = "image/jpeg"
test_class.modifier: private static final
test_class.original_string: private static final String JPG_MIMETYPE = "image/jpeg";
test_class.type: String
test_class.var_name: JPG_MIMETYPE
test_class.declarator: CSS_MIMETYPE = "text/css"
test_class.modifier: private static final
test_class.original_string: private static final String CSS_MIMETYPE = "text/css";
test_class.type: String
test_class.var_name: CSS_MIMETYPE
test_class.declarator: OCTET_MIMETYPE = "application/octet-stream"
test_class.modifier: private static final
test_class.original_string: private static final String OCTET_MIMETYPE = "application/octet-stream";
test_class.type: String
test_class.var_name: OCTET_MIMETYPE
test_class.declarator: EN_LANGUAGE = "en"
test_class.modifier: private static final
test_class.original_string: private static final String EN_LANGUAGE = "en";
test_class.type: String
test_class.var_name: EN_LANGUAGE
test_class.file: jhove-ext-modules/src/test/java/org/ithaka/portico/jhove/module/EpubModuleTest.java
test_class.identifier: EpubModuleTest
test_case.body: @Test
      public void parseValidEpub2ChecksumTest() throws Exception {
          File epubFile = new File(MINIMAL_EPUB_FILEPATH);
  
          EpubModule em = new EpubModule();
          JhoveBase je = new JhoveBase();
          je.setChecksumFlag(true);
          em.setBase(je);
          RepInfo info = new RepInfo(epubFile.getAbsolutePath());
          em.parse(new FileInputStream(epubFile), info, 0);
  
          Map<ChecksumType, String> checksums = new HashMap<ChecksumType, String>();
          info.getChecksum().forEach(cs -> checksums.put(cs.getType(), cs.getValue()));
          assertEquals("8b80b526", checksums.get(ChecksumType.CRC32));
          assertEquals("b2110219d62c3c6ef1683c645636fd38", checksums.get(ChecksumType.MD5));
          assertEquals("79f20f6a499a640019a9bb0334652edbb954c3c9", checksums.get(ChecksumType.SHA1));
          assertEquals("4776bb33b1cce8598b31996ed0b4daf36e4b74e379b811a27e51efa15315744a", checksums.get(ChecksumType.SHA256));
          final int expectedNumChecksum = 4;
          assertEquals(expectedNumChecksum, info.getChecksum().size());
      }
test_case.class_method_signature: EpubModuleTest.parseValidEpub2ChecksumTest()
test_case.full_signature: @Test public void parseValidEpub2ChecksumTest()
test_case.identifier: parseValidEpub2ChecksumTest
test_case.invocations: setChecksumFlag setBase getAbsolutePath parse forEach getChecksum put getType getValue assertEquals get assertEquals get assertEquals get assertEquals get assertEquals size getChecksum
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void parseValidEpub2ChecksumTest()
focal_class.declarator: EPUB_MEDIATYPE = "application/epub+zip"
focal_class.modifier: private static final
focal_class.original_string: private static final String EPUB_MEDIATYPE = "application/epub+zip";
focal_class.type: String
focal_class.var_name: EPUB_MEDIATYPE
focal_class.declarator: FORMATNAME = "EPUB"
focal_class.modifier: private static final
focal_class.original_string: private static final String FORMATNAME = "EPUB";
focal_class.type: String
focal_class.var_name: FORMATNAME
focal_class.declarator: NAME = "EPUB-ptc"
focal_class.modifier: private static final
focal_class.original_string: private static final String NAME = "EPUB-ptc";
focal_class.type: String
focal_class.var_name: NAME
focal_class.declarator: RELEASE = "1.0"
focal_class.modifier: private static final
focal_class.original_string: private static final String RELEASE = "1.0";
focal_class.type: String
focal_class.var_name: RELEASE
focal_class.declarator: DATE = {2019, 5, 15}
focal_class.modifier: private static final
focal_class.original_string: private static final int[] DATE = {2019, 5, 15};
focal_class.type: int[]
focal_class.var_name: DATE
focal_class.declarator: RIGHTS_YEAR = "2019"
focal_class.modifier: private static final
focal_class.original_string: private static final String RIGHTS_YEAR = "2019";
focal_class.type: String
focal_class.var_name: RIGHTS_YEAR
focal_class.declarator: FORMAT = { FORMATNAME }
focal_class.modifier: private static final
focal_class.original_string: private static final String[] FORMAT = { FORMATNAME };
focal_class.type: String[]
focal_class.var_name: FORMAT
focal_class.declarator: COVERAGE = FORMATNAME
focal_class.modifier: private static final
focal_class.original_string: private static final String COVERAGE = FORMATNAME;
focal_class.type: String
focal_class.var_name: COVERAGE
focal_class.declarator: MIMETYPE = { EPUB_MEDIATYPE }
focal_class.modifier: private static final
focal_class.original_string: private static final String[] MIMETYPE = { EPUB_MEDIATYPE };
focal_class.type: String[]
focal_class.var_name: MIMETYPE
focal_class.declarator: WELLFORMED = ""
focal_class.modifier: private static final
focal_class.original_string: private static final String WELLFORMED = "";
focal_class.type: String
focal_class.var_name: WELLFORMED
focal_class.declarator: VALIDITY = ""
focal_class.modifier: private static final
focal_class.original_string: private static final String VALIDITY = "";
focal_class.type: String
focal_class.var_name: VALIDITY
focal_class.declarator: REPINFO = ""
focal_class.modifier: private static final
focal_class.original_string: private static final String REPINFO = "";
focal_class.type: String
focal_class.var_name: REPINFO
focal_class.declarator: NOTE = "This module uses EPUBCheck for testing of EPUB files."
focal_class.modifier: private static final
focal_class.original_string: private static final String NOTE = "This module uses EPUBCheck for testing of EPUB files.";
focal_class.type: String
focal_class.var_name: NOTE
focal_class.declarator: EPUB_AGENTNAME = "International Digital Publishing Forum"
focal_class.modifier: private static final
focal_class.original_string: private static final String EPUB_AGENTNAME = "International Digital Publishing Forum";
focal_class.type: String
focal_class.var_name: EPUB_AGENTNAME
focal_class.declarator: EPUB_AGENTTYPE = AgentType.STANDARD
focal_class.modifier: private static final
focal_class.original_string: private static final AgentType EPUB_AGENTTYPE = AgentType.STANDARD;
focal_class.type: AgentType
focal_class.var_name: EPUB_AGENTTYPE
focal_class.declarator: EPUB_AGENTADDRESS = "International Digital Publishing Forum (IDPF), "
              + "113 Cherry Street, Suite 70-719, Seattle, WA 98104"
focal_class.modifier: private static final
focal_class.original_string: private static final String EPUB_AGENTADDRESS = "International Digital Publishing Forum (IDPF), "
              + "113 Cherry Street, Suite 70-719, Seattle, WA 98104";
focal_class.type: String
focal_class.var_name: EPUB_AGENTADDRESS
focal_class.declarator: EPUB_AGENTWEBSITE = "http://idpf.org"
focal_class.modifier: private static final
focal_class.original_string: private static final String EPUB_AGENTWEBSITE = "http://idpf.org";
focal_class.type: String
focal_class.var_name: EPUB_AGENTWEBSITE
focal_class.declarator: EPUB_AGENTEMAIL = "membership@idpf.org"
focal_class.modifier: private static final
focal_class.original_string: private static final String EPUB_AGENTEMAIL = "membership@idpf.org";
focal_class.type: String
focal_class.var_name: EPUB_AGENTEMAIL
focal_class.declarator: EPUB_AGENTPHONE = "+1-206-451-7250"
focal_class.modifier: private static final
focal_class.original_string: private static final String EPUB_AGENTPHONE = "+1-206-451-7250";
focal_class.type: String
focal_class.var_name: EPUB_AGENTPHONE
focal_class.declarator: EPUB_FORMATDOCTITLE = FORMATNAME
focal_class.modifier: private static final
focal_class.original_string: private static final String EPUB_FORMATDOCTITLE = FORMATNAME;
focal_class.type: String
focal_class.var_name: EPUB_FORMATDOCTITLE
focal_class.declarator: EPUB_FORMATDOCDATE = "2019-05-15"
focal_class.modifier: private static final
focal_class.original_string: private static final String EPUB_FORMATDOCDATE = "2019-05-15";
focal_class.type: String
focal_class.var_name: EPUB_FORMATDOCDATE
focal_class.declarator: EPUB_FORMATDOCURL = "http://www.idpf.org/epub/dir/"
focal_class.modifier: private static final
focal_class.original_string: private static final String EPUB_FORMATDOCURL = "http://www.idpf.org/epub/dir/";
focal_class.type: String
focal_class.var_name: EPUB_FORMATDOCURL
focal_class.declarator: EPUB_EXTENSION = ".epub"
focal_class.modifier: private static final
focal_class.original_string: private static final String EPUB_EXTENSION = ".epub";
focal_class.type: String
focal_class.var_name: EPUB_EXTENSION
focal_class.declarator: FIRST_SIG_POSITION = 0
focal_class.modifier: private static final
focal_class.original_string: private static final int FIRST_SIG_POSITION = 0;
focal_class.type: int
focal_class.var_name: FIRST_SIG_POSITION
focal_class.declarator: FIRST_SIG_VALUE = "PK"
focal_class.modifier: private static final
focal_class.original_string: private static final String FIRST_SIG_VALUE = "PK";
focal_class.type: String
focal_class.var_name: FIRST_SIG_VALUE
focal_class.declarator: SECOND_SIG_POSITION = 30
focal_class.modifier: private static final
focal_class.original_string: private static final int SECOND_SIG_POSITION = 30;
focal_class.type: int
focal_class.var_name: SECOND_SIG_POSITION
focal_class.declarator: SECOND_SIG_VALUE = "mimetype"
focal_class.modifier: private static final
focal_class.original_string: private static final String SECOND_SIG_VALUE = "mimetype";
focal_class.type: String
focal_class.var_name: SECOND_SIG_VALUE
focal_class.declarator: THIRD_SIG_POSITION = 38
focal_class.modifier: private static final
focal_class.original_string: private static final int THIRD_SIG_POSITION = 38;
focal_class.type: int
focal_class.var_name: THIRD_SIG_POSITION
focal_class.declarator: THIRD_SIG_VALUE = EPUB_MEDIATYPE
focal_class.modifier: private static final
focal_class.original_string: private static final String THIRD_SIG_VALUE = EPUB_MEDIATYPE;
focal_class.type: String
focal_class.var_name: THIRD_SIG_VALUE
focal_class.declarator: NOTWELLFORMED_ERRCODES = new String[] { "PKG-" }
focal_class.modifier: public static final
focal_class.original_string: public static final String[] NOTWELLFORMED_ERRCODES = new String[] { "PKG-" };
focal_class.type: String[]
focal_class.var_name: NOTWELLFORMED_ERRCODES
focal_class.declarator: _propList
focal_class.modifier: protected
focal_class.original_string: protected List<Property> _propList;
focal_class.type: List<Property>
focal_class.var_name: _propList
focal_class.declarator: _metadata
focal_class.modifier: protected
focal_class.original_string: protected Property _metadata;
focal_class.type: Property
focal_class.var_name: _metadata
focal_class.file: jhove-ext-modules/src/main/java/org/ithaka/portico/jhove/module/EpubModule.java
focal_class.identifier: EpubModule
focal_class.class_method_signature: EpubModule.EpubModule()
focal_class.full_signature: public  EpubModule()
focal_class.identifier: EpubModule
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  EpubModule()
focal_class.class_method_signature: EpubModule.EpubModule(String name, String release, int[] date,
              String[] format, String coverage,
              String[] mimetype, String wellformedNote,
              String validityNote, String repinfoNote, String note,
              String rights, boolean isRandomAccess, Agent moduleAgent)
focal_class.full_signature: public  EpubModule(String name, String release, int[] date,
              String[] format, String coverage,
              String[] mimetype, String wellformedNote,
              String validityNote, String repinfoNote, String note,
              String rights, boolean isRandomAccess, Agent moduleAgent)
focal_class.identifier: EpubModule
focal_class.modifiers: public
focal_class.parameters: (String name, String release, int[] date,
              String[] format, String coverage,
              String[] mimetype, String wellformedNote,
              String validityNote, String repinfoNote, String note,
              String rights, boolean isRandomAccess, Agent moduleAgent)
focal_class.signature:  EpubModule(String name, String release, int[] date,
              String[] format, String coverage,
              String[] mimetype, String wellformedNote,
              String validityNote, String repinfoNote, String note,
              String rights, boolean isRandomAccess, Agent moduleAgent)
focal_class.class_method_signature: EpubModule.initializeInstance(Agent moduleAgent)
focal_class.full_signature: protected void initializeInstance(Agent moduleAgent)
focal_class.identifier: initializeInstance
focal_class.modifiers: protected
focal_class.parameters: (Agent moduleAgent)
focal_class.return: void
focal_class.signature: void initializeInstance(Agent moduleAgent)
focal_class.class_method_signature: EpubModule.setupDataStream(final InputStream stream, final RepInfo info)
focal_class.full_signature: @Override protected void setupDataStream(final InputStream stream, final RepInfo info)
focal_class.identifier: setupDataStream
focal_class.modifiers: @Override protected
focal_class.parameters: (final InputStream stream, final RepInfo info)
focal_class.return: void
focal_class.signature: void setupDataStream(final InputStream stream, final RepInfo info)
focal_class.class_method_signature: EpubModule.checkSignatures(File file, InputStream stream, RepInfo info)
focal_class.full_signature: @Override public void checkSignatures(File file, InputStream stream, RepInfo info)
focal_class.identifier: checkSignatures
focal_class.modifiers: @Override public
focal_class.parameters: (File file, InputStream stream, RepInfo info)
focal_class.return: void
focal_class.signature: void checkSignatures(File file, InputStream stream, RepInfo info)
focal_class.class_method_signature: EpubModule.parse(InputStream stream, RepInfo info, int parseIndex)
focal_class.full_signature: @Override public int parse(InputStream stream, RepInfo info, int parseIndex)
focal_class.identifier: parse
focal_class.modifiers: @Override public
focal_class.parameters: (InputStream stream, RepInfo info, int parseIndex)
focal_class.return: int
focal_class.signature: int parse(InputStream stream, RepInfo info, int parseIndex)
focal_class.class_method_signature: EpubModule.parse(RandomAccessFile file, RepInfo info)
focal_class.full_signature: @Override public void parse(RandomAccessFile file, RepInfo info)
focal_class.identifier: parse
focal_class.modifiers: @Override public
focal_class.parameters: (RandomAccessFile file, RepInfo info)
focal_class.return: void
focal_class.signature: void parse(RandomAccessFile file, RepInfo info)
focal_class.class_method_signature: EpubModule.generateProperties(JhoveRepInfoReport report)
focal_class.full_signature: private List<Property> generateProperties(JhoveRepInfoReport report)
focal_class.identifier: generateProperties
focal_class.modifiers: private
focal_class.parameters: (JhoveRepInfoReport report)
focal_class.return: List<Property>
focal_class.signature: List<Property> generateProperties(JhoveRepInfoReport report)
focal_class.class_method_signature: EpubModule.addProperty(Set<Property> props, Property prop)
focal_class.full_signature: private static void addProperty(Set<Property> props, Property prop)
focal_class.identifier: addProperty
focal_class.modifiers: private static
focal_class.parameters: (Set<Property> props, Property prop)
focal_class.return: void
focal_class.signature: void addProperty(Set<Property> props, Property prop)
focal_class.class_method_signature: EpubModule.triggerNotWellFormed(CheckMessage msg)
focal_class.full_signature: private boolean triggerNotWellFormed(CheckMessage msg)
focal_class.identifier: triggerNotWellFormed
focal_class.modifiers: private
focal_class.parameters: (CheckMessage msg)
focal_class.return: boolean
focal_class.signature: boolean triggerNotWellFormed(CheckMessage msg)
focal_class.class_method_signature: EpubModule.generateFontProps(Set<String> fonts, boolean fontFile)
focal_class.full_signature: private Set<Property> generateFontProps(Set<String> fonts, boolean fontFile)
focal_class.identifier: generateFontProps
focal_class.modifiers: private
focal_class.parameters: (Set<String> fonts, boolean fontFile)
focal_class.return: Set<Property>
focal_class.signature: Set<Property> generateFontProps(Set<String> fonts, boolean fontFile)
focal_class.class_method_signature: EpubModule.generateProperty(String name, String value)
focal_class.full_signature: private Property generateProperty(String name, String value)
focal_class.identifier: generateProperty
focal_class.modifiers: private
focal_class.parameters: (String name, String value)
focal_class.return: Property
focal_class.signature: Property generateProperty(String name, String value)
focal_class.class_method_signature: EpubModule.generateProperty(String name, Long value, boolean hideIfZero)
focal_class.full_signature: private Property generateProperty(String name, Long value, boolean hideIfZero)
focal_class.identifier: generateProperty
focal_class.modifiers: private
focal_class.parameters: (String name, Long value, boolean hideIfZero)
focal_class.return: Property
focal_class.signature: Property generateProperty(String name, Long value, boolean hideIfZero)
focal_class.class_method_signature: EpubModule.generateProperty(String name, boolean value)
focal_class.full_signature: private Property generateProperty(String name, boolean value)
focal_class.identifier: generateProperty
focal_class.modifiers: private
focal_class.parameters: (String name, boolean value)
focal_class.return: Property
focal_class.signature: Property generateProperty(String name, boolean value)
focal_class.class_method_signature: EpubModule.generateProperty(String name, String[] value)
focal_class.full_signature: private Property generateProperty(String name, String[] value)
focal_class.identifier: generateProperty
focal_class.modifiers: private
focal_class.parameters: (String name, String[] value)
focal_class.return: Property
focal_class.signature: Property generateProperty(String name, String[] value)
focal_class.class_method_signature: EpubModule.generateProperty(String name, Set<Property> value)
focal_class.full_signature: private Property generateProperty(String name, Set<Property> value)
focal_class.identifier: generateProperty
focal_class.modifiers: private
focal_class.parameters: (String name, Set<Property> value)
focal_class.return: Property
focal_class.signature: Property generateProperty(String name, Set<Property> value)
focal_class.class_method_signature: EpubModule.toJhoveMessages(CheckMessage msg)
focal_class.full_signature: private Set<Message> toJhoveMessages(CheckMessage msg)
focal_class.identifier: toJhoveMessages
focal_class.modifiers: private
focal_class.parameters: (CheckMessage msg)
focal_class.return: Set<Message>
focal_class.signature: Set<Message> toJhoveMessages(CheckMessage msg)
focal_class.class_method_signature: EpubModule.addJhoveMessage(Set<Message> msgs, Message msg)
focal_class.full_signature: private static void addJhoveMessage(Set<Message> msgs, Message msg)
focal_class.identifier: addJhoveMessage
focal_class.modifiers: private static
focal_class.parameters: (Set<Message> msgs, Message msg)
focal_class.return: void
focal_class.signature: void addJhoveMessage(Set<Message> msgs, Message msg)
focal_class.class_method_signature: EpubModule.toJhoveMessage(String msgId, String messageText, Severity severity, EPUBLocation location)
focal_class.full_signature: private Message toJhoveMessage(String msgId, String messageText, Severity severity, EPUBLocation location)
focal_class.identifier: toJhoveMessage
focal_class.modifiers: private
focal_class.parameters: (String msgId, String messageText, Severity severity, EPUBLocation location)
focal_class.return: Message
focal_class.signature: Message toJhoveMessage(String msgId, String messageText, Severity severity, EPUBLocation location)
focal_class.class_method_signature: EpubModule.toUtf8(String inputString)
focal_class.full_signature: public static String toUtf8(String inputString)
focal_class.identifier: toUtf8
focal_class.modifiers: public static
focal_class.parameters: (String inputString)
focal_class.return: String
focal_class.signature: String toUtf8(String inputString)
focal_class.class_method_signature: EpubModule.initParse()
focal_class.full_signature: @Override protected void initParse()
focal_class.identifier: initParse
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void initParse()
focal_class.superclass: extends ModuleBase
focal_method.body: @Override
      public int parse(InputStream stream, RepInfo info, int parseIndex) throws IOException {
  
          initParse();
  
          info.setModule(this);
          info.setFormat(_format[0]);
          info.setWellFormed(false);
          info.setValid(false);
  
          _propList = new LinkedList<>();
          _metadata = new Property(PROPNAME_EPUB_METADATA, PropertyType.PROPERTY, PropertyArity.LIST, _propList);
  
          // loads stream to _dstream so it can be checksummed when flag enabled
          _ckSummer = null;
          setupDataStream(stream, info);
  
          //Call tool and calculate stats
          try {
              JhoveRepInfoReport report = new JhoveRepInfoReport(info.getUri());
              EpubCheck epubCheck = new EpubCheck(_dstream, report, info.getUri());
              epubCheck.doValidate();
  
              info.setCreated(report.getCreationDate());
              info.setLastModified(report.getLastModifiedDate());
              info.setVersion(report.getVersion());
  
              List<CheckMessage> epubMessages = report.getAllMessages();
  
              // check if any of the messages are on the customized not-well-formed
              // list of errors
              int notWellFormedErrors = epubMessages.stream().filter(c -> triggerNotWellFormed(c))
                      .collect(Collectors.toSet()).size();
  
              info.setWellFormed(report.getFatalErrorCount() == 0 && notWellFormedErrors == 0);
              info.setValid(info.getWellFormed() == RepInfo.TRUE && report.getErrorCount() == 0);
  
              Set<Message> msgs = new TreeSet<Message>(new MessageComparator());
              for (CheckMessage msg : report.getAllMessages()) {
                  msgs.addAll(toJhoveMessages(msg));
              }
              msgs.forEach(jhoveMsg -> info.setMessage(jhoveMsg));
  
              info.setMimeType(report.getFormat());
  
              generateProperties(report).forEach(prop -> _propList.add(prop));
  
          } catch (Exception f) {
              f.printStackTrace();
              if (f.getMessage() != null) {
                  info.setMessage(new ErrorMessage(f.getMessage()));
              } else {
                  info.setMessage(new ErrorMessage(MessageConstants.ERR_UNKNOWN));
              }
              info.setWellFormed(false); // may not be the file's fault
              return 0;
          }
  
          // Check if user has aborted
          if (_je != null && _je.getAbort()) {
              return 0;
          }
  
          // We parsed it.  Now assemble the properties.
          info.setProperty(_metadata);
  
          setChecksums(_ckSummer, info);
  
          return 0;
      }
focal_method.class_method_signature: EpubModule.parse(InputStream stream, RepInfo info, int parseIndex)
focal_method.full_signature: @Override public int parse(InputStream stream, RepInfo info, int parseIndex)
focal_method.identifier: parse
focal_method.invocations: initParse setModule setFormat setWellFormed setValid setupDataStream getUri getUri doValidate setCreated getCreationDate setLastModified getLastModifiedDate setVersion getVersion getAllMessages size collect filter stream triggerNotWellFormed toSet setWellFormed getFatalErrorCount setValid getWellFormed getErrorCount getAllMessages addAll toJhoveMessages forEach setMessage setMimeType getFormat forEach generateProperties add printStackTrace getMessage setMessage getMessage setMessage setWellFormed getAbort setProperty setChecksums
focal_method.modifiers: @Override public
focal_method.parameters: (InputStream stream, RepInfo info, int parseIndex)
focal_method.return: int
focal_method.signature: int parse(InputStream stream, RepInfo info, int parseIndex)