|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.crosswire.jsword.book.OSISUtil
public class OSISUtil
Some simple utilities to help working with OSIS classes.
|
Distribution Licence: JSword is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. The License is available on the internet here, or by writing to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA The copyright to this program is held by it's authors. |
Licence| Nested Class Summary | |
|---|---|
static class |
OSISUtil.ObjectFactory
A generic way of creating empty Elements of various types |
| Constructor Summary | |
|---|---|
private |
OSISUtil()
Prevent Instansiation |
| Method Summary | |
|---|---|
static org.jdom.Element |
createOsisFramework(BookMetaData bmd)
Helper method to create the boilerplate headers in an OSIS document from the current metadata object |
static OSISUtil.ObjectFactory |
factory()
An accessor for the ObjectFactory that creates OSIS objects |
static Collection |
getDeepContent(org.jdom.Element div,
String name)
Find all the instances of elements of type find under
the element div. |
static String |
getPlainText(org.jdom.Element ele)
A simplified plain text version of the data in this Element with all the markup stripped out. |
static Verse |
getVerse(org.jdom.Element ele)
Walk up the tree from the W to find out what verse we are in. |
private static void |
recurseChildren(org.jdom.Element ele,
StringBuffer buffer)
Helper to extract the Strings from a nest of JDOM elements |
private static void |
recurseDeepContent(org.jdom.Element start,
String name,
List reply)
Find all the instances of elements of type find under
the element div. |
private static void |
recurseElement(Object sub,
StringBuffer buffer)
If we have a String just add it to the buffer, but if we have an Element then try to dig the strings out of it. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String HI_BOLD
public static final String HI_ITALIC
public static final String HI_UNDERLINE
public static final String SEG_JUSTIFYRIGHT
public static final String SEG_CENTER
public static final String SEG_SMALL
public static final String SEG_SUPERSCRIPT
public static final String SEG_COLORPREFIX
public static final String SEG_SIZEPREFIX
public static final String NOTETYPE_STUDY
public static final String LEMMA_STRONGS
public static final String MORPH_STRONGS
public static final String OSIS_ELEMENT_TITLE
public static final String OSIS_ELEMENT_TABLE
public static final String OSIS_ELEMENT_SPEECH
public static final String OSIS_ELEMENT_SPEAKER
public static final String OSIS_ELEMENT_ROW
public static final String OSIS_ELEMENT_REFERENCE
public static final String OSIS_ELEMENT_NOTE
public static final String OSIS_ELEMENT_NAME
public static final String OSIS_ELEMENT_Q
public static final String OSIS_ELEMENT_LIST
public static final String OSIS_ELEMENT_P
public static final String OSIS_ELEMENT_ITEM
public static final String OSIS_ELEMENT_FOREIGN
public static final String OSIS_ELEMENT_W
public static final String OSIS_ELEMENT_VERSE
public static final String OSIS_ELEMENT_CELL
public static final String OSIS_ELEMENT_DIV
public static final String OSIS_ELEMENT_OSIS
public static final String OSIS_ELEMENT_WORK
public static final String OSIS_ELEMENT_HEADER
public static final String OSIS_ELEMENT_OSISTEXT
public static final String OSIS_ELEMENT_SEG
public static final String OSIS_ELEMENT_LG
public static final String OSIS_ELEMENT_L
public static final String OSIS_ELEMENT_LB
public static final String OSIS_ELEMENT_HI
public static final String ATTRIBUTE_TEXT_OSISIDWORK
public static final String ATTRIBUTE_WORK_OSISWORK
public static final String ATTRIBUTE_VERSE_OSISID
public static final String ATTRIBUTE_DIV_OSISID
public static final String ATTRIBUTE_W_LEMMA
public static final String ATTRIBUTE_HI_REND
public static final String ATTRIBUTE_SEG_TYPE
public static final String ATTRIBUTE_REFERENCE_OSISREF
public static final String ATTRIBUTE_NOTE_TYPE
public static final String ATTRIBUTE_SPEAKER_WHO
public static final String ATTRIBUTE_WORD_MORPH
public static final String ATTRIBUTE_OSISTEXT_OSISIDWORK
public static final String ATTRIBUTE_DIV_LANG
private static final String OSISID_PREFIX_BIBLE
private static final Logger log
private static OSISUtil.ObjectFactory factory
| Constructor Detail |
|---|
private OSISUtil()
| Method Detail |
|---|
public static OSISUtil.ObjectFactory factory()
public static String getPlainText(org.jdom.Element ele)
public static Collection getDeepContent(org.jdom.Element div,
String name)
find under
the element div.
public static Verse getVerse(org.jdom.Element ele)
throws BookException
ele - The start point for our verse hunt.
BookExceptionpublic static org.jdom.Element createOsisFramework(BookMetaData bmd)
private static void recurseDeepContent(org.jdom.Element start,
String name,
List reply)
find under
the element div. For internal use only.
private static void recurseElement(Object sub,
StringBuffer buffer)
private static void recurseChildren(org.jdom.Element ele,
StringBuffer buffer)
ele - The JDOM Element to dig intobuffer - The place we accumulate strings.
|
Copyright ? 2003-2004 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||