Class IndividualRequestAnalyzer
- java.lang.Object
-
- edu.cornell.mannlib.vitro.webapp.controller.individual.IndividualRequestAnalyzer
-
public class IndividualRequestAnalyzer extends Object
All sorts of requests are fielded by the IndividualController. Look at this request and figure out what type it is, and what data we need in order to respond.
-
-
Constructor Summary
Constructors Constructor Description IndividualRequestAnalyzer(VitroRequest vreq, IndividualRequestAnalysisContext analysisContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IndividualRequestInfoanalyze()protected ContentTypecheckAcceptHeaderForLinkedDataRequest()Check the accept header.protected ContentTypecheckUrlForLinkedDataRequest()IndividualgetIndividualFromRequest()Gets the entity id from the request.
-
-
-
Constructor Detail
-
IndividualRequestAnalyzer
public IndividualRequestAnalyzer(VitroRequest vreq, IndividualRequestAnalysisContext analysisContext)
-
-
Method Detail
-
analyze
public IndividualRequestInfo analyze()
-
checkAcceptHeaderForLinkedDataRequest
protected ContentType checkAcceptHeaderForLinkedDataRequest()
Check the accept header. This request will trigger a redirect with a 303 ("see also"), because the request is for an individual but the server can only provide a set of bytes.
-
getIndividualFromRequest
public Individual getIndividualFromRequest()
Gets the entity id from the request. Works for the following styles of URLs:/individual?uri=urlencodedURI /individual?netId=bdc34 /individual?netid=bdc34 /individual/localname /display/localname /individual/localname/localname.rdf /individual/localname/localname.n3 /individual/localname/localname.ttl /individual/localname/localname.jsonld- Returns:
- null on failure.
-
checkUrlForLinkedDataRequest
protected ContentType checkUrlForLinkedDataRequest()
- Returns:
- null if this is not a linked data request, returns content type if it is a linked data request. These are Vitro-specific ways of requesting rdf, unrelated to semantic web standards. They do not trigger a redirect with a 303, because the request is for a set of bytes rather than an individual.
-
-