[openrtm-commit:00902] r363 - in trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/generator: . param
openrtm @ openrtm.org
openrtm @ openrtm.org
2012年 11月 5日 (月) 01:22:03 JST
Author:
Date: 2012-11-05 01:22:03 +0900 (Mon, 05 Nov 2012)
New Revision: 363
Modified:
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/generator/ProfileHandler.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/generator/param/ParamUtil.java
Log:
Modified for Commad Line
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/generator/ProfileHandler.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/generator/ProfileHandler.java 2012-10-28 15:14:27 UTC (rev 362)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/generator/ProfileHandler.java 2012-11-04 16:22:03 UTC (rev 363)
@@ -9,6 +9,7 @@
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
+import java.util.ArrayList;
import java.util.List;
import jp.go.aist.rtm.rtcbuilder.IRTCBMessageConstants;
@@ -24,12 +25,25 @@
public class ProfileHandler {
private List<GenerateManager> managerList = null;
+ private boolean isDirect = false;
public ProfileHandler() {
super();
managerList = RtcBuilderPlugin.getDefault().getLoader().getManagerList();
}
+ public ProfileHandler(boolean source) {
+ super();
+ isDirect = source;
+ }
+
+ public void addManager(GenerateManager target) {
+ if( managerList==null ) {
+ managerList = new ArrayList<GenerateManager>();
+ }
+ managerList.add(target);
+ }
+
public boolean validateXml(String targetString) throws Exception {
XmlHandler handler = new XmlHandler();
handler.validateXmlRtcBySchema(targetString);
@@ -42,6 +56,9 @@
}
public GeneratorParam restorefromXMLFile(String filePath) throws Exception {
+ return restorefromXMLFile(filePath, false);
+ }
+ public GeneratorParam restorefromXMLFile(String filePath, boolean isDirect) throws Exception {
GeneratorParam generatorParam = null;
try {
BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(filePath), "UTF-8"));
@@ -57,7 +74,7 @@
generatorParam = new GeneratorParam();
ParamUtil putil = new ParamUtil();
- RtcParam rtcParam = putil.convertFromModule(profile, generatorParam, managerList);
+ RtcParam rtcParam = putil.convertFromModule(profile, generatorParam, managerList, isDirect);
rtcParam.setRtcXml(tmp_sb.toString());
generatorParam.getRtcParams().add(rtcParam);
} catch (FileNotFoundException e) {
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/generator/param/ParamUtil.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/generator/param/ParamUtil.java 2012-10-28 15:14:27 UTC (rev 362)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/generator/param/ParamUtil.java 2012-11-04 16:22:03 UTC (rev 363)
@@ -190,9 +190,15 @@
}
public RtcParam convertFromModule(RtcProfile profile, GeneratorParam generatorParam,
- List<GenerateManager> managerList) throws Exception {
- RtcParam rtcParam = new RtcParam(generatorParam);
+ List<GenerateManager> managerList) throws Exception {
+ return convertFromModule(profile, generatorParam, managerList, false);
+ }
+
+ public RtcParam convertFromModule(RtcProfile profile, GeneratorParam generatorParam,
+ List<GenerateManager> managerList, boolean isDirect) throws Exception {
+ RtcParam rtcParam = new RtcParam(generatorParam, isDirect);
+
rtcParam.setSchemaVersion(profile.getVersion());
convertFromModuleBasic(profile, rtcParam);
More information about the openrtm-commit
mailing list