Package com.apicatalog.jsonld.document
Class RdfDocument
- java.lang.Object
-
- com.apicatalog.jsonld.document.RdfDocument
-
- All Implemented Interfaces:
Document
@Deprecated public final class RdfDocument extends java.lang.Object implements Document
Deprecated.since 1.7.0 - use an alternative RDF primitives library.This class is deprecated as of version 1.7.0.Please use Titanium RDF Primitives or any other third-party library to materialize RDF primitives.
- See Also:
- Titanium RDF Primitives, Titanium RDF N-QUADS
-
-
Field Summary
Fields Modifier and Type Field Description private MediaTypecontentTypeDeprecated.private java.net.URIcontentUrlDeprecated.private RdfDatasetdatasetDeprecated.private java.net.URIdocumentUrlDeprecated.private java.lang.StringprofileDeprecated.
-
Constructor Summary
Constructors Modifier Constructor Description privateRdfDocument(MediaType type, java.lang.String profile, RdfDataset dataset)Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static booleanaccepts(MediaType contentType)Deprecated.private static voidassertContentType(MediaType contentType)Deprecated.MediaTypegetContentType()Deprecated.The Content-Type of the loaded document, exclusive of any optional parameters.java.net.URIgetContextUrl()Deprecated.The value of the HTTP Link header when profile attribute matcheshttp://www.w3.org/ns/json-ld#context.java.net.URIgetDocumentUrl()Deprecated.The finalURIof the loaded document.java.util.Optional<java.lang.String>getProfile()Deprecated.The value of anyprofileparameter retrieved as part of the originalDocument.getContentType().java.util.Optional<RdfDataset>getRdfContent()Deprecated.Retrieves the document content as a parsedRdfDataset.static Documentof(MediaType contentType, RdfDataset dataset)Deprecated.Create a new document fromRdfDataset.static RdfDocumentof(MediaType type, java.io.InputStream is)Deprecated.static Documentof(MediaType type, java.io.Reader reader)Deprecated.static Documentof(RdfDataset dataset)Deprecated.Create a new document fromRdfDataset.static RdfDocumentof(java.io.InputStream is)Deprecated.Create a new document from content provided byInputStream.static Documentof(java.io.Reader reader)Deprecated.Create a new document from content provided byReader.voidsetContextUrl(java.net.URI contextUrl)Deprecated.voidsetDocumentUrl(java.net.URI documentUrl)Deprecated.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.apicatalog.jsonld.document.Document
getJsonContent
-
-
-
-
Field Detail
-
contentType
private final MediaType contentType
Deprecated.
-
dataset
private final RdfDataset dataset
Deprecated.
-
profile
private final java.lang.String profile
Deprecated.
-
documentUrl
private java.net.URI documentUrl
Deprecated.
-
contentUrl
private java.net.URI contentUrl
Deprecated.
-
-
Constructor Detail
-
RdfDocument
private RdfDocument(MediaType type, java.lang.String profile, RdfDataset dataset)
Deprecated.
-
-
Method Detail
-
of
public static final Document of(RdfDataset dataset)
Deprecated.Create a new document fromRdfDataset. SetsMediaType.N_QUADSas the content type.- Parameters:
dataset- representing parsed RDF content- Returns:
Documentrepresenting RDF document
-
of
public static final Document of(MediaType contentType, RdfDataset dataset)
Deprecated.Create a new document fromRdfDataset.- Parameters:
contentType- reflecting the providedRdfDataset, onlyMediaType.N_QUADSis supporteddataset- representing parsed RDF content- Returns:
Documentrepresenting RDF document
-
of
public static final RdfDocument of(java.io.InputStream is) throws JsonLdError
Deprecated.Create a new document from content provided byInputStream. SetsMediaType.N_QUADSas the content type.- Parameters:
is- representing parsed RDF content- Returns:
Documentrepresenting RDF document- Throws:
JsonLdError
-
of
public static final RdfDocument of(MediaType type, java.io.InputStream is) throws JsonLdError
Deprecated.- Throws:
JsonLdError
-
of
public static final Document of(java.io.Reader reader) throws JsonLdError
Deprecated.Create a new document from content provided byReader. SetsMediaType.N_QUADSas the content type.- Parameters:
reader- providing RDF content- Returns:
Documentrepresenting RDF document- Throws:
JsonLdError
-
of
public static final Document of(MediaType type, java.io.Reader reader) throws JsonLdError
Deprecated.- Throws:
JsonLdError
-
accepts
public static final boolean accepts(MediaType contentType)
Deprecated.
-
assertContentType
private static final void assertContentType(MediaType contentType)
Deprecated.
-
getContentType
public MediaType getContentType()
Deprecated.Description copied from interface:DocumentThe Content-Type of the loaded document, exclusive of any optional parameters.- Specified by:
getContentTypein interfaceDocument- Returns:
Content-Typeof the loaded document, nevernull
-
getContextUrl
public java.net.URI getContextUrl()
Deprecated.Description copied from interface:DocumentThe value of the HTTP Link header when profile attribute matcheshttp://www.w3.org/ns/json-ld#context.- Specified by:
getContextUrlin interfaceDocument- Returns:
- attached
URIreferencing document context ornullif not available
-
setContextUrl
public void setContextUrl(java.net.URI contextUrl)
Deprecated.- Specified by:
setContextUrlin interfaceDocument
-
getDocumentUrl
public java.net.URI getDocumentUrl()
Deprecated.Description copied from interface:DocumentThe finalURIof the loaded document.- Specified by:
getDocumentUrlin interfaceDocument- Returns:
URIof the loaded document ornullif not available
-
setDocumentUrl
public void setDocumentUrl(java.net.URI documentUrl)
Deprecated.- Specified by:
setDocumentUrlin interfaceDocument
-
getProfile
public java.util.Optional<java.lang.String> getProfile()
Deprecated.Description copied from interface:DocumentThe value of anyprofileparameter retrieved as part of the originalDocument.getContentType().- Specified by:
getProfilein interfaceDocument- Returns:
- document profile or
Optional.empty()
-
getRdfContent
public java.util.Optional<RdfDataset> getRdfContent()
Deprecated.Description copied from interface:DocumentRetrieves the document content as a parsedRdfDataset.If the document content is not in the
application/n-quadsrepresentation,Optional.empty()is returned.- Specified by:
getRdfContentin interfaceDocument- Returns:
- an
Optionalcontaining theRdfDatasetif the content is valid, orOptional.empty()if the document content is not inapplication/n-quadsformat
-
-