com.hp.hpl.jena.sparql.lang
Class ParserRegistry

java.lang.Object
  extended by com.hp.hpl.jena.sparql.lang.ParserRegistry

public class ParserRegistry
extends Object

original code - contribution from Olaf Hartig


Method Summary
 void add(Syntax syntax, ParserFactory f)
          Register the given parser factory for the specified syntax.
static void addFactory(Syntax syntax, ParserFactory f)
          Register the given parser factory for the specified syntax.
 boolean containsFactory(Syntax syntax)
          Checks whether a parser factory is registered for the given syntax
static boolean containsParserFactory(Syntax syntax)
          Checks whether a parser factory is registered for the given syntax
 Parser createParser(Syntax syntax)
          Return a suitable parser for the given syntax
static ParserFactory findFactory(Syntax syntax)
          Return a suitable factory for the given syntax
static ParserRegistry get()
           
 ParserFactory getFactory(Syntax syntax)
          Return a suitable parser factory for the given syntax
static Parser parser(Syntax syntax)
          Return a suitable parser for the given syntax
 void remove(Syntax syntax)
          Unregister the parser factory associated with the given syntax
static void removeFactory(Syntax syntax)
          Unregister the parser factory associated with the given syntax
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

get

public static ParserRegistry get()

findFactory

public static ParserFactory findFactory(Syntax syntax)
Return a suitable factory for the given syntax

Parameters:
syntax - the syntax to be processed
Returns:
a parser factory or null if none accept the request

parser

public static Parser parser(Syntax syntax)
Return a suitable parser for the given syntax

Parameters:
syntax - the syntax to be processed
Returns:
a parser or null if none accept the request

getFactory

public ParserFactory getFactory(Syntax syntax)
Return a suitable parser factory for the given syntax

Parameters:
syntax - the syntax to be processed
Returns:
a parser factory or null if none accept the request

createParser

public Parser createParser(Syntax syntax)
Return a suitable parser for the given syntax

Parameters:
syntax - the syntax to be processed
Returns:
a parser or null if none accept the request

addFactory

public static void addFactory(Syntax syntax,
                              ParserFactory f)
Register the given parser factory for the specified syntax. If another factory is registered for the syntax it is replaced by the given one.


add

public void add(Syntax syntax,
                ParserFactory f)
Register the given parser factory for the specified syntax. If another factory is registered for the syntax it is replaced by the given one.


removeFactory

public static void removeFactory(Syntax syntax)
Unregister the parser factory associated with the given syntax


remove

public void remove(Syntax syntax)
Unregister the parser factory associated with the given syntax


containsParserFactory

public static boolean containsParserFactory(Syntax syntax)
Checks whether a parser factory is registered for the given syntax


containsFactory

public boolean containsFactory(Syntax syntax)
Checks whether a parser factory is registered for the given syntax



Licenced under the Apache License, Version 2.0