|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.crosswire.jsword.passage.OsisParser
public final class OsisParser
The Osis ID parser simply assumes 1-3 parts divided by '.'. Any deviation from the dot-delimited formatted yields nulls. OSIS Refs should be separated by a '-' if there are 2 refs signifying a range e.g. Gen.1-Gen.3. The current implementation doesn't support an OSIS ID or OSIS ref with a missing chapter, as are currently returned by the getOsisRef() calls occasionally. Algorithm: If ony 1 ID passed in then create ending id from it to enable a single flow through algorithm. Missing chapter or verse of starting id will be set to 0/1. Missing chapter or verse of ending id will be set to last chapter/verse.
Field Summary | |
---|---|
private static String |
START_CHAPTER_OR_VERSE
|
Constructor Summary | |
---|---|
OsisParser()
|
Method Summary | |
---|---|
private static boolean |
isAnEmptyPart(List<String> parts)
Check no part of the Osis ref is empty |
private Verse |
parseOsisID(Versification v11n,
List<String> osisIDParts)
|
Verse |
parseOsisID(Versification v11n,
String osisID)
Strict OSIS ID parsers, case-sensitive |
VerseRange |
parseOsisRef(Versification v11n,
String osisRef)
String OSIS Ref parser, assumes a - separating two osis IDs |
private List<String> |
splitOsisId(String osisID1)
Split string like 'Gen.1.1' into a 3 element list |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final String START_CHAPTER_OR_VERSE
Constructor Detail |
---|
public OsisParser()
Method Detail |
---|
public VerseRange parseOsisRef(Versification v11n, String osisRef)
v11n
- the v11nosisRef
- the ref
public Verse parseOsisID(Versification v11n, String osisID)
v11n
- the versification to use when constructing the verseosisID
- the ID we want to parse
private Verse parseOsisID(Versification v11n, List<String> osisIDParts)
private List<String> splitOsisId(String osisID1)
private static boolean isAnEmptyPart(List<String> parts)
|
Copyright ยจ 2003-2015 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |