org.das2.dasml.DasMLValidator

A validator for the dasML language developed for the University of Iowa Space Plasma Wave Group. This class is used as a pre-processor to (hopefully) provide clear and helpful error messages. Warning: This class is not thread-safe. Unexpected results can occur if multiple threads use an instance of this class concurrently.

DasMLValidator( )

Creates a new instance of DasMLValidator


INTEGER_PATTERN


WINDOW_POSITION_PATTERN


FLOAT_PATTERN


endDocument

endDocument( ) → void

Receive notification of the end of the document.

Returns:

void (returns nothing)

See Also:

org.xml.sax.ContentHandler#endDocument


[search for examples] [view on GitHub] [view on old javadoc] [view source]


endElement

endElement( String uri, String localName, String qName ) → void

Parameters

uri - a String
localName - a String
qName - a String

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


error

error( org.xml.sax.SAXParseException e ) → void

Receive notification of a recoverable parser error.

Parameters

e - The warning information encoded as an exception.

Returns:

void (returns nothing)

See Also:

org.xml.sax.ErrorHandler#warning
org.xml.sax.SAXParseException


[search for examples] [view on GitHub] [view on old javadoc] [view source]


fatalError

fatalError( org.xml.sax.SAXParseException e ) → void

Report a fatal XML parsing error.

Parameters

e - The error information encoded as an exception.

Returns:

void (returns nothing)

See Also:

org.xml.sax.ErrorHandler#fatalError
org.xml.sax.SAXParseException


[search for examples] [view on GitHub] [view on old javadoc] [view source]


getLastError

getLastError( ) → SAXException

Returns the last error encountered by this validator or null if no error has been found. This method will only return an error if the last call to validate(InputSource, ErrorHandler) returned false. If an application wishes to have access to warnings and non-fatal errors then an ErrorHandler must be provided.

Returns:

the last error.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


main

main( java.lang.String[] args ) → void

Parameters

args - a java.lang.String[]

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


setDocumentLocator

setDocumentLocator( org.xml.sax.Locator locator ) → void

Receive a Locator object for document events.

Parameters

locator - A locator for all SAX document events.

Returns:

void (returns nothing)

See Also:

org.xml.sax.ContentHandler#setDocumentLocator
org.xml.sax.Locator


[search for examples] [view on GitHub] [view on old javadoc] [view source]


startDocument

startDocument( ) → void

Receive notification of the beginning of the document.

Returns:

void (returns nothing)

See Also:

org.xml.sax.ContentHandler#startDocument


[search for examples] [view on GitHub] [view on old javadoc] [view source]


startElement

startElement( String uri, String localName, String qName, org.xml.sax.Attributes attributes ) → void

Receive notification of the start of an element.

Parameters

uri - a String
localName - a String
qName - The element type name.
attributes - The specified or defaulted attributes.

Returns:

void (returns nothing)

See Also:

org.xml.sax.ContentHandler#startElement


[search for examples] [view on GitHub] [view on old javadoc] [view source]


validate

validate( org.xml.sax.InputSource source, org.xml.sax.ErrorHandler errorHandler ) → boolean

Parses and validates a dasML document. All errors are passed to the ErrorHandler instance specified. SAXExceptions thrown by the underlying parser are caught and suppressed by this method. If an application needs access to the errors, an ErrorHandler must be provided.

Parameters

source - The source of the XML document
errorHandler - The ErrorHandler instance that will receive error messages from the parser. This can be null

Returns:

true if the document is a valid dasML document.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


warning

warning( org.xml.sax.SAXParseException e ) → void

Receive notification of a parser warning.

Parameters

e - The warning information encoded as an exception.

Returns:

void (returns nothing)

See Also:

org.xml.sax.ErrorHandler#warning
org.xml.sax.SAXParseException


[search for examples] [view on GitHub] [view on old javadoc] [view source]