Package xj3d.filter.filters
Class URLFullyQualifyFilter
java.lang.Object
xj3d.filter.AbstractFilter
xj3d.filter.filters.URLFullyQualifyFilter
- All Implemented Interfaces:
BinaryContentHandler
,ContentHandler
,ProtoHandler
,RouteHandler
,ScriptHandler
,StringContentHandler
Fully qualify all relative urls in a file.
Filter Options
-baseURL - The base url to use to qualify urls
- Version:
- $Revision: 1.2 $
- Author:
- Alan Hudson
-
Field Summary
Fields 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 TypeMethodDescriptionvoid
endField()
Notification of the end of a field declaration.void
fieldValue
(String value) The value of a normal field.void
fieldValue
(String[] values) The value of an MFField where the underlying parser knows about how the values are broken up.void
fieldValue
(String[] values, int len) The value of an MFField where the underlying parser knows about how the values are broken up.void
setArguments
(String[] arg) Set the argument parameters to control the filter operationvoid
startField
(String name) Notification of a field declaration.Methods inherited from class xj3d.filter.AbstractFilter
componentDecl, endDocument, endExternProtoDecl, endNode, endProtoBody, endProtoDecl, endScriptDecl, exportDecl, externProtoURI, fieldValue, fieldValue, fieldValue, fieldValue, fieldValue, fieldValue, fieldValue, fieldValue, fieldValue, fieldValue, getContentHandler, getErrorReporter, getLastErrorCode, getProtoHandler, getRouteHandler, getScriptHandler, importDecl, metaDecl, profileDecl, protoFieldDecl, protoIsDecl, routeDecl, scriptFieldDecl, setContentHandler, setDocumentLocator, setErrorReporter, setParsingType, setProtoHandler, setRouteHandler, setScriptHandler, startDocument, startExternProtoDecl, startNode, startProtoBody, startProtoDecl, startScriptDecl, useDecl
-
Constructor Details
-
URLFullyQualifyFilter
public URLFullyQualifyFilter()Create an instance of the filter.
-
-
Method Details
-
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 theScriptHandler
orProtoHandler
methods are used.- Specified by:
startField
in interfaceContentHandler
- Overrides:
startField
in classAbstractFilter
- Parameters:
name
- The name of the field declared- 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.
-
endField
Notification of the end of a field declaration. This is called only at the end of an MFNode declaration. All other fields are terminated by eitherAbstractFilter.useDecl(String)
orfieldValue(String)
. This will only ever be called if there have been nodes declared. If no nodes have been declared (ie "[]") then you will get afieldValue()
. call with the parameter value of null.- Specified by:
endField
in interfaceContentHandler
- Overrides:
endField
in classAbstractFilter
- 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
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
AbstractFilter.useDecl(String)
method called rather than this method.- Specified by:
fieldValue
in interfaceBinaryContentHandler
- Specified by:
fieldValue
in interfaceStringContentHandler
- Overrides:
fieldValue
in classAbstractFilter
- 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:
fieldValue
in interfaceStringContentHandler
- Overrides:
fieldValue
in classAbstractFilter
- 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
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:
fieldValue
in interfaceBinaryContentHandler
- Overrides:
fieldValue
in classAbstractFilter
- Parameters:
values
- The list of string representing the valueslen
- The number of valid entries in the value array- 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
-
setArguments
Set the argument parameters to control the filter operation- Overrides:
setArguments
in classAbstractFilter
- Parameters:
arg
- The array of argument parameters.
-