Package de.digitalcollections.iiif.model
Class ModelUtilities
- java.lang.Object
-
- de.digitalcollections.iiif.model.ModelUtilities
-
public class ModelUtilities extends Object
Some static utility methods used for (de-)serialization and sanity checks.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classModelUtilities.Completeness
-
Constructor Summary
Constructors Constructor Description ModelUtilities()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ModelUtilities.CompletenessgetCompleteness(Object res, Class<?> type)Obtain the "completeness" (i.e.
-
-
-
Method Detail
-
getCompleteness
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.- Parameters:
res- The IIIF resource to check the completeness oftype- The type of the IIIF resource- Returns:
- the completeness
-
-