java.lang.Object
org.apache.jena.riot.WebContent
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final String
Accept header when looking for a datasetstatic final String
Accept header when looking for a graphstatic final String
Accept header when looking for a graph or datasetstatic final String
static final String
static final String
static final String
static final String
Java name for UTF-8 encodingstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
contentTypeCanonical
(String contentType) Return our "canonical" name for a Content Type.static Lang
contentTypeToLangResultSet
(String contentType) Map content-type to lang for SPARQL results, with pragmatic adapters.static ContentType
determineCT
(String contentTypeStr, Lang hintLang, String target) Determine the content type to be used, given the target URL, the content-type from Content Negotiation and a hint language.static boolean
static boolean
static boolean
matchContentType
(String ct1, String ct2) static boolean
matchContentType
(ContentType ct1, ContentType ct2) Match content type (ignores charsets and other parameters)
-
Field Details
-
contentTypeTurtle
- See Also:
-
ctTurtle
-
contentTypeTurtleAlt1
- See Also:
-
ctTurtleAlt1
-
contentTypeRDFXML
- See Also:
-
ctRDFXML
-
contentTypeRDFJSON
- See Also:
-
ctRDFJSON
-
contentTypeJSONLD
- See Also:
-
ctJSONLD
-
contentTypeTextPlain
- See Also:
-
ctTextPlain
-
contentTypeNTriples
- See Also:
-
ctNTriples
-
contentTypeNTriplesAlt
- See Also:
-
ctNTriplesAlt
-
contentTypeXML
- See Also:
-
ctXML
-
contentTypeXMLAlt
- See Also:
-
ctXMLAlt
-
contentTypeTriG
- See Also:
-
ctTriG
-
contentTypeNQuads
- See Also:
-
ctNQuads
-
contentTypeTriGAlt1
- See Also:
-
ctTriGAlt1
-
contentTypeRDFProto
- See Also:
-
ctRDFProto
-
contentTypeRDFThrift
- See Also:
-
ctRDFTHRIFT
-
contentTypeNQuadsAlt1
- See Also:
-
ctNQuadsAlt1
-
contentTypeTriX
- See Also:
-
ctTriX
-
contentTypeTriXxml
- See Also:
-
ctTriXxml
-
contentTypeOctets
- See Also:
-
ctOctets
-
contentTypeMultipartMixed
- See Also:
-
ctMultipartMixed
-
contentTypeMultipartFormData
- See Also:
-
ctMultipartFormData
-
contentTypeMultiAlt
- See Also:
-
ctMultiAlt
-
contentTypeN3
- See Also:
-
ctTypeN3
-
contentTypeN3Alt1
- See Also:
-
ctN3Alt1
-
contentTypeN3Alt2
- See Also:
-
ctN3Alt2
-
contentTypeResultsXML
- See Also:
-
ctResultsXML
-
contentTypeResultsJSON
- See Also:
-
ctResultsJSON
-
contentTypeJSON
- See Also:
-
ctJSON
-
contentTypeResultsProtobuf
- See Also:
-
ctResultsProtobuf
-
contentTypeResultsThrift
- See Also:
-
ctResultsThrift
-
contentTypeSPARQLQuery
- See Also:
-
ctSPARQLQuery
-
contentTypeSPARQLUpdate
- See Also:
-
ctSPARQLUpdate
-
contentTypeHTMLForm
- See Also:
-
ctHTMLForm
-
contentTypeHTML
- See Also:
-
ctTextHTML
-
contentTypeTextCSV
- See Also:
-
ctTextCSV
-
contentTypeTextTSV
- See Also:
-
ctTextTSV
-
contentTypeSSE
- See Also:
-
ctSSE
-
contentTypePatch
- See Also:
-
ctPatch
-
contentTypePatchThrift
- See Also:
-
ctPatchThrift
-
charsetUTF8
- See Also:
-
charsetASCII
- See Also:
-
langRDFXML
- See Also:
-
langRDFXMLAbbrev
- See Also:
-
langNTriple
- See Also:
-
langNTriples
- See Also:
-
langN3
- See Also:
-
langTurtle
- See Also:
-
langTTL
- See Also:
-
langRdfJson
- See Also:
-
langNQuads
- See Also:
-
langTriG
- See Also:
-
encodingUTF8
Java name for UTF-8 encoding- See Also:
-
defaultGraphAcceptHeader
Accept header when looking for a graph- See Also:
-
defaultDatasetAcceptHeader
Accept header when looking for a dataset- See Also:
-
defaultRDFAcceptHeader
Accept header when looking for a graph or dataset- See Also:
-
encodingGzip
- See Also:
-
encodingDeflate
- See Also:
-
sparqlResults
-
defaultSparqlResultsHeader
-
sparqlAsk
-
defaultSparqlAskHeader
-
-
Constructor Details
-
WebContent
public WebContent()
-
-
Method Details
-
contentTypeCanonical
Return our "canonical" name for a Content Type. This should be the standard one, no X-*, no alternative names. -
matchContentType
Match content type (ignores charsets and other parameters) -
matchContentType
-
isHtmlForm
-
isMultiPartForm
-
determineCT
Determine the content type to be used, given the target URL, the content-type from Content Negotiation and a hint language. This is a pragmatic balance. A content-type of "text/plain" is ignored - it is too often wrong.
The decision is
Content type (but not text/plain) > hint > file extension.
We make content type (via content negotiation) strongest because a server may return something unexpected because that is all it can do. We are assuming servers don't lie. The "hint" is really a hint just for file extension override.
In the case of no file extension, this reduces to the hint being the default choice if conneg does not produce anything useful.
- Parameters:
contentTypeStr
- Content-Type stringhintLang
- Default languagetarget
- The URL of the target (file extension may be used)- Returns:
- ContentType or null
-
contentTypeToLangResultSet
Map content-type to lang for SPARQL results, with pragmatic adapters.
-