public class MetaData extends Object
Constructor and Description |
---|
MetaData()
Create metadata without a content type.
|
Modifier and Type | Method and Description |
---|---|
Stream<ILicense> |
approvedLicenses()
Gets the stream of approved licenses that have been matched.
|
boolean |
detectedLicense()
Determines if a matching license has been detected.
|
Document.Type |
getDocumentType()
Gets the document type.
|
org.apache.tika.mime.MediaType |
getMediaType()
Gets the defined media type.
|
String |
getSampleHeader()
Gets the sample header.
|
boolean |
isApproved(ILicense license)
Determine if the license is an approved license.
|
Stream<ILicense> |
licenses()
Gets the stream of licenses that have been matched.
|
void |
removeLicenses(Predicate<ILicense> filter) |
void |
reportOnLicense(ILicense license)
Add the license information to the metadata.
|
void |
setApprovedLicenses(Set<ILicenseFamily> approvedLicenseFamilies)
Sets the set of approved licenses.
|
void |
setDocumentType(Document.Type type)
Sets the document type.
|
void |
setMediaType(org.apache.tika.mime.MediaType mediaType)
Sets the defined media type.
|
void |
setSampleHeader(String sampleHeader)
Sets the sample header.
|
String |
toString() |
Stream<ILicense> |
unapprovedLicenses()
Gets the stream of unapproved licenses that have been matched.
|
public org.apache.tika.mime.MediaType getMediaType()
public void setMediaType(org.apache.tika.mime.MediaType mediaType)
mediaType
- the media type.public boolean detectedLicense()
public void setApprovedLicenses(Set<ILicenseFamily> approvedLicenseFamilies)
approvedLicenseFamilies
- the set of approved license families.public Stream<ILicense> licenses()
public Stream<ILicense> approvedLicenses()
public boolean isApproved(ILicense license)
license
- the license to check;true
if the license is in the list of approved licenses, false
otherwise.public Stream<ILicense> unapprovedLicenses()
public void setSampleHeader(String sampleHeader)
sampleHeader
- the sample header to use.public String getSampleHeader()
public void setDocumentType(Document.Type type)
type
- the document type for the document being recorded.public Document.Type getDocumentType()
public void reportOnLicense(ILicense license)
license
- the license to add metadata for.Copyright © 2006–2024 Apache Software Foundation. All rights reserved.