public class ModelUtilities extends Object
Some static utility methods used for (de-)serialization and sanity checks.
| Modifier and Type | Class and Description |
|---|---|
static class |
ModelUtilities.Completeness |
| Constructor and Description |
|---|
ModelUtilities() |
| Modifier and Type | Method and Description |
|---|---|
static ModelUtilities.Completeness |
getCompleteness(Object res,
Class<?> type)
Obtain the “completeness” (i.e.
|
public static ModelUtilities.Completeness getCompleteness(Object res, Class<?> type)
Obtain the “completeness” (i.e. “empty”, “id and type”, “it, type and label”, “id only” or “complex”) of a IIIF resource. Can be useful for determining how to serialize the resource, e.g. often resources with only an id are serialized as a string.
res - The IIIF resource to check the completeness oftype - The type of the IIIF resourceCopyright © 2018. All rights reserved.