Package xj3d.filter.filters
Class RemoveNodeFilter
java.lang.Object
xj3d.filter.AbstractFilter
xj3d.filter.NewAbstractFilter
xj3d.filter.filters.RemoveNodeFilter
- All Implemented Interfaces:
BinaryContentHandler,ContentHandler,ProtoHandler,RouteHandler,ScriptHandler,StringContentHandler
Removes a node from a stream.
- Version:
- $Revision: 1.0 $
- Author:
- Alan Hudson
-
Field Summary
FieldsFields inherited from class xj3d.filter.NewAbstractFilter
fieldHasEndedImplicitly, parentTypeStack, suppressCallsFields inherited from class xj3d.filter.AbstractFilter
contentHandler, documentLocator, errorHandler, fieldHandler, fieldReader, fieldStack, lastErrorCode, majorVersion, minorVersion, nodeStack, parsingType, protoHandler, routeHandler, scriptHandler -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidendNode()Notification of the end of a node declaration.voidfieldValue(boolean value) Set the value of the field at the given index as an boolean.voidfieldValue(boolean[] value, int len) Set the value of the field at the given index as an array of boolean.voidfieldValue(double value) Set the value of the field at the given index as an double.voidfieldValue(double[] value, int len) Set the value of the field at the given index as an array of doubles.voidfieldValue(float value) Set the value of the field at the given index as a float.voidfieldValue(float[] value, int len) Set the value of the field at the given index as an array of floats.voidfieldValue(int value) Set the value of the field at the given index as an integer.voidfieldValue(int[] value, int len) Set the value of the field at the given index as an array of integers.voidfieldValue(long value) Set the value of the field at the given index as an long.voidfieldValue(long[] value, int len) Set the value of the field at the given index as an array of longs.voidfieldValue(String value) The value of a normal field.voidfieldValue(String[] values) The value of an MFField where the underlying parser knows about how the values are broken up.voidfieldValue(String[] value, int len) Set the value of the field at the given index as an array of strings.voidsetArguments(String[] args) Set the argument parameters to control the filter operation.voidstartField(String name) Notification of a field declaration.voidNotification of the start of a node.voidThe field value is a USE for the given node name.Methods inherited from class xj3d.filter.NewAbstractFilter
componentDecl, endDocument, endExternProtoDecl, endField, endProtoBody, endProtoDecl, endScriptDecl, exportDecl, externProtoURI, getContentHandler, getErrorReporter, getLastErrorCode, getProtoHandler, getRouteHandler, getScriptHandler, importDecl, metaDecl, profileDecl, protoFieldDecl, protoIsDecl, routeDecl, scriptFieldDecl, setContentHandler, setDebug, setDocumentLocator, setErrorReporter, setProtoHandler, setRouteHandler, setScriptHandler, startDocument, startExternProtoDecl, startProtoBody, startProtoDecl, startScriptDecl, suppressCallsMethods inherited from class xj3d.filter.AbstractFilter
setParsingType
-
Field Details
-
defStack
A stack of node def names
-
-
Constructor Details
-
RemoveNodeFilter
public RemoveNodeFilter()Basic constructor.
-
-
Method Details
-
startNode
Notification of the start of a node. This is the opening statement of a node and it's DEF name. USE declarations are handled in a separate method.- Specified by:
startNodein interfaceContentHandler- Overrides:
startNodein classNewAbstractFilter- Parameters:
name- The name of the node that we are about to parsedefName- The string associated with the DEF name. Null if not given for this node.- Throws:
SAVException- This call is taken at the wrong time in the structure of the document.VRMLException- This call is taken at the wrong time in the structure of the document.
-
startField
Notification of a field declaration. This notification is only called if it is a standard node. If the node is a script or PROTO declaration then theScriptHandlerorProtoHandlermethods are used.- Specified by:
startFieldin interfaceContentHandler- Overrides:
startFieldin classNewAbstractFilter- Parameters:
name- The name of the field declared- Throws:
SAVException- This call is taken at the wrong time in the structure of the documentVRMLException- The content provided is invalid for this part of the document or can't be parsed
-
fieldValue
The value of a normal field. This is a string that represents the entire value of the field. MFStrings will have to be parsed. This is a terminating call for startField as well. The next call will either be anotherstartField()orendNode().If this field is an SFNode with a USE declaration you will have the
useDecl(String)method called rather than this method.- Specified by:
fieldValuein interfaceBinaryContentHandler- Specified by:
fieldValuein interfaceStringContentHandler- Overrides:
fieldValuein classNewAbstractFilter- Parameters:
value- The value of this field- Throws:
SAVException- This call is taken at the wrong time in the structure of the documentVRMLException- The content provided is invalid for this part of the document or can't be parsed
-
fieldValue
The value of an MFField where the underlying parser knows about how the values are broken up. The parser is not required to support this callback, but implementors of this interface should understand it. The most likely time we will have this method called is for MFString or URL lists. If called, it is guaranteed to split the strings along the SF node type boundaries.- Specified by:
fieldValuein interfaceStringContentHandler- Overrides:
fieldValuein classNewAbstractFilter- Parameters:
values- The list of string representing the values- Throws:
SAVException- This call is taken at the wrong time in the structure of the documentVRMLException- The content provided is invalid for this part of the document or can't be parsed
-
fieldValue
Set the value of the field at the given index as an integer. This would be used to set SFInt32 field types.- Specified by:
fieldValuein interfaceBinaryContentHandler- Overrides:
fieldValuein classNewAbstractFilter- Parameters:
value- The new value to use for the node- Throws:
SAVException- This call is taken at the wrong time in the structure of the document.VRMLException- This call is taken at the wrong time in the structure of the document.
-
fieldValue
Set the value of the field at the given index as an array of integers. This would be used to set MFInt32 field types.- Specified by:
fieldValuein interfaceBinaryContentHandler- Overrides:
fieldValuein classNewAbstractFilter- Parameters:
value- The new value to use for the nodelen- The number of valid entries in the value array- Throws:
SAVException- This call is taken at the wrong time in the structure of the document.VRMLException- This call is taken at the wrong time in the structure of the document.
-
fieldValue
Set the value of the field at the given index as an boolean. This would be used to set SFBool field types.- Specified by:
fieldValuein interfaceBinaryContentHandler- Overrides:
fieldValuein classNewAbstractFilter- Parameters:
value- The new value to use for the node- Throws:
SAVException- This call is taken at the wrong time in the structure of the document.VRMLException- This call is taken at the wrong time in the structure of the document.
-
fieldValue
Set the value of the field at the given index as an array of boolean. This would be used to set MFBool field types.- Specified by:
fieldValuein interfaceBinaryContentHandler- Overrides:
fieldValuein classNewAbstractFilter- Parameters:
value- The new value to use for the nodelen- The number of valid entries in the value array- Throws:
SAVException- This call is taken at the wrong time in the structure of the document.VRMLException- This call is taken at the wrong time in the structure of the document.
-
fieldValue
Set the value of the field at the given index as a float. This would be used to set SFFloat field types.- Specified by:
fieldValuein interfaceBinaryContentHandler- Overrides:
fieldValuein classNewAbstractFilter- Parameters:
value- The new value to use for the node- Throws:
SAVException- This call is taken at the wrong time in the structure of the document.VRMLException- This call is taken at the wrong time in the structure of the document.
-
fieldValue
Set the value of the field at the given index as an array of floats. This would be used to set MFFloat, SFVec2f, SFVec3f and SFRotation field types.- Specified by:
fieldValuein interfaceBinaryContentHandler- Overrides:
fieldValuein classNewAbstractFilter- Parameters:
value- The new value to use for the nodelen- The number of valid entries in the value array- Throws:
SAVException- This call is taken at the wrong time in the structure of the document.VRMLException- This call is taken at the wrong time in the structure of the document.
-
fieldValue
Set the value of the field at the given index as an long. This would be used to set SFTime field types.- Specified by:
fieldValuein interfaceBinaryContentHandler- Overrides:
fieldValuein classNewAbstractFilter- Parameters:
value- The new value to use for the node- Throws:
SAVException- This call is taken at the wrong time in the structure of the document.VRMLException- This call is taken at the wrong time in the structure of the document.
-
fieldValue
Set the value of the field at the given index as an array of longs. This would be used to set MFTime field types.- Specified by:
fieldValuein interfaceBinaryContentHandler- Overrides:
fieldValuein classNewAbstractFilter- Parameters:
value- The new value to use for the nodelen- The number of valid entries in the value array- Throws:
SAVException- This call is taken at the wrong time in the structure of the document.VRMLException- This call is taken at the wrong time in the structure of the document.
-
fieldValue
Set the value of the field at the given index as an double. This would be used to set SFDouble field types.- Specified by:
fieldValuein interfaceBinaryContentHandler- Overrides:
fieldValuein classNewAbstractFilter- Parameters:
value- The new value to use for the node- Throws:
SAVException- This call is taken at the wrong time in the structure of the document.VRMLException- This call is taken at the wrong time in the structure of the document.
-
fieldValue
Set the value of the field at the given index as an array of doubles. This would be used to set MFDouble, SFVec2d and SFVec3d field types.- Specified by:
fieldValuein interfaceBinaryContentHandler- Overrides:
fieldValuein classNewAbstractFilter- Parameters:
value- The new value to use for the nodelen- The number of valid entries in the value array- Throws:
SAVException- This call is taken at the wrong time in the structure of the document.VRMLException- This call is taken at the wrong time in the structure of the document.
-
fieldValue
Set the value of the field at the given index as an array of strings. This would be used to set MFString field types.- Specified by:
fieldValuein interfaceBinaryContentHandler- Overrides:
fieldValuein classNewAbstractFilter- Parameters:
value- The new value to use for the nodelen- The number of valid entries in the value array- Throws:
SAVException- This call is taken at the wrong time in the structure of the document.VRMLException- This call is taken at the wrong time in the structure of the document.
-
useDecl
The field value is a USE for the given node name. This is a terminating call for startField as well. The next call will either be anotherstartField()orendNode().- Specified by:
useDeclin interfaceContentHandler- Overrides:
useDeclin classNewAbstractFilter- Parameters:
defName- The name of the DEF string to use- Throws:
SAVException- This call is taken at the wrong time in the structure of the document.VRMLException- This call is taken at the wrong time in the structure of the document.
-
endNode
Notification of the end of a node declaration.- Specified by:
endNodein interfaceContentHandler- Overrides:
endNodein classNewAbstractFilter- Throws:
SAVException- This call is taken at the wrong time in the structure of the document.VRMLException- This call is taken at the wrong time in the structure of the document.
-
setArguments
Set the argument parameters to control the filter operation.- Overrides:
setArgumentsin classNewAbstractFilter- Parameters:
args- The array of argument parameters.
-