|
From: <tr...@us...> - 2003-08-17 04:12:31
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/option
In directory sc8-pr-cvs1:/tmp/cvs-serv17646/modules/core/src/com/babeldoc/core/option
Modified Files:
ConfigInfo.java
Log Message:
Updates to the scanner code - added the count down option. Updated the I/ConfigInfo object for the getStrValue, getIntValue and the getValue methods for quick and easy access to the option values.
Index: ConfigInfo.java
===================================================================
RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/option/ConfigInfo.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** ConfigInfo.java 15 Aug 2003 00:25:29 -0000 1.9
--- ConfigInfo.java 17 Aug 2003 04:12:28 -0000 1.10
***************
*** 68,71 ****
--- 68,72 ----
import com.babeldoc.core.LogService;
import com.babeldoc.core.I18n;
+ import com.babeldoc.core.NameValuePair;
import com.babeldoc.core.pipeline.PipelineStageInfo;
***************
*** 241,247 ****
}
/**
! * Get all the options.
*
* @return
--- 242,272 ----
}
+ /**
+ * Get the names and values of each of the child options of this configuration option
+ * pointed to be the path.
+ *
+ * @param path
+ * @return
+ */
+ public NameValuePair [] getChildValues(String path) {
+ ConfigOption option = getOptionInPath(path);
+ if(option!=null) {
+ Set suboptions = option.getSuboptionNames();
+ if(suboptions!=null&&suboptions.size()>0) {
+ NameValuePair [] pairs = new NameValuePair[suboptions.size()];
+ int counter = 0;
+ for (Iterator iterator = suboptions.iterator(); iterator.hasNext();) {
+ ConfigOption subOption = (ConfigOption) iterator.next();
+ pairs[counter++]=new NameValuePair(subOption.getName(), (String)subOption.getValue());
+ }
+ return pairs;
+ }
+ }
+ return null;
+ }
+
/**
! * Get all the options. This lazily initializes the options instance variable
*
* @return
|