Consortium    Solutions    Middleware    Forge    MyObjectWeb 
ObjectWeb Consortium
Print

Advanced - Powered by Google






OpenCCM

Project Links
· Home
· Download
· Documentation
· Mailing Lists
· Wiki
· Partners
· License
· History
· Related projects

Developers' Corner
· How to Contribute
· Workplan
· Resources
· CVS Repository
· Bug Tracking
· ObjectWeb Forge Site
· User Mailing List
· Team Mailing List

About
· Team
· Contacts

Table of Contents

  1. The Browser Descriptor
    1. <browser> Element
    2. <role> Element
    3. <root> Element
    4. <node> Element
    5. <jar> Element
    6. <zip> Element
    7. <include> Element
    8. <type-system> Element
    9. <code> Element
    10. <wrapper> Element
    11. <panel> Element
    12. <table> Element
    13. <icon> Element
    14. <icon-file> Element
    15. <menu> Element
    16. <item> Element
    17. <drop-action> Element
    18. <info> Element
    19. <mnemonic> Element
    20. <accelerator> Element

The Browser Descriptor

The goal of this document is to provide information on the way to configure the Browser framework.

<browser> Element

browser
DescriptionThe browser element is the root element of the Browser Descriptor.
XML DTD <!ELEMENT browser (root? , (jar | zip | include | node | type-system | role )*) >
Parent(s) None.
Attributes None.
Children Elements
  • root:
    The root element allows to configure the initial context (i.e. The object at the top level).

  • role:
    The role element allows to define different configurations for the same node.

  • node:
    The node element allows to define a configuration for a specific object.

  • jar:
    The jar element contains a Jar file definition. It represents the Jar archive that the Java Virtual Machine (JVM) would load for accessing the plug-in resources. In other words, this archive represents the plug-in.

  • zip:
    The zip element represents a zip archive. All the Jar archives containing into this Zip archive will be loaded into the Java Virtual Machive (JVM) which launches the Browser.

  • include:
    The include element allows you to include an external browser configuration file.

  • type-system:
    The type-system element specifies a new type system.

Example <browser>
  <include url="..." />
  <root>...</root>
  <node type-name="java.lang.Object">...</node>
  <node type-name="java.util.Properties">...</node>
  <jar url="..." />
  <type-system id="OMG IDL">...</type-system>
  <role id="role1" >
    <node type-name="java.lang.Object">...</node>
  </role>
  <role id="role2" >
    <node type-name="java.lang.Object">...</node>
  </role>
</browser>

<role> Element

role
DescriptionThe role element defines a group which allows user to define different behaviours for a same node. It consists of a list of node elements.
XML DTD <!ELEMENT role (root? , node*)>
<!ATTLIST role
  id ID #REQUIRED
  extends IDREFS #IMPLIED
  kind (contrete | abstract) "concrete"
>
Parent(s) browser
Attributes
  • id ID:
    The identifier of the role.

  • extends IDREFS:
    It represents a list of role identifiers (separated by commas) from which the defined role inherits.

  • kind (contrete | abstract):
    It specifies if this role is concrete or abstract. The default value is concrete. Only the concrete roles are displayed into the graphical role menu.

Children Elements
  • root:
    The root element allows to configure an initial context associated to this role.

  • node:
    The node element represents the nodes that the user wants to configure under this role.

Example   <role id="role1" >
    <root>...</root>
    <node type-name="java.lang.Object">...</node>
  </role>
  <role id="role2" kind="abstract">
    <node type-name="java.lang.Object">...</node>
    <node type-name="java.lang.Integer">...</node>
  </role>
  <role id="role3" >...</role>
  <role id="role4" extends="role2,role3" >
    <node type-name="java.util.Properties">...</node>
  </role>

<root> Element

root
DescriptionThe root element defines a context which is displayed at the root of the browser.
XML DTD <!ELEMENT root (code)>
Parent(s) browser,
role
Attributes None.
Children Elements
  • code:
    The code element describes the implementation of the initial context to display.

Example <root><code>...</code></root>

<node> Element

node
DescriptionThe node element represents the configuration for a specific entity. You may define a node for every kind of objects.
Warning: Currently, only the Java type system is supported. In the future releases, we will also support OMG IDL type, Fractal type, ...
XML DTD <!ELEMENT node (jar*, wrapper?, panel?, icon?, menu?, drop-action*, info?) >
<!ATTLIST node
  type-system CDATA #FIXED "Java"
  type-name CDATA #REQUIRED
>
Parent(s) browser
role
Attributes
  • type-system CDATA:
    The identifier of the type system used to identify the entity. The default value is Java and it is also the only supported type for the moment.

  • type-name CDATA:
    The identifier of the recognized object in this type system.

Children Elements
  • jar:
    The jar element contains a Jar file definition. It represents the Jar archive that the Java Virtual Machine (JVM) would load for accessing the plug-in resources. In other words, this archive represents the plug-in.

  • wrapper:
    The wrapper element defines the wrapper to use to browse the resource.

  • panel:
    The panel element defines the panel to associate to the described object.

  • icon:
    The icon element defines the icon to use to represent this type of node.

  • menu:
    The menu element describes the content of a contextual menu for acting with the resource.

  • drop-action:
    The drop-action element defines the Drag and Drop action.

  • info:
    The info element defines a class which provides a short description of a resource.

Example <node type-name="java.util.Properties">
  <jar url="file:PropertiesPlugin.jar" />
  <wrapper><code>...</code></wrapper>
  <icon><code>...</code></icon>
  <panel><code>...</code></panel>
  <menu>...</menu>
  <drop-action label="..."><code>...</code></menu>
</node>

<jar> Element

jar
Description The jar element defines the archive where the plug-in classes and resources are located. It will be loaded in the Java Virtual Machine (JVM). This element is only needed if the plug-in resources are not present in the Browser classpath.
XML DTD <!ELEMENT jar EMPTY >
<!ATTLIST jar
  url CDATA #REQUIRED
>
Parent(s) browser
node
Attributes
  • url CDATA:
    The URL which points to the Jar achive to load.
    Warning: The specified URL should follow the java.net.URL syntax.

Children Elements None.
Example <jar url="file:CCM_plugin.jar" />
<jar url="http://openccm.objectweb.org/CORBA_plugin.jar" />

<zip> Element

zip
Description The zip element defines an archive containing the Jar archives where the plug-in classes and resources are located. All the Jar archives found into this Zip archive will be loaded into the Java Virtual Machine (JVM) which launches the Browser.
XML DTD <!ELEMENT zip EMPTY >
<!ATTLIST zip
  url CDATA #REQUIRED
>
Parent(s) browser
Attributes
  • url CDATA:
    The URL which points to the Zip archive containing some Jar archives to load.
    Warning: The specified URL should follow the java.net.URL syntax.

Children Elements None.
Example <zip url="file:CCM_demo.aar" />
<zip url="http://openccm.objectweb.org/CCM_demo.zip" />

<include> Element

include
Description The include element describes an external Browser configuration to include into the current configuration.
XML DTD <!ELEMENT include EMPTY >
<!ATTLIST include
  url CDATA #REQUIRED
>
Parent(s) browser
Attributes
  • url CDATA:
    The url where the Browser Descriptor file to import can be found.
    Warning: The specified URL should follow the java.net.URL syntax.

Children Elements None.
Example <include url="file:CCMConfig.xml" />
<include url="http://openccm.objectweb.org/CCMConfig.xml" />

<type-system> Element

type-system
Description The type-system element defines a type system for identifying a kind of node.
XML DTD <!ELEMENT type-system (code) >
<!ATTLIST type-system
  id CDATA #REQUIRED
>
Parent(s) browser
Attributes
  • id CDATA:
    The identifier of the type-system.

Children Elements
  • code:
    The code element describes the code to use in order to identify the node corresponding to this type-system.

Example <type-system id="OMG IDL"><code>...</code></type-system>

<code> Element

code
Description The code element describes a piece of code to interpret.
Warning: For the moment, only Java language is supported to describe a code element. The value of this element must be a Java class name.
XML DTD <!ELEMENT code (#PCDATA) >
<!ATTLIST code
  language ( Java | JavaIDLScript | Python ) "Java"
>
Parent(s) root
type-system
wrapper
panel
icon
item
drop-action
info
Attributes
  • language CDATA:
    The language in which the code has been written. (default value is "Java").

Children Elements None.
Example <code>org.objectweb.util.browser.core.panel.WhitePanel</code>
<code language="Java">myPackage.MyClass</code>

<wrapper> Element

wrapper
DescriptionThe wrapper element defines the wrapper code to use to access children entities of the described object. Indeed, it specifies the way for retrieving children entities of the current node. For example, the org.omg.CORBA.CosNaming.NamingContext object's wrapper gives all the CORBA object references bound in a naming context.
XML DTD <!ELEMENT wrapper (code) >
Parent(s) node
Attributes None.
Children Elements
  • code:
    The code element describes the implementation of the wrapper to use.

Example <wrapper><code>...</code></wrapper>

<panel> Element

panel
Description The panel element defines the panel for displaying exhaustive information about a resource.
A panel element may be a simple code element or it may be composed of a list of Panel elements and/or Table elements.
XML DTD <!ELEMENT panel (code | (panel | table)+) >
<!ATTLIST panel
  inherit-type-panel (true | false) "false"
>
Parent(s) node
Attributes
  • inherit-type-panel (true | false):
    A boolean attribute which allows to fix the inheritance policy at the java type level:

    • true to specify that this panel has to inherit from parent nodes panel at the java type level. The parents panel is placed below the current panel definition.
    • false to specify that this panel must not inherit from parent nodes panel at the java type level.
    The default value is false.
Children Elements
  • code:
    The code element specifies the implementation of the panel to use.

  • panel:
    The panel element specifies the sub panel contains in the defined composite panel.

  • table:
    The table element describes an array into the defined composite panel.

Example <panel><code>...</code></wrapper>
<panel inherit-type-panel="true" >
  <panel><code>...</code></panel>
  <table><code>...</code></table>
  <panel><code>...</code></panel>
</panel>

<table> Element

table
DescriptionThe table element defines a panel which represents an array of data.
XML DTD <!ELEMENT table (code) >
Parent(s) panel
Attributes None.
Children Elements
  • code:
    The code element describes the implementation of the table to use.

Example <table><code>...</code></table>

<icon> Element

icon
Description The icon element defines the way to obtain an icon to represent an entity.
XML DTD <!ELEMENT icon (icon-file | code) >
Parent(s) node
item.
Attributes None.
Children Elements
  • code:
    The code element describes the implementation of the icon provider class to use.

  • icon-file:
    The icon-file element defines a file resource to use.

Example <icon><code>...</code></icon>
<icon><icon-file url="..." /></icon>

<icon-file> Element

icon-file
DescriptionThe icon-file element describes an icon file resource.
XML DTD <!ELEMENT icon-file EMPTY >
<!ATTLIST icon-file
  url CDATA #REQUIRED
>
Parent(s) icon
Attributes
  • url CDATA:
    The URL of the icon file to use.
    Warning: The specified URL should follow the java.net.URL syntax.

Children Elements None.
Example <icon-file url="file:icons/icon.png" />
<icon-file url="http://openccm.objectweb.org/icon.png" />

<menu> Element

menu
DescriptionThe menu element describes a contextual menu to act on the resource.
XML DTD <!ELEMENT menu (item)* >
<!ATTLIST menu
  inherit-tree-menu (true | false) "true"
  inherit-type-menu (true | false) "true"
>
Parent(s) node
Attributes
  • inherit-tree-menu (true | false):
    A boolean attribute which allows to fix the inheritance policy at the tree level:

    • true to specify that this menu has to inherit from parent nodes menu items at the tree level.
    • false to specify that this menu must not inherit from parent nodes menu items at the tree level.
    The default value is true.
  • inherit-type-menu (true | false):
    A boolean attribute which allows to fix the inheritance policy at the Java type level:

    • true to specify that this menu has to inherit from parent nodes menu items at the Java type inheritance level.
    • false to specify that this menu must not inherit from parent nodes menu items at the Java type inheritance level.
    The default value is true.
Children Elements
  • item:
    The item element describes an item of the contextual menu.

Example <menu>
  <item ... >...</item>
  <item ... >...</item>
</menu>
<menu inherit-type-menu="false" inherit-tree-menu="false">
  <item ... >...</item>
</menu>

<item> Element

item
DescriptionThe item element describes an item of a contextual menu defined by the menu element.
XML DTD <!ELEMENT item (icon?,accelerator?,mnemonic?,code) >
<!ATTLIST item
  label CDATA #REQUIRED
  tree-child-visible (true | false) "false"
  type-child-visible (true | false) "true"
>
Parent(s) menu
Attributes
  • label CDATA:
    The label of the item in the contextual menu.

  • tree-child-visible (true | false):
    A boolean attribute which allows to fix the tree child visibility policy:

    • true to specify that this item is defined for children nodes, i.e. only children nodes would access to this item.
    • false to specify that this item concerns the current node.
    The default value is false.
  • type-child-visible (true | false):
    A boolean attribute which allows to fix the type system child visibility policy:

    • true to specify that this item can be visible by children at the Java type inheritance level.
    • false to specify that this item must not be visible by children at the Java type inheritance level.
    The default value is true.
Children Elements
  • icon:
    The icon element is used to define an icon in order to represent the action.

  • accelerator:
    The accelerator element describes the combination of keys in order to access to this action using the keyboard.

  • mnemonic:
    The mnemonic element describes the character to underline into the label of the action in order to execute this action when the associated menu is displayed.

  • code:
    The code element describes the implementation of the action to use.

Example <node type-name="X">
  ...
  <menu>
    <item label="For X and sub classes"><code>...</code></item>
    <item label="Only for X"
          type-child-visible="false"><code>...</code></item>
    <item label="For X's children nodes"
          tree-child-visible="true"><code>...</code></item>
    <item label="New" >
      <icon>...</icon>
      <code>...</code>
      <accelerator ctrl="true" char="n"/>
      <mnemonic char="n"/>
    </item>
  </menu>
<node>

<drop-action> Element

drop-action
DescriptionThe drop-action element describes the action executed when an object is dropped on the entity represented by the defined node.
XML DTD <!ELEMENT drop-action (code) >
<!ATTLIST drop-action
  label CDATA #REQUIRED
  type (copy | move | link) "move"
>
Parent(s) node
Attributes
  • label CDATA:
    The label describing the action.

  • type (copy | move | link):
    The type attribute specifies the kind of the Drag&Drop action. This type is in fact defined by the state of the input device: left click for move, ctrl+left click for copy and shift+ctrl+left click for link.

Children Elements
  • code:
    The code element describes the implementation of the action to use.

Example <drop-action type="link" label="drop action">
  <code>...</code>
</drop-action>

<info> Element

info
DescriptionThe info element represents a short description of a resource.
For example, this short description may be displayed in the status bar of a console.
XML DTD <!ELEMENT info (code) >
Parent(s) node
Attributes None.
Children Elements
  • code:
    The code element describes the implementation of the description to use.

Example <info>
  <code>...</code>
</info>

<mnemonic> Element

mnemonic
DescriptionThe mnemonic element represents the mnemonic key of an action's label.
XML DTD <!ELEMENT mnemonic EMPTY>
<!ATTLIST mnemonic
  char CDATA #REQUIRED
>
Parent(s) item
Attributes
  • char CDATA:
    The character to underline.

Children Elements None.
Example <mnemonic char="n"/>

<accelerator> Element

accelerator
DescriptionThe accelerator element allows us to associate keys in order to compose an accelerator. An accelerator consits of a combination of keys.
XML DTD <!ELEMENT accelerator EMPTY>
<!ATTLIST accelerator
  ctrl (true | false) "false"
  alt (true | false) "false"
  shift (true | false) "false"
  meta (true | false) "false"
  char CDATA #REQUIRED
>
Parent(s) item
Attributes
  • char CDATA:
    The character of the accelerator.

  • ctrl (true | false):
    This attribute represents the "control" key. The default value is false (i.e. not selected).

  • alt (true | false):
    This attribute represents the "alt" key. The default value is false (i.e. not selected).

  • shift (true | false):
    This attribute represents the "shift" key. The default value is false (i.e. not selected).

  • meta (true | false):
    This attribute represents the "meta" key. The default value is false (i.e. not selected).

Children Elements None.
Example <accelerator ctrl="true" char="n">

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster | Last modified at 2005-07-07 02:04 PM