3333public class Metadata {
3434
3535 private final URI storage ;
36- private final Set <URI > type = new HashSet <>();
36+ private final Set <URI > types = new HashSet <>();
3737 private final Map <String , Set <String >> wacAllow = new HashMap <>();
3838 private final Set <String > allowedMethods = new HashSet <>();
3939 private final Set <String > allowedPatchSyntaxes = new HashSet <>();
@@ -57,9 +57,23 @@ public Optional<URI> getStorage() {
5757 * {@code rdf:type} data explicitly set on a resource.
5858 *
5959 * @return the type values for a resource
60+ * @deprecated as of Beta3, please use the {@link #getTypes} method
6061 */
62+ @ Deprecated
6163 public Set <URI > getType () {
62- return type ;
64+ return getTypes ();
65+ }
66+
67+ /**
68+ * The Solid Resource types.
69+ *
70+ * <p>This data typically comes from HTTP Link headers and may be different than
71+ * {@code rdf:type} data explicitly set on a resource.
72+ *
73+ * @return the type values for a resource
74+ */
75+ public Set <URI > getTypes () {
76+ return types ;
6377 }
6478
6579 /**
@@ -258,7 +272,7 @@ public Builder contentType(final String type) {
258272 public Metadata build () {
259273 final Metadata metadata = new Metadata (builderStorage , builderContentType );
260274 metadata .wacAllow .putAll (builderWacAllow );
261- metadata .type .addAll (builderType );
275+ metadata .types .addAll (builderType );
262276 metadata .allowedMethods .addAll (builderAllowedMethods );
263277 metadata .allowedPatchSyntaxes .addAll (builderAllowedPatchSyntaxes );
264278 metadata .allowedPostSyntaxes .addAll (builderAllowedPostSyntaxes );
0 commit comments