Class 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.
    • Method Detail

      • 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.