org.nlp2rdf.webservice
Class NIFParameters

java.lang.Object
  extended by org.nlp2rdf.webservice.NIFParameters

public class NIFParameters
extends Object

User: Sebastian Hellmann See http://nlp2rdf.org/nif-1-0#toc-parameters A simple wrapper for the common options in NIF Services Almost fully implements


Constructor Summary
NIFParameters(String text, String prefix, String output, String uriRecipe, String format, com.hp.hpl.jena.ontology.OntModel inputModel, Map<String,String> parameterMap)
           
 
Method Summary
static Map<String,String> copyParameterMap(javax.servlet.http.HttpServletRequest httpServletRequest)
           
static String getDocumentation(String serviceUrl)
           
 String getFormat()
           
 com.hp.hpl.jena.ontology.OntModel getInputModel()
           
static NIFParameters getInstance(javax.servlet.http.HttpServletRequest httpServletRequest)
          Factory method
 String getOutput()
           
 Map<String,String> getParameterMap()
           
 String getPrefix()
           
 String getText()
           
 String getUriRecipe()
           
static boolean isSet(String parameterName, javax.servlet.http.HttpServletRequest hsr)
           
static boolean oneOf(String value, String... possibleValues)
           
static String requiredParameter(String parameterName, javax.servlet.http.HttpServletRequest hsr)
           
static String requiredParameter(String parameterName, javax.servlet.http.HttpServletRequest hsr, String... requiredValues)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NIFParameters

public NIFParameters(String text,
                     String prefix,
                     String output,
                     String uriRecipe,
                     String format,
                     com.hp.hpl.jena.ontology.OntModel inputModel,
                     Map<String,String> parameterMap)
Method Detail

getInstance

public static NIFParameters getInstance(javax.servlet.http.HttpServletRequest httpServletRequest)
Factory method

Parameters:
httpServletRequest -
Returns:

toString

public String toString()
Overrides:
toString in class Object

getText

public String getText()

getInputModel

public com.hp.hpl.jena.ontology.OntModel getInputModel()

getParameterMap

public Map<String,String> getParameterMap()

getPrefix

public String getPrefix()

getUriRecipe

public String getUriRecipe()

getFormat

public String getFormat()

getOutput

public String getOutput()

requiredParameter

public static String requiredParameter(String parameterName,
                                       javax.servlet.http.HttpServletRequest hsr)

requiredParameter

public static String requiredParameter(String parameterName,
                                       javax.servlet.http.HttpServletRequest hsr,
                                       String... requiredValues)

getDocumentation

public static String getDocumentation(String serviceUrl)

oneOf

public static boolean oneOf(String value,
                            String... possibleValues)

isSet

public static boolean isSet(String parameterName,
                            javax.servlet.http.HttpServletRequest hsr)

copyParameterMap

public static Map<String,String> copyParameterMap(javax.servlet.http.HttpServletRequest httpServletRequest)


Copyright © 2011. All Rights Reserved.