3D com

3d com Navigator

Including an External Data Source in 3d com Navigator

Working with PortalUID and the GraphWalker interface

Use Case

Abstract

This article shows how to browse external data in 3d com Navigator.


What You Will Learn With This Use Case

This use case is intended to show you how to include simple browsing of any kind of external data source in the navigator graph of 3d com Navigator.

[Top]

The CAAPPRJNBEduGraphWalker Use Case

CAAPPRJNBEduGraphWalker is a use case of the CAAPPRJNavigatorBase.edu framework that illustrates PPRJNavigatorBase framework capabilities.

[Top]

What Does CAAPPRJNBEduGraphWalker Do

The CAAPPRJNBEduGraphWalker use case shows the inclusion of the local file system in the 3d com Navigator as a data source for browsing. On Windows systems, it maps the E:\ drive to a bookmark in the favorites tree that can be sent to the navigator for further graphic expansion. On Unix systems, it does the same but the root path is /tmp.

[Top]

How to Launch CAAPPRJNBEduGraphWalker

To launch CAAPPRJNBEduGraphWalker , you will need to set up the build time environment, then compile CAAPPRJNBEduGraphWalker along with its prerequisites, set up the run time environment, and then launch 3d com Navigator as usually done [1].

Open the navigator Services Administration panel. The CAA Locale File adapter should appear in the "source" combo box. Select it. Then enter a blank space in the "Web Service" text field the keyword "auto" in the Start Command text field. Then click the button "Add" then click "Ok" at the upper right of the panel window.

Then, using the favorites configuration panel as an administrator, press the "Update data source" button. The new data source, "CAA locale file" will then appear in the folder "All network" of the favorites tree.

You can now browse the new data source by sending that new bookmark to the relationship navigator.

[Top]

Where to Find the CAAPPRJNBEduGraphWalker Code

The CAAPPRJNBEduGraphWalker code is located in the CAAPPRJNavigatorBase.edu framework. In this example, two java classes and several java property files are needed.

[Top]

Step-by-Step

A graph walker is defined as follows: it is a java class implementing the GraphWalker interface (GraphWalkerIF) and thus giving access to a particular data source. The main input argument for graph walker methods is a PortalUID, which is used for two basic tasks:

  1. To retrieve that particular node as a root node for further expansion
  2. To retrieve the children of that particular node.

The output of a GraphWalker is basically made of GraphNodes, objects that implements the GraphNodeIF interface. These objects are only used to provide a graphical representation of the browsed data.

[Top]

Creating a New Data Source Implementation

...
public class PPRTestGraphNode implements GraphNodeIF
...

See the PPRTestGraphWalker.java file.

[Top]

Registering the Data Source in 3d com Navigator

<?xml version="1.0"?>
<Adapter Description="Access Information for CAALocaleFile Adapter" Name="CAALocaleFile" MsgCatalog="CAALocaleFile">
  <Impl Id="GraphWalker" Value="com.dassault_systemes.CAAPPRNJNavigatorBaseEduGraphWalker.PPRTestGraphWalker"/>
</Adapter>

To register the new data source, a file with .XMLAdapter extension is needed in the runtime view under the path resources\pprregistry\access. You can deliver other *.XMLAdapter files in the runtime view.

The format of that file is XML. The exact tags as above must all be present. Only the values can be set as follows:

[Top]

Creating the Bookmark in the Favorites Tree to Access the New Data Source

<?xml version="1.0"?>
<FolderIndex>
  <Folder Name="Administratornetwork" Authorized="Admin" Category="network">
    <Document Name="CAALocaleFile" UID="UID/CAALocaleFile/default/root.DEFAULTTREEROOT?Nickname=CAA Locale File Tree" Type="DEFAULTTREEROOT"/>
  </Folder>
</FolderIndex>

This is the CAAPPRJNavigatorBase.XMLFolderIndex file. You can deliver new *.XMLFolderIndex files for new sources. This files make the new data source appear in the favorite tree. For now, it is mandatory that the tag Folder and its various parameters remain unchanged. Otherwise, the bookmark cannot be correctly managed using the favorites configuration panel.

The Name parameter in the Document tag can be set freely.

The UID of the bookmark must be constructed as follows:

UID/[name of the data source as in Adapter Name in the XMLAdapter  file]/default/root.DEFAULTREEROOT?Nickname=[The name of the bookmark as appears on the screen]

The TYPE is always DEFAULTTREEROOT.

[Top]


In Short

These use case shows a way to create a new data source for browsing in 3d com Navigator

[Top]


Special Case: LCA Adapter

In order to visualize custom metadata through the ENOVIA V5 adapter the following topics must be followed:

In order to visualize custom metadata through the ENOVIA V5 adapter the following topics must be followed:

[Top]


References

[1] Building and Launching a CAA V5 JDialog Use Case
[Top]

History

Version: 1 [Jun 2004] Document created
[Top]

Copyright © 1994-2004, Dassault Systèmes. All rights reserved.