class JSON::LD::API::RemoteDocument
A {RemoteDocument} is returned from a {documentLoader}.
Attributes
contentType[R]
The Content-Type of the loaded document, exclusive of any optional parameters. @return [String]
contextUrl[RW]
@return [String]
The URL of a remote context as specified by an HTTP Link header with rel=`http://www.w3.org/ns/json-ld#context`
document[RW]
The parsed retrieved document. @return [Array<Hash>, Hash]
documentUrl[RW]
The final URL of the loaded document. This is important to handle HTTP redirects properly. @return [String]
profile[RW]
The value of any profile parameter retrieved as part of the original contentType. @return [String]
Public Class Methods
new(document, documentUrl: nil, contentType: nil, contextUrl: nil, profile: nil, **options)
click to toggle source
@param [RDF::Util::File::RemoteDocument] document @param [String] documentUrl
The final URL of the loaded document. This is important to handle HTTP redirects properly.
@param [String] contentType
The Content-Type of the loaded document, exclusive of any optional parameters.
@param [String] contextUrl
The URL of a remote context as specified by an HTTP Link header with rel=`http://www.w3.org/ns/json-ld#context`
@param [String] profile
The value of any profile parameter retrieved as part of the original contentType.
@option options [Hash{Symbol => Object}] options
# File lib/json/ld/api.rb, line 842 def initialize(document, documentUrl: nil, contentType: nil, contextUrl: nil, profile: nil, **options) @document = document @documentUrl = documentUrl || options[:base_uri] @contentType = contentType || options[:content_type] @contextUrl = contextUrl @profile = profile end