Xj3D VRML/X3D Code API

org.web3d.vrml.lang
Class ProfileInfo

java.lang.Object
  extended byorg.web3d.vrml.lang.ProfileInfo

public class ProfileInfo
extends java.lang.Object

Description of a single profile.

A profile is a short-hand way of describing an aggregation of components. A valid profile will always have one or more components, but a title string is optional.

Version:
$Revision: 1.2 $
Author:
Justin Couch

Constructor Summary
ProfileInfo(java.lang.String name, java.lang.String title, ComponentInfo[] comps)
          Construct a basic component description that just has a name and level.
 
Method Summary
 ComponentInfo[] getComponents()
          Get the list of defined components for this profile.
 java.lang.String getName()
          Get the name of this component.
 java.lang.String getTitle()
          Get the title of this component.
 java.lang.String toX3DString()
          Return a formatted string version of this component that conforms to the X3D 1.0 specification for VRML file encoding.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProfileInfo

public ProfileInfo(java.lang.String name,
                   java.lang.String title,
                   ComponentInfo[] comps)
Construct a basic component description that just has a name and level.

Parameters:
name - The name of the component
title - The level of the component
comps - The components that make up this profile
Throws:
java.lang.IllegalArgumentException - The name was null or level < 1
Method Detail

getName

public java.lang.String getName()
Get the name of this component.

Returns:
name The name of the component

getTitle

public java.lang.String getTitle()
Get the title of this component. This is a long-form version that could be used in a UI. If no title is set, will return null.

Returns:
The title string of this component

getComponents

public ComponentInfo[] getComponents()
Get the list of defined components for this profile. A profile will always have one or more components.

Returns:
An array of the component definitions for this profile

toX3DString

public java.lang.String toX3DString()
Return a formatted string version of this component that conforms to the X3D 1.0 specification for VRML file encoding. The string will start with the PROFILE keyword, as per spec.

Returns:
A correctly formatted string.

Xj3D VRML/X3D Code API

Copyright © 2001 - 2005 Web3D Consortium