1   /*
2    * SPDX-FileCopyrightText: none
3    * SPDX-License-Identifier: CC0-1.0
4    */
5   
6   package gov.nist.secauto.oscal.lib.model.metadata;
7   
8   import java.net.URI;
9   
10  import edu.umd.cs.findbugs.annotations.NonNull;
11  import edu.umd.cs.findbugs.annotations.Nullable;
12  
13  public interface IProperty {
14    @NonNull
15    static URI normalizeNamespace(@Nullable URI namespace) {
16      URI retval = namespace;
17      if (retval == null) {
18        retval = OSCAL_NAMESPACE;
19      }
20      return retval;
21    }
22  
23    @SuppressWarnings("null")
24    @NonNull
25    URI OSCAL_NAMESPACE = URI.create("http://csrc.nist.gov/ns/oscal");
26    @SuppressWarnings("null")
27    @NonNull
28    URI RMF_NAMESPACE = URI.create("http://csrc.nist.gov/ns/rmf");
29  
30    @Nullable
31    String getName();
32  
33    @Nullable
34    URI getNs();
35  
36    boolean isNamespaceEqual(@NonNull URI namespace);
37  }