Interface Document
- All Known Implementing Classes:
JsonDocument, RdfDocument
public interface Document
A document that can be processed by the processor.
This can either be
JsonStructure, representing JSON-LD or JSON document,
or RdfDataset
Implemented by JsonDocument, RdfDocument, and provided by DocumentParser.-
Method Summary
Modifier and TypeMethodDescriptionThe Content-Type of the loaded document, exclusive of any optional parameters.The value of the HTTP Link header when profile attribute matcheshttp://www.w3.org/ns/json-ld#context.The finalURIof the loaded document.default Optional<jakarta.json.JsonStructure> Get the document content as parsedJsonStructure.The value of anyprofileparameter retrieved as part of the originalgetContentType().default Optional<RdfDataset> Get the document content as parsedRdfDataset.voidsetContextUrl(URI contextUrl) voidsetDocumentUrl(URI documentUrl)
-
Method Details
-
getContentType
MediaType getContentType()The Content-Type of the loaded document, exclusive of any optional parameters.- Returns:
Content-Typeof the loaded document, nevernull
-
getContextUrl
-
setContextUrl
-
getDocumentUrl
-
setDocumentUrl
-
getProfile
The value of anyprofileparameter retrieved as part of the originalgetContentType().- Returns:
- document profile or
Optional.empty()
-
getJsonContent
Get the document content as parsedJsonStructure.- Returns:
JsonStructureorOptional.empty()if document content is not JSON based
-
getRdfContent
Get the document content as parsedRdfDataset.- Returns:
RdfDatasetorOptional.empty()if document content is not inapplication/n-quadsrepresentation
-