[jira] [Commented] (FOP-2472) Allow to clear the hyphenation tree cache at runtime

2015-05-24 Thread Andreas L. Delmelle (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14557712#comment-14557712
 ] 

Andreas L. Delmelle commented on FOP-2472:
--

Change as suggested committed to trunk. See: http://svn.apache.org/r1681436

Thanks, Marc!

 Allow to clear the hyphenation tree cache at runtime
 

 Key: FOP-2472
 URL: https://issues.apache.org/jira/browse/FOP-2472
 Project: FOP
  Issue Type: Improvement
Affects Versions: 1.1
Reporter: Marc Wiest
Priority: Minor
  Labels: cache, hyphenation
   Original Estimate: 0.5h
  Remaining Estimate: 0.5h

 I suggest adding the following method (or similar) to the 
 org.apache.fop.hyphenation.Hyphenator class.
 I had to hack FOP and create a custom build for myself, because I need to 
 alter and reload the hyphenation files at runtime.
 The use case is, that I have a web application that allows editors - on an 
 admin page - to add hyphenation exceptions on-the-fly. In that case the 
 hyphenation pattern files are re-created including the new exceptions, but 
 need to be reloaded by FOP. The below worked for me, please consider adding 
 to the trunk.
 {code:title=Hyphenator.java|borderStyle=solid}
 /**
   * Clear the hyphenation tree cache, in case the underlying data files have 
 changed at runtime.
   */
 public static synchronized void clearHyphenationTreeCache()
 {
   hTreeCache = new HyphenationTreeCache();
 }
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FOP-2472) Allow to clear the hyphenation tree cache at runtime

2015-05-21 Thread Andreas L. Delmelle (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14554560#comment-14554560
 ] 

Andreas L. Delmelle commented on FOP-2472:
--

Seems fine to me. Unless anyone has strong objections, I will commit this 
change to trunk shortly.

 Allow to clear the hyphenation tree cache at runtime
 

 Key: FOP-2472
 URL: https://issues.apache.org/jira/browse/FOP-2472
 Project: FOP
  Issue Type: Improvement
Affects Versions: 1.1
Reporter: Marc Wiest
Priority: Minor
  Labels: cache, hyphenation
   Original Estimate: 0.5h
  Remaining Estimate: 0.5h

 I suggest adding the following method (or similar) to the 
 org.apache.fop.hyphenation.Hyphenator class.
 I had to hack FOP and create a custom build for myself, because I need to 
 alter and reload the hyphenation files at runtime.
 The use case is, that I have a web application that allows editors - on an 
 admin page - to add hyphenation exceptions on-the-fly. In that case the 
 hyphenation pattern files are re-created including the new exceptions, but 
 need to be reloaded by FOP. The below worked for me, please consider adding 
 to the trunk.
 {code:title=Hyphenator.java|borderStyle=solid}
 /**
   * Clear the hyphenation tree cache, in case the underlying data files have 
 changed at runtime.
   */
 public static synchronized void clearHyphenationTreeCache()
 {
   hTreeCache = new HyphenationTreeCache();
 }
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)