Hey guys, I have a couple more questions.
Question #1
I was able to get the target saved in the OTGenericOTrunkStep and now it
contains a target object with a refid but there is no declaration of the id
anywhere in my generated otml file so the refid basically points to
something that doesn't exist. How can I get the actual declaration of the
object to show up in my otml file?
my generated otml
<root>
<OTPasProject title="Model Test">
<activityList>
<OTPasActivity title="Model Activity" authorNotes="">
<stepList>
<OTGenericOTrunkStep>
<target>
<object refid="6879584d-2ea4-11dd-8fa6-4dd7d3c22f2b" />
</target>
</OTGenericOTrunkStep>
</stepList>
</OTPasActivity>
</activityList>
</OTPasProject>
</root>
This is what my saveRealObject() for OTGenericOTrunkStepController looks
like. Am I missing something?
public void saveRealObject(Object realObject) {
super.saveRealObject(realObject);
OTGenericOTrunkStep otStep = (OTGenericOTrunkStep) otObject;
OTrunkStep step = (OTrunkStep) realObject;
otStep.setTarget(step.getTarget());
}
Question #2
When I try to add views from the concord otml I end up with objects with
refids and array references. Is this correct? Shouldn't the views show up
just as they looked in the concord otml? How can I get the views to show up
like they do in the concord otml? At the moment I am iterating through all
the view entries in the concord otml, making sure the views don't already
exist in my new otml file, and then adding them to my new otml.
concord otml
<viewEntries>
<OTViewEntry objectClass="org.concord.biologica.state.OTSex"
viewClass="org.concord.biologica.state.ui.OTSexView" />
<OTViewEntry
objectClass="org.concord.biologica.state.OTChromosome"
viewClass="org.concord.biologica.state.ui.OTChromosomeView" />
<OTViewEntry
objectClass="org.concord.biologica.state.OTStaticOrganism"
viewClass="org.concord.biologica.state.ui.OTStaticOrganismView" />
<OTViewEntry objectClass="org.concord.otrunk.ui.OTTextPane"
viewClass="org.concord.otrunk.ui.swing.OTTextPaneView" />
<OTViewEntry objectClass="org.concord.otrunk.ui.OTButton"
viewClass="org.concord.otrunk.ui.swing.OTButtonView" />
<OTViewEntry objectClass="org.concord.otrunk.ui.OTCardContainer"
viewClass="org.concord.otrunk.ui.swing.OTCardContainerView" />
<OTViewEntry objectClass="org.concord.otrunk.ui.OTText"
viewClass="org.concord.otrunk.ui.swing.OTTextEditView" />
<OTDocumentViewConfig
objectClass="org.concord.otrunk.view.document.OTDocument"
viewClass="org.concord.otrunk.view.document.OTDocumentView">
<css>td { padding: 0px; margin: 0px; }
p { font-size: 14px; }
p.intro {
font-size: 24px;
height: 100%;
color: #990000;
text-align: center;
background-color: #ffeecc;
margin: 20px;
padding: 20px;
border: 2px solid #000000;
}
</css>
</OTDocumentViewConfig>
<OTViewEntry
objectClass="org.concord.otrunk.script.ui.OTScriptObject"
viewClass="org.concord.otrunk.script.ui.OTScriptObjectView" />
</viewEntries>
my generated new otml
<bundles>
<OTViewBundle>
<viewEntries>
<object
refid="9c11d3b0-0ad0-012a-b541-0017f2cc694e//bundles[0]/viewEntries[0]" />
<object
refid="9c11d3b0-0ad0-012a-b541-0017f2cc694e//bundles[0]/viewEntries[1]" />
<object
refid="9c11d3b0-0ad0-012a-b541-0017f2cc694e//bundles[0]/viewEntries[2]" />
<object
refid="9c11d3b0-0ad0-012a-b541-0017f2cc694e//bundles[0]/viewEntries[3]" />
<object
refid="9c11d3b0-0ad0-012a-b541-0017f2cc694e//bundles[0]/viewEntries[4]" />
<object
refid="9c11d3b0-0ad0-012a-b541-0017f2cc694e//bundles[0]/viewEntries[5]" />
<object
refid="9c11d3b0-0ad0-012a-b541-0017f2cc694e//bundles[0]/viewEntries[6]" />
<object
refid="9c11d3b0-0ad0-012a-b541-0017f2cc694e//bundles[0]/viewEntries[7]" />
<object
refid="9c11d3b0-0ad0-012a-b541-0017f2cc694e//bundles[0]/viewEntries[8]" />
</viewEntries>
</OTViewBundle>
</bundles>
Question #3
When I'm reading the bundles from the concord otml file, I receive this Null
child id error when I call getVector on the bundles. The bundles contain two
objects, the OTViewBundle and the OTScriptEngineBundle. I have figured out
that the OTScriptingEngineBundle is the one causing the error because it has
a null child id. How can I resolve this?
<bundles>
<OTViewBundle showLeftPanel="false">
...
</OTViewBundle>
<OTScriptEngineBundle>
<engines>
<OTScriptEngineEntry
objectClass="org.concord.otrunk.script.js.OTJavascript"
engineClass="org.concord.otrunk.script.js.OTJavascriptEngine" />
</engines>
</OTScriptEngineBundle>
</bundles>
java.lang.Exception: Null child id
at
org.concord.otrunk.OTObjectServiceImpl.getOTObject(OTObjectServiceImpl.java:130)
at
org.concord.otrunk.OTObjectInternal.getOTObject(OTObjectInternal.java:248)
at
org.concord.otrunk.OTObjectListImpl.getVector(OTObjectListImpl.java:104)
Thanks,
Geoff
On Fri, May 30, 2008 at 11:24 AM, Scott Cytacki <[EMAIL PROTECTED]>
wrote:
>
> The bundles and services properties are basically the same. The javadoc
> for the OTSystem.getServices() method briefly describes this:
>
> http://source.concord.org/maven2/site/maven2-svn/otrunk/otrunk/apidocs/org/concord/otrunk/OTSystem.html#getServices()<http://source.concord.org/maven2/site/maven2-svn/otrunk/otrunk/apidocs/org/concord/otrunk/OTSystem.html#getServices%28%29>
>
> You can put all of the services inside of the bundles element. And the
> view entries inside of the OTViewService from the concord otml file can
> be moved inside of the OTViewBundle of the wise3 otml file.
>
> Scott
>
> Geoffrey Kwan wrote:
> > I now have the imports and includes added to the empty otml file when
> > needed. I noticed that there are bundles as well as services. View
> > entries are under services in the concord otml file from
> > http://rails.dev.concord.org/otrunk-wise-step/otml/otrunk/103, where
> > as they are under bundles in the wise3 otml file that our authoring
> > tool has been generating. Are these the same entries but just placed
> > in a different hierarchy for the wise3 otml files? Do we need services
> > in the wise3 otml file?
> >
> >
> > Here's an example of the different hierarchy
> >
> > concord otml file
> > <objects>
> > <OTSystem>
> > <services>
> > <OTViewService showLeftPanel="false">
> > <viewEntries>
> > <OTViewEntry
> > viewClass="org.concord.otrunk.view.document.OTDocumentView"
> > objectClass="org.concord.otrunk.view.document.OTDocument"/>
> > ...
> >
> > wise3 otml file
> > <objects>
> > <OTSystem>
> > <bundles>
> > <OTViewBundle>
> > <viewEntries>
> > <OTViewEntry
> > objectClass="org.telscenter.pas.otrunk.skeleton.OTPasProject"
> > viewClass="org.telscenter.pas.otrunk.skeleton.OTPasProjectView" />
> > ...
> >
> >
> > Now that I have all the imports and bundles figured out for the most
> > part, I'm trying to create the step but when I try to create an
> > OTrunkStep and set its target to be something, in this case an
> > OTCompoundDoc, nothing shows up in the otml within the
> > OTGenericOTrunkStep, see below
> >
> > <root>
> > <OTPasProject title="Model Test">
> > <activityList>
> > <OTPasActivity title="Model Activity" authorNotes="">
> > <stepList>
> > <OTGenericOTrunkStep />
> > </stepList>
> > </OTPasActivity>
> > </activityList>
> > </OTPasProject>
> > </root>
> >
> > Thanks,
> > Geoff
> >
> >
> > On Fri, May 9, 2008 at 1:28 PM, Scott Cytacki <[EMAIL PROTECTED]
> > <mailto:[EMAIL PROTECTED]>> wrote:
> >
> >
> > It is probably better to not use the OTrunkCurnit class to load in
> the
> > model.otml file.
> > Because what you are loading is not really an OTrunkCurnit it is
> > just an
> > otml file.
> >
> > You can do this instead:
> > OTViewerHelper viewerHelper = new OTViewerHelper();
> > OTDatabase mainDb = viewerHelper.loadOTDatabase(otrunkURL);
> > viewerHelper.loadOTrunk(mainDb, null);
> > OTrunkImpl otrunk = (OTrunkImpl)viewerHelper.getOtrunk();
> >
> > The first error you are seeing is harmless:
> > > Can't find local id: model_id_1
> > this means there is no object with a local_id attribute set to
> > "model_id_1". You might call that the "definition" of "model_id_1".
> > The element you found: <object refid="${model_id_1}"/> is the
> > reference.
> > So it is the cause of the error. If that reference wasn't there
> there
> > would be no error message.
> > This error message is more of a warning. Eveything else will be
> > loaded. The place where it can't find the local_id will get a null
> > object instead of what the author probably intended
> >
> > The second error will be fixed by the code above. The
> > OTViewerHelper.loadOTrunk method sets up OTrunk with a
> > UserMessageHandler service which is required by the
> > OTInterfaceManager.
> >
> > Scott
> >
> > Geoffrey Kwan wrote:
> > > I'm trying to convert an OTrunkModel by creating an OTrunkCurnit
> and
> > > first trying to retrieve the view entries. I'm doing so by
> > performing
> > > the code below
> > >
> > > OTrunkCurnit curnit = new OTrunkCurnit(otrunkURL);
> > > curnit.setAuthoring(true);
> > > curnit.initialize();
> > >
> > > OTrunkImpl otrunk = new
> > OTrunkImpl(curnit.getOTDatabase());
> > > OTSystem otSystem = otrunk.getSystem();
> > > OTObjectList otObjectList = otSystem.getBundles();
> > > Vector bundles = otObjectList.getVector();
> > >
> > > but the bundles is completely empty which may be caused by the fact
> > > that when I call curnit.initialize() I receive several errors. I
> was
> > > hoping that you could help me resolve these errors which will
> > allow me
> > > to retrieve the view entries. Here are the errors
> > >
> > >
> > > Error #1
> > > Can't find local id: model_id_1
> > >
> > > I receive this error even though <object refid="${model_id_1}"/> is
> > > found within the otml file
> > >
> > >
> > >
> > > Error #2
> > > No service could be found to handle the
> > > requirement of: class org.concord.sensor.state.OTInterfaceManager
> > > for: interface org.concord.framework.text.UserMessageHandler
> > > java.lang.NullPointerException
> > > at
> > >
> >
> org.concord.otrunk.OTObjectServiceImpl.loadOTObject(OTObjectServiceImpl.java:201)
> > > at
> > >
> >
> org.concord.otrunk.OTObjectServiceImpl.getOTObject(OTObjectServiceImpl.java:163)
> > > at
> > >
> >
> org.concord.otrunk.OTObjectInternal.getOTObject(OTObjectInternal.java:248)
> > > at
> > >
> >
> org.concord.otrunk.OTObjectListImpl.getVector(OTObjectListImpl.java:104)
> > > at org.concord.otrunk.OTrunkImpl.<init>(OTrunkImpl.java:178)
> > > at org.concord.otrunk.OTrunkImpl.<init>(OTrunkImpl.java:111)
> > > at
> > >
> >
> org.telscenter.sailotrunk.OTrunkCurnit.initialize(OTrunkCurnit.java:118)
> > >
> > > I receive this error which leads to a NullPointerException even
> > though
> > > I have the projects sensor and framework in my classpath.
> > >
> > >
> > >
> > > I have attached the otml file for your reference.
> > >
> > > Thanks,
> > > Geoff
> > >
> > >
> > > On Thu, Apr 3, 2008 at 12:48 PM, Scott Cytacki
> > <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> > > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>>
> wrote:
> > >
> > >
> > > The model views are basically the same as what you've seen
> > in the
> > > datagraph, drawing. In addition to the view bundle they
> > have some
> > > extra
> > > bundles that setup the script engine and the sensor device
> > service.
> > >
> > > Yes, you could add all these things to your "empty" otml,
> > that is
> > > probably the most simple way to start. You just need to
> > look at the
> > > otml used by one of these model steps and cut and past the
> > views and
> > > bundles.
> > >
> > > It would be a better if you only added them as they are needed.
> > > This
> > > would require loading in the otml for the model step and
> > then getting
> > > the views and bundles out of it and merging them into your
> > "empty"
> > > otml
> > > file.
> > >
> > > Scott
> > >
> > > Anthony Perritano wrote:
> > > > One of the things we want to do is take some our existing
> wise
> > > > projects like Airbags, Global Warming, etc... and convert
> them
> > > to otml
> > > > so we can edit them in the authoring tool. Geoff and I
> started
> > > work on
> > > > that today. Our plan is to load in an empty otml file in a
> new
> > > > OTrunkProjectConverter(part of the Wise Converter Project)
> > with
> > > > imports and view definitions defined and add beans to the
> root
> > > as the
> > > > wise2 converted xml is transversed. then save it.
> > > >
> > > > one of the main questions is: what about the models? and
> > the views
> > > > that are necessary for those. will we beable to put in all
> > > definitions
> > > > for views in our empty otml so that any project with a
> > model with be
> > > > authorable and runnable? or do we have to hand code those on
> a
> > > case by
> > > > case bases? how are the model views different than the
> > datagrah,
> > > > drawing, etc.. views that we have seen so far?
> > > >
> > >
> > >
> > >
> > >
> > >
> > > >
> >
> >
> >
> >
> >
> > >
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"SAIL-Dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/SAIL-Dev?hl=en
-~----------~----~----~----~------~----~------~--~---