Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.trapezium.vrml.node
Class PROTObase  view PROTObase download PROTObase.java

java.lang.Object
  extended bycom.trapezium.vrml.VrmlElement
      extended bycom.trapezium.vrml.SingleTokenElement
          extended bycom.trapezium.vrml.MultipleTokenElement
              extended bycom.trapezium.vrml.fields.Field
                  extended bycom.trapezium.vrml.node.Node
                      extended bycom.trapezium.vrml.node.PROTObase
All Implemented Interfaces:
java.io.Serializable, com.trapezium.pattern.VisitorPattern
Direct Known Subclasses:
EXTERNPROTO, PROTO

public abstract class PROTObase
extends Node

Base class for PROTO and EXTERNPROTO scene graph components.

Since:
1.0
Version:
1.21 22 August 1998, added url via IS enumeration access 1.12, 7 April 1998, added "getFieldNames" 28 March 1998, added "getInterfaceCount" method, 1.1, 14 Jan 1998

Nested Class Summary
 
Nested classes inherited from class com.trapezium.vrml.fields.Field
 
Field Summary
(package private)  java.util.Vector isList
          a list of interface fields mapped to node fields via IS syntax
(package private)  java.util.Vector protoInterface
          a list of the fields in the PROTO interface
(package private)  boolean unusedInterfaceCheckComplete
          flag to indicate whether or not unused interface existence check done
(package private)  boolean unusedInterfacesExist
           
 
Fields inherited from class com.trapezium.vrml.node.Node
fieldNameList
 
Fields inherited from class com.trapezium.vrml.fields.Field
 
Fields inherited from class com.trapezium.vrml.MultipleTokenElement
 
Fields inherited from class com.trapezium.vrml.SingleTokenElement
 
Fields inherited from class com.trapezium.vrml.VrmlElement
baseProfile, createCount, disableBaseProfile, errorString, noUnusedDEFwarning, nowarning
 
Constructor Summary
PROTObase(int tokenOffset)
          Create a PROTO or EXTERNPROTO starting at a token
 
Method Summary
 void addInterface(com.trapezium.vrml.fields.Field f)
          Add interface declaration to PROTO/EXTERNPROTO interface list
 void addISField(com.trapezium.vrml.fields.ISField is)
          Add a mapping from a proto interface field to a specific node field, mapping is defined in the ISField.
(package private)  void checkForUnusedInterfaces()
           
abstract  java.lang.String getBuiltInNodeType()
          Get the built in node type for the PROTO or EXTERNPROTO
 java.lang.String getClosestFieldId(java.lang.String test)
          Get the field id closest to the unknown field id parameter
 com.trapezium.vrml.grammar.FieldDescriptor getFieldDescriptor(java.lang.String fieldName)
           
 java.lang.String[] getFieldNames()
          Get a list of field names defined for the PROTO.
 java.lang.String getId()
          Get string identifying PROTO
 int getInterfaceCount(int type)
          Get the number of interface fields of a particular type
 com.trapezium.vrml.fields.Field getInterfaceDeclaration(java.lang.String fieldName)
          Get the interface declaration based on the name of the field.
 java.util.Vector getInterfaceVector()
          Get the vector of interface fields.
 com.trapezium.vrml.fields.ISField getISfield(int offset)
          Get a specific IS field in the PROTOBase
 java.util.Vector getISfields()
          Get the list of ISfields
 Node getNodeAt(int offset)
          Get a specific Node in the PROTO
 java.lang.String getNodeName()
          get the node name, template method, overridden by generated code
 int getNumberISfields()
          Get the number of IS fields in the PROTOBase
 com.trapezium.vrml.Scene getPROTObody()
          Get the Scene representing the body of the PROTO declaration
 Node getPROTONodeType()
          Get the first node of the PROTO, indicate type for the PROTO
 boolean hasUnusedInterfaces()
          Check for unused interfaces
 boolean isValidFieldId(java.lang.String fieldName)
          Is the field name included in the PROTO interface
 void setId(java.lang.String newId)
          Set the id of a PROTO, effectively renaming it.
 
Methods inherited from class com.trapezium.vrml.node.Node
addChildNode, addChildNode, addChildNode, ddump, generatedParent, getBoolean, getBoolValue, getChildNode, getDefaultFieldValue, getDEFparent, getField, getFieldAt, getFieldType, getFieldValue, getFloatArray, getFloatValue, getInterfaceType, getIntValue, getISfield, getLastField, getMFfield, getNode, getNodeValue, getNumberFields, getParent, isBindable, isDEF, isDEForUSE, isFieldUsedByROUTE, isImplicitFieldId, isPROTOnode, isSensor, isUSE, removeChildNode, removeField, setError, setField, setField, setField, setField, vrmlClone
 
Methods inherited from class com.trapezium.vrml.fields.Field
cloneFieldValue, fieldValueTraverse, getFieldId, getFieldType, getFieldValue, getFloat, getInterfaceType, getNodeParent, getNodeValue, isInUse, isISfield, markInUse, setFieldId, setFieldType, setFieldType, setFieldValue
 
Methods inherited from class com.trapezium.vrml.MultipleTokenElement
adjust, getLastTokenOffset, getText, isTraversable, setLastTokenOffset
 
Methods inherited from class com.trapezium.vrml.SingleTokenElement
getFirstTokenOffset, getName, setFirstTokenOffset
 
Methods inherited from class com.trapezium.vrml.VrmlElement
addChild, addWarning, contains, containsErrors, deregisterSelf, dump, dump, dumpUserDefined, getBaseName, getChildAt, getError, getLastChild, getParent, getRoot, getScene, getTokenEnumerator, isScene, numberChildren, removeChild, removeVrmlElement, setParent, traverse, twoPassTraverse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

protoInterface

java.util.Vector protoInterface
a list of the fields in the PROTO interface


isList

java.util.Vector isList
a list of interface fields mapped to node fields via IS syntax


unusedInterfaceCheckComplete

boolean unusedInterfaceCheckComplete
flag to indicate whether or not unused interface existence check done


unusedInterfacesExist

boolean unusedInterfacesExist
Constructor Detail

PROTObase

public PROTObase(int tokenOffset)
Create a PROTO or EXTERNPROTO starting at a token

Method Detail

hasUnusedInterfaces

public boolean hasUnusedInterfaces()
Check for unused interfaces


checkForUnusedInterfaces

void checkForUnusedInterfaces()

addISField

public void addISField(com.trapezium.vrml.fields.ISField is)
Add a mapping from a proto interface field to a specific node field, mapping is defined in the ISField.


getNumberISfields

public int getNumberISfields()
Get the number of IS fields in the PROTOBase


getISfield

public com.trapezium.vrml.fields.ISField getISfield(int offset)
Get a specific IS field in the PROTOBase


getISfields

public java.util.Vector getISfields()
Get the list of ISfields


getFieldDescriptor

public com.trapezium.vrml.grammar.FieldDescriptor getFieldDescriptor(java.lang.String fieldName)

getInterfaceVector

public java.util.Vector getInterfaceVector()
Get the vector of interface fields.


getFieldNames

public java.lang.String[] getFieldNames()
Get a list of field names defined for the PROTO.

Overrides:
getFieldNames in class Node

getPROTObody

public com.trapezium.vrml.Scene getPROTObody()
Get the Scene representing the body of the PROTO declaration


getPROTONodeType

public Node getPROTONodeType()
Get the first node of the PROTO, indicate type for the PROTO


getNodeAt

public Node getNodeAt(int offset)
Get a specific Node in the PROTO


getInterfaceDeclaration

public com.trapezium.vrml.fields.Field getInterfaceDeclaration(java.lang.String fieldName)
Get the interface declaration based on the name of the field. "IS" fields refer to the Field returned by this call.


isValidFieldId

public boolean isValidFieldId(java.lang.String fieldName)
Is the field name included in the PROTO interface

Overrides:
isValidFieldId in class Node

getId

public java.lang.String getId()
Get string identifying PROTO


setId

public void setId(java.lang.String newId)
Set the id of a PROTO, effectively renaming it. Note this does not rename instances.


getNodeName

public java.lang.String getNodeName()
Description copied from class: Node
get the node name, template method, overridden by generated code

Overrides:
getNodeName in class Node

getBuiltInNodeType

public abstract java.lang.String getBuiltInNodeType()
Get the built in node type for the PROTO or EXTERNPROTO


addInterface

public void addInterface(com.trapezium.vrml.fields.Field f)
Add interface declaration to PROTO/EXTERNPROTO interface list

Overrides:
addInterface in class Node

getInterfaceCount

public int getInterfaceCount(int type)
Get the number of interface fields of a particular type

Overrides:
getInterfaceCount in class Node

getClosestFieldId

public java.lang.String getClosestFieldId(java.lang.String test)
Get the field id closest to the unknown field id parameter

Overrides:
getClosestFieldId in class Node