Skip to content

Commit 01a0a85

Browse files
committed
feat: Convenience method to check for representation media type.
1 parent f10296c commit 01a0a85

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/foundation/identity/did/representations/Representations.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ public class Representations {
4141
didDocumentConsumers.put(RepresentationConsumerCBOR.getInstance().getMediaType(), RepresentationConsumerCBOR.getInstance());
4242
}
4343

44+
public static boolean isRepresentationMediaType(String mediaType) {
45+
return MEDIA_TYPES.contains(mediaType);
46+
}
47+
4448
public static RepresentationProducer getProducer(String mediaType) {
4549
return didDocumentProducers.get(mediaType);
4650
}

0 commit comments

Comments
 (0)