fipaos.parser
Interface Parser

All Known Implementing Classes:
RDFContentHandler, SLParser, XMLContentHandler

public interface Parser

This interface should be implemented by parser classes which can deal with parsing to/from Content objects.


Method Summary
 boolean canParse(java.lang.String content)
          Determines if the Parser implementation can parse the given content
 java.lang.String deparse(Content content)
          This method converts a Content object into a document which is of a format determined by the Parser implementation.
 java.lang.String getParserType()
          Returns the type of content language that the Parser implementation handles.
 Content parse(java.lang.String content)
          This method converts a content String into a set of Content objects
 

Method Detail

deparse

public java.lang.String deparse(Content content)
                         throws ParserException
This method converts a Content object into a document which is of a format determined by the Parser implementation.
Parameters:
content - The Content object to deparse
Returns:
The Stringified representation of the Content object

parse

public Content parse(java.lang.String content)
              throws ParserException
This method converts a content String into a set of Content objects
Parameters:
content - The String to parse into Content objects
Returns:
A Content object representing the content String given.

canParse

public boolean canParse(java.lang.String content)
Determines if the Parser implementation can parse the given content
Parameters:
A - content String.
Returns:
True if the Parser implementation can parse the given String

getParserType

public java.lang.String getParserType()
Returns the type of content language that the Parser implementation handles.
Returns:
A String representation of the content format (e.g. RDF, SL)