Package org.trellisldp.api
Class BinaryMetadata
- java.lang.Object
-
- org.trellisldp.api.BinaryMetadata
-
public final class BinaryMetadata extends Object
The LDP specification divides resources into two categories: RDF resources and non-RDF resources. Non-RDF resources may also have a corresponding RDF description. These interfaces assume it is the case that Non-RDF resources have an RDF description.For those resources that are non-RDF resources (LDP-NR), the base
Resource
interface will make aBinaryMetadata
object available. The binary content is not accessed directly through theBinaryMetadata
class, but rather an identifier is returned, which may be resolved by an external system.The
BinaryMetadata
class also provides access methods for the MIME Type of the resource.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BinaryMetadata.Builder
A mutable buillder for aBinaryMetadata
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BinaryMetadata.Builder
builder(IRI identifier)
Get a mutable builder for aBinaryMetadata
.Map<String,List<String>>
getHints()
Retrieve any hints for persistence.IRI
getIdentifier()
Retrieve an IRI identifying the location of the binary.Optional<String>
getMimeType()
Retrieve the mime-type of the resource, if one was specified.
-
-
-
Method Detail
-
getIdentifier
public IRI getIdentifier()
Retrieve an IRI identifying the location of the binary.- Returns:
- the resource content
-
getMimeType
public Optional<String> getMimeType()
Retrieve the mime-type of the resource, if one was specified.- Returns:
- the mime-type
-
getHints
public Map<String,List<String>> getHints()
Retrieve any hints for persistence.- Returns:
- the hints
-
builder
public static BinaryMetadata.Builder builder(IRI identifier)
Get a mutable builder for aBinaryMetadata
.- Parameters:
identifier
- the identifier- Returns:
- a builder for a
BinaryMetadata
-
-