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]> 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]>> 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
-~----------~----~----~----~------~----~------~--~---