typiconman / ponomar

Ponomar: a liturgics suite for the Orthodox Church
http://www.ponomar.net/
GNU General Public License v3.0
37 stars 12 forks source link

Lectionary should accept half verses #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Some readings begin or end in the middle of a verse.

Generally, the following convention should be followed:
a. When a lection begins at the second half of a verse, we add the letter 
“b” to the verse number.
b. When a lection ends at the first half a verse, we add the letter “a” to 
the verse number.

Thus, a reading could be specified as: Lk 6:17-23a

Supporting this would require a method for indicating verse halves in the Bible 
storage format. This should be a medium-term goal, as we proceed to overhaul 
the Bible format. In the meanwhile, the program should ignore "a" or "b" 
indications that it does not know how to process and display the full verse (as 
is done on the website).

Instead, the program errors out with the following message:

Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: For 
input string: "23a"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
    at java.lang.Integer.parseInt(Integer.java:492)
    at java.lang.Integer.parseInt(Integer.java:527)
    at Ponomar.Bible.formatPassage(Bible.java:781)
    at Ponomar.Bible.getHyperlink(Bible.java:824)
    at Ponomar.Main.write(Main.java:786)
    at Ponomar.Main.propertyChange(Main.java:279)
    at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335)
    at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:327)
    at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:263)
    at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:283)
    at java.awt.Component.firePropertyChange(Component.java:8422)
    at javax.swing.JComponent.firePropertyChange(JComponent.java:4501)
    at Ponomar.JCalendar.propertyChange(JCalendar.java:190)
    at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335)
    at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:327)
    at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:263)
    at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:283)
    at java.awt.Component.firePropertyChange(Component.java:8422)
    at javax.swing.JComponent.firePropertyChange(JComponent.java:4501)
    at Ponomar.JDaySelector.setDay(JDaySelector.java:553)
    at Ponomar.JDaySelector.actionPerformed(JDaySelector.java:674)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
    at java.awt.Component.processMouseEvent(Component.java:6505)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3312)
    at java.awt.Component.processEvent(Component.java:6270)
    at java.awt.Container.processEvent(Container.java:2229)
    at java.awt.Component.dispatchEventImpl(Component.java:4861)
    at java.awt.Container.dispatchEventImpl(Container.java:2287)
    at java.awt.Component.dispatchEvent(Component.java:4687)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
    at java.awt.Container.dispatchEventImpl(Container.java:2273)
    at java.awt.Window.dispatchEventImpl(Window.java:2719)
    at java.awt.Component.dispatchEvent(Component.java:4687)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
    at java.awt.EventQueue.access$200(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:694)
    at java.awt.EventQueue$3.run(EventQueue.java:692)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
    at java.awt.EventQueue$4.run(EventQueue.java:708)
    at java.awt.EventQueue$4.run(EventQueue.java:706)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

Original issue reported on code.google.com by aleksandr.andreev@gmail.com on 17 Sep 2013 at 7:20

GoogleCodeExporter commented 9 years ago
I think this has been fixed. Yuri please confirm.

Original comment by aleksandr.andreev@gmail.com on 15 Feb 2015 at 1:38

GoogleCodeExporter commented 9 years ago
Corrected for the JAVA.

Original comment by yurii2...@gmail.com on 25 Apr 2015 at 12:15