Added Android code
[wl-app.git] / Android / folioreader / src / main / java / com / folioreader / model / HighLight.java
1 package com.folioreader.model;
2
3 import java.util.Date;
4
5 /**
6  * Interface to access Highlight data.
7  *
8  * @author gautam chibde on 9/10/17.
9  */
10
11 public interface HighLight {
12
13     /**
14      * Highlight action
15      */
16     enum HighLightAction {
17         NEW, DELETE, MODIFY
18     }
19
20     /**
21      * <p> Returns Book id, which can be provided to intent to folio reader, if not provided id is
22      * used from epub's dc:identifier field in metadata.
23      * <p>for reference, look here:
24      * <a href="http://www.idpf.org/epub/30/spec/epub30-publications.html#sec-package-metadata-identifiers">IDPF</a>.</p>
25      * in case identifier is not found in the epub,
26      * <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html#hashCode()">hash code</a>
27      * of book title is used also if book title is not found then
28      * hash code of the book file name is used.
29      * </p>
30      */
31     String getBookId();
32
33     /**
34      * Returns Highlighted text content text content.
35      */
36     String getContent();
37
38     /**
39      * Returns Date time when highlight is created (format:- MMM dd, yyyy | HH:mm).
40      */
41     Date getDate();
42
43     /**
44      * Returns Field defines the color of the highlight.
45      */
46     String getType();
47
48     /**
49      * Returns Page index in the book taken from Epub spine reference.
50      */
51     int getPageNumber();
52
53     /**
54      * Returns href of the page from the Epub spine list.
55      */
56     String getPageId();
57
58     /**
59      * <p> Contains highlight meta data in terms of rangy format.</p>
60      * <strong>format </strong>:- start$end$id$class$containerId.
61      * <p>for reference, look here: <a href="https://github.com/timdown/rangy">rangy</a>.</p>
62      */
63     String getRangy();
64
65     /**
66      * returns Unique identifier.
67      */
68     String getUUID();
69
70     /**
71      * Returns Note linked to the highlight (optional)
72      */
73     String getNote();
74 }