fipaos.parser
Interface Parser
- All Known Implementing Classes:
- SLParser
- public interface Parser
This interface should be implemented by parser classes which can deal
with parsing to/from Content objects.
Method Summary |
boolean | canParse(String content) Determines if the Parser implementation can parse the given content |
String | deparse(Content content) This method converts a Content object into a document
which is of a format determined by the Parser implementation. |
String | getParserType() Returns the type of content language that the Parser implementation
handles. |
Content | parse(String content) This method converts a content String into a set of Content objects |
canParse
public boolean canParse(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
deparse
public 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
getParserType
public 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)
parse
public Content parse(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.