package library

Compatibility entrypoint.

New code should import package:bible_io_references/bible_io_references.dart.

Classes

BibleBookIdentifiers
The OSIS and USFM identifiers assigned to a BibleBookEnum.
BookPassage
A passage covering an entire Bible book.
ChapterPassage
A passage covering one chapter or an inclusive range of chapters.
ParseFailure<T>
A failed ParseResult.
ParseResult<T>
The result of a non-throwing parse operation.
ParseSuccess<T>
A successful ParseResult.
Passage
A complete Bible passage expression.
PassageMatch
A successfully parsed passage and its exact location in a source string.
PassageParser
A reusable parser for book, chapter, verse-list, and passage sequences.
PassageSequence
A source-ordered sequence of passage expressions.
Reference
Base class for all Bible reference types.
ReferenceBookCandidate
A single possible interpretation of a parsed book token.
ReferenceBookTokenMatch
Match information for one explicit book token in the source text.
ReferenceExtractor
Finds parseable Bible passages embedded in arbitrary prose.
ReferenceFormatter
Formats parsed references with localized book names.
ReferenceInputNormalization
The normalized input and its UTF-16 mapping back to originalText.
ReferenceInputNormalizer
Dependency-free Unicode normalization for Bible-reference input.
ReferenceInputSpan
A half-open UTF-16 source span.
ReferenceParseMetadata
Metadata captured while a reference is parsed successfully.
ReferenceParser
A configurable, reusable Bible-reference parser.
VerseLabel
The verse label of one text entry in a Bible translation.
VersePassage
One or more discrete verse references belonging to one passage expression.
VerseRangeRef
A reference to a range of Bible verses.
VerseRef
A reference to a single Bible verse.

Enums

BibleBookEnum
Enumeration of all Bible books with standardized abbreviations and full names.
BibleLanguageEnum
Supported languages for localized parsing.
ReferenceAmbiguityPolicy
Controls how a ReferenceParser resolves aliases that match several books.
ReferenceBookNameStyle
Controls how book names are rendered by ReferenceFormatter.
ReferenceParseErrorCode
A typed classification for reference parsing failures.

Extensions

BibleBookReferenceIdentifiers on BibleBookEnum
Adds standard machine-readable identifiers to BibleBookEnum.
BibleLanguageParsingSupport on BibleLanguageEnum
Parsing-support information for a language identifier.
LocalizedPassageFormatting on Passage
Convenient localized formatting for whole passage expressions.
LocalizedReferenceFormatting on Reference
Convenient localized formatting for parsed references.
PassageMachineIdentifiers on Passage
Adds canonical OSIS and USFM serialization to passage expressions.
ReferenceMachineIdentifiers on Reference
Adds canonical OSIS and USFM serialization to verse references.

Constants

bibleBookIdentifiers → const Map<BibleBookEnum, BibleBookIdentifiers>
Complete OSIS and USFM mappings for the books supported by this package.
bookAbbreviationsByLanguage → const Map<String, Map<BibleBookEnum, List<String>>>
Book abbreviations by language code.
bookNamesByLanguage → const Map<String, Map<BibleBookEnum, List<String>>>
Book names by language code.
maxReferenceChapterNumber → const int
Broad sanity limits used by reference construction and parsing.
maxReferenceVerseNumber → const int

Properties

autoLanguageCollisions → Map<String, Set<BibleBookEnum>>
Auto language collisions.
final
autoLanguagePrecedence → List<String>
Auto language precedence.
final
supportedParsingLanguages → Set<BibleLanguageEnum>
Languages accepted by the reference parser.
final

Functions

bibleBookFromOsisIdentifier(String identifier) → BibleBookEnum
Resolves an exact, case-sensitive OSIS book identifier.
bibleBookFromUsfmIdentifier(String identifier) → BibleBookEnum
Resolves an exact, case-sensitive USFM book identifier.
parseReference(String ref, {BibleLanguageEnum? language}) → Reference
Parse a Bible reference string into either a VerseRef or VerseRangeRef.
referenceFromOsisIdentifier(String identifier) → Reference
Parses a verse or full-endpoint range OSIS identifier.
referenceFromUsfmIdentifier(String identifier) → Reference
Parses a USFM verse or range identifier.
verseRangeRefFromStr(String ref, {BibleLanguageEnum? language}) → VerseRangeRef
Parse a string into a VerseRangeRef.
verseRefFromStr(String ref, {BibleLanguageEnum? language}) → VerseRef
Parse a string into a VerseRef.

Typedefs

PassageReplacement = String Function(PassageMatch match)
Creates replacement text for a passage found in an original source string.
PassageUriBuilder = Uri Function(PassageMatch match)
Creates a destination URI for a passage found in source text.

Exceptions / Errors

ParseBibleBookError
Error raised when parsing an unknown or unsupported Bible book abbreviation.
ParseVerseRefError
Raised when a verse reference string cannot be parsed.