|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.nlp2rdf.webservice.NIFParameters
public class NIFParameters
User: Sebastian Hellmann See http://nlp2rdf.org/nif-1-0#toc-parameters A simple wrapper for the common options in NIF Services Use the following to retrieve the input variable: if (nifParameters.inputWasText()) { String text = nifParameters.getInputAsText() ; }else { OntModel model = getInputAsOntModel(); }
| Constructor Summary | |
|---|---|
NIFParameters(Object input,
Map<String,String> parameterMap,
String prefix,
String uriRecipe,
int contextLength,
String format,
String output)
|
|
| Method Summary | |
|---|---|
static Map<String,String> |
copyParameterMap(javax.servlet.http.HttpServletRequest httpServletRequest)
|
int |
getContextLength()
|
static String |
getDocumentation(String serviceUrl)
|
String |
getFormat()
|
com.hp.hpl.jena.ontology.OntModel |
getInputAsOntModel()
Casts the input var to OntModel |
String |
getInputAsText()
Casts the input var to String |
static NIFParameters |
getInstance(javax.servlet.http.HttpServletRequest httpServletRequest)
Factory method |
String |
getOutput()
|
Map<String,String> |
getParameterMap()
|
String |
getPrefix()
|
String |
getUriRecipe()
|
boolean |
inputWasRDF()
Tests whether the input was RDF in opposition to inputWasText() |
boolean |
inputWasText()
Tests whether the input was text in opposition to inputWasRDF() |
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 |
|---|
public NIFParameters(Object input,
Map<String,String> parameterMap,
String prefix,
String uriRecipe,
int contextLength,
String format,
String output)
| Method Detail |
|---|
public boolean inputWasText()
public boolean inputWasRDF()
public String getInputAsText()
throws ClassCastException
ClassCastException
public com.hp.hpl.jena.ontology.OntModel getInputAsOntModel()
throws ClassCastException
ClassCastExceptionpublic static NIFParameters getInstance(javax.servlet.http.HttpServletRequest httpServletRequest)
httpServletRequest -
public String toString()
toString in class Objectpublic Map<String,String> getParameterMap()
public String getPrefix()
public String getUriRecipe()
public String getFormat()
public String getOutput()
public int getContextLength()
public static String requiredParameter(String parameterName,
javax.servlet.http.HttpServletRequest hsr)
public static String requiredParameter(String parameterName,
javax.servlet.http.HttpServletRequest hsr,
String... requiredValues)
public static String getDocumentation(String serviceUrl)
public static boolean oneOf(String value,
String... possibleValues)
public static boolean isSet(String parameterName,
javax.servlet.http.HttpServletRequest hsr)
public static Map<String,String> copyParameterMap(javax.servlet.http.HttpServletRequest httpServletRequest)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||