public class TEIAdornerResource extends BaseAdornerServerResource
BaseAdornerServerResource.ParameterInfoComparable
HEADERS_KEY, WADLBOOLEAN, WADLINT, WADLSTRING
Constructor and Description |
---|
TEIAdornerResource()
Create a TEIAdorner resource.
|
Modifier and Type | Method and Description |
---|---|
org.restlet.representation.Representation |
adornTEI(org.restlet.representation.Representation representation)
Adorn (or Readorn) TEI file.
|
protected java.util.List<org.restlet.ext.wadl.ParameterInfo> |
describeParameters()
Describe the parameters.
|
protected void |
doInit()
Initialize resource.
|
org.restlet.representation.Representation |
handlePost(org.restlet.representation.Representation representation)
Handle Post request.
|
org.restlet.representation.Representation |
runMorphAdorner(UploadedFileProcessor uploader,
java.lang.String configuration,
boolean tokenizeOnly,
boolean useChoiceForReg,
boolean resultsAsAttachedFile)
Run MorphAdorner to adorn or readorn a TEI file.
|
addCORSHeaders, addStatusCodes, createHtmlRepresentation, describeGet, describePost, doOptions, extractSentences, getBooleanValue, getIntValue, getMessageHeaders, hyphenate, postResults, postResults, postResults, postResults, recognizeLanguage, recognizeLanguage, sortParams, unTag
canDescribe, createWadlRepresentation, describe, describe, describe, describe, describe, describe, describe, describe, describeDelete, describeMethod, describeMethod, describeOptions, describePut, getDescription, getName, getParameter, getParameters, getPreferredWadlVariant, getResourcePath, getResourcesBase, getWadlVariants, isAutoDescribing, options, setAutoDescribing, setDescription, setName
abort, commit, delete, delete, describeVariants, doCatch, doConditionalHandle, doError, doHandle, doHandle, doNegotiatedHandle, get, get, getAttribute, getInfo, getInfo, getOnSent, getPreferredVariant, getVariants, getVariants, handle, hasAnnotations, head, head, isAnnotated, isAutoCommitting, isCommitted, isConditional, isExisting, isInRole, isNegotiated, options, post, post, put, put, redirectPermanent, redirectPermanent, redirectSeeOther, redirectSeeOther, redirectTemporary, redirectTemporary, setAllowedMethods, setAnnotated, setAttribute, setAutoCommitting, setChallengeRequests, setCommitted, setConditional, setCookieSettings, setDimensions, setExisting, setLocationRef, setLocationRef, setNegotiated, setOnSent, setProxyChallengeRequests, setServerInfo, setStatus, setStatus, setStatus, setStatus, updateAllowedMethods, updateDimensions
doError, doRelease, getAllowedMethods, getApplication, getChallengeRequests, getChallengeResponse, getClientInfo, getConditions, getConnegService, getContext, getConverterService, getCookies, getCookieSettings, getDimensions, getHostRef, getLocationRef, getLogger, getMatrix, getMatrixValue, getMaxForwards, getMetadataService, getMethod, getOriginalRef, getProtocol, getProxyChallengeRequests, getProxyChallengeResponse, getQuery, getQueryValue, getRanges, getReference, getReferrerRef, getRequest, getRequestAttributes, getRequestCacheDirectives, getRequestEntity, getResponse, getResponseAttributes, getResponseCacheDirectives, getResponseEntity, getRootRef, getServerInfo, getStatus, getStatusService, init, isConfidential, isLoggable, release, setApplication, setQueryValue, setRequest, setResponse, toObject, toRepresentation, toString
protected void doInit() throws org.restlet.resource.ResourceException
doInit
in class org.restlet.ext.wadl.WadlServerResource
org.restlet.resource.ResourceException
@Post(value="multipart:xml") public org.restlet.representation.Representation handlePost(org.restlet.representation.Representation representation) throws java.lang.Exception
representation
- Input form.java.lang.Exception
- in case of error.public org.restlet.representation.Representation adornTEI(org.restlet.representation.Representation representation) throws java.lang.Exception
representation
- The input form parameters.java.lang.Exception
- In case of error.public org.restlet.representation.Representation runMorphAdorner(UploadedFileProcessor uploader, java.lang.String configuration, boolean tokenizeOnly, boolean useChoiceForReg, boolean resultsAsAttachedFile) throws java.io.IOException, java.lang.IllegalStateException
uploader
- Uploaded file processor.configuration
- MorphAdorner configuration name.tokenizeOnly
- True to only tokenize the input file.
False to fully adorn the input file.useChoiceForReg
- True to uise choice structure to emit
standard spelling.
False to use reg= attribute.resultsAsAttachedFile
- True to return results as
attached file.IOException,
- IllegalStateExceptionjava.io.IOException
java.lang.IllegalStateException
protected java.util.List<org.restlet.ext.wadl.ParameterInfo> describeParameters()
describeParameters
in class BaseAdornerServerResource