···11+(** References extension for JSON Feed items.
22+33+ This implements the references extension that allows items to cite sources.
44+ Each reference represents a cited resource with optional DOI and CiTO annotations.
55+66+ @see <https://github.com/egonw/JSONFeed-extensions/blob/main/references.md> References Extension Specification
77+ @see <https://purl.archive.org/spar/cito> Citation Typing Ontology *)
88+99+1010+(** The type representing a reference to a cited source. *)
1111+type t
1212+1313+1414+(** {1 Construction} *)
1515+1616+(** [create ~url ?doi ?cito ()] creates a reference.
1717+1818+ @param url Unique URL for the reference (required).
1919+ A URL based on a persistent unique identifier (like DOI) is recommended.
2020+ @param doi Digital Object Identifier for the reference
2121+ @param cito Citation Typing Ontology intent annotations
2222+2323+ {b Examples:}
2424+ {[
2525+ (* Simple reference with just a URL *)
2626+ let ref1 = Reference.create
2727+ ~url:"https://doi.org/10.5281/zenodo.16755947"
2828+ ()
2929+3030+ (* Reference with DOI *)
3131+ let ref2 = Reference.create
3232+ ~url:"https://doi.org/10.5281/zenodo.16755947"
3333+ ~doi:"10.5281/zenodo.16755947"
3434+ ()
3535+3636+ (* Reference with CiTO annotations *)
3737+ let ref3 = Reference.create
3838+ ~url:"https://doi.org/10.5281/zenodo.16755947"
3939+ ~doi:"10.5281/zenodo.16755947"
4040+ ~cito:[`CitesAsRecommendedReading; `UsesMethodIn]
4141+ ()
4242+4343+ (* Reference with custom CiTO term *)
4444+ let ref4 = Reference.create
4545+ ~url:"https://example.com/paper"
4646+ ~cito:[`Other "customIntent"]
4747+ ()
4848+ ]} *)
4949+val create :
5050+ url:string ->
5151+ ?doi:string ->
5252+ ?cito:Cito.t list ->
5353+ unit ->
5454+ t
5555+5656+5757+(** {1 Accessors} *)
5858+5959+(** [url t] returns the reference's URL. *)
6060+val url : t -> string
6161+6262+(** [doi t] returns the reference's DOI, if set. *)
6363+val doi : t -> string option
6464+6565+(** [cito t] returns the reference's CiTO annotations, if set. *)
6666+val cito : t -> Cito.t list option
6767+6868+6969+(** {1 Comparison} *)
7070+7171+(** [equal a b] tests equality between two references.
7272+7373+ References are considered equal if they have the same URL. *)
7474+val equal : t -> t -> bool
7575+7676+7777+(** {1 Pretty Printing} *)
7878+7979+(** [pp ppf t] pretty prints a reference to the formatter.
8080+8181+ {b Example output:}
8282+ {v https://doi.org/10.5281/zenodo.16755947 [DOI: 10.5281/zenodo.16755947] v} *)
8383+val pp : Format.formatter -> t -> unit