Package com.bfo.box
Class C2PA_AssertionIngredient
java.lang.Object
com.bfo.box.Box
com.bfo.box.JUMBox
com.bfo.box.CborContainerBox
com.bfo.box.C2PA_AssertionIngredient
- All Implemented Interfaces:
C2PA_Assertion
A C2PA Assertion for the "c2pa.ingredient" type
- Since:
- 5
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new assertionC2PA_AssertionIngredient
(String label, Json json) Create a new assertion -
Method Summary
Modifier and TypeMethodDescriptionIf this ingredient has a c2pa_manifest value, return the target manifest, or null if it's not specified or can't be foundIf this ingredient has a validationStatus value, return it as a list ofC2PAStatus
Return the specified relationship between this ingredient and the manifest it refers tovoid
setTargetManifest
(String relationship, C2PAManifest manifest, List<C2PAStatus> status) Set this ingredient to refer to the specified manifest.verify()
Verify this assertion, returning a list of status codes describing why this assertion failed or an empty list if it succeeded.Methods inherited from class com.bfo.box.CborContainerBox
cbor, getBox
Methods inherited from class com.bfo.box.Box
add, dump, duplicate, first, fullType, getEncoded, insertBefore, isSparse, length, next, parent, remove, toString, type
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.bfo.box.C2PA_Assertion
asBox, getManifest
-
Constructor Details
-
C2PA_AssertionIngredient
public C2PA_AssertionIngredient()Create a new assertion -
C2PA_AssertionIngredient
Create a new assertion- Parameters:
label
- the label (will default to "c2pa.ingredient" if null)json
- the Json to initialize the assertion with
-
-
Method Details
-
setTargetManifest
Set this ingredient to refer to the specified manifest. The manifest must be already in the samestore
as this one.- Parameters:
relationship
- should be "parentOf" or "componentOf"manifest
- the manifeststatus
- if not null, a list of status codes to be attached asvalidationStatus
.
-
getTargetManifest
If this ingredient has a c2pa_manifest value, return the target manifest, or null if it's not specified or can't be found- Returns:
- the target manifest, or null
-
getValidationStatus
If this ingredient has a validationStatus value, return it as a list ofC2PAStatus
- Returns:
- the list of validation status codes, or an empty list
-
relationship
Return the specified relationship between this ingredient and the manifest it refers to- Returns:
- one of "parentOf", "componentOf"
-
verify
Description copied from interface:C2PA_Assertion
Verify this assertion, returning a list of status codes describing why this assertion failed or an empty list if it succeeded. The default implementation succeeds, and returns an empty list.- Specified by:
verify
in interfaceC2PA_Assertion
- Returns:
- a list of status codes, which may be empty on success
-