Package gov.nist.secauto.oscal.lib
Class OscalUtils
java.lang.Object
gov.nist.secauto.oscal.lib.OscalUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic BackMatter.Resource.Rlink
findMatchingRLink
(BackMatter.Resource resource, String preferredMediaType) static String
internalReferenceFragmentToId
(String fragment) Get the id based on a URI's fragment.static String
internalReferenceFragmentToId
(URI fragment) Get the id based on a URI's fragment.static boolean
isInternalReference
(URI uri)
-
Method Details
-
isInternalReference
-
internalReferenceFragmentToId
Get the id based on a URI's fragment.- Parameters:
fragment
- the URI to extract the identifier from- Returns:
- the identifier
- Throws:
IllegalArgumentException
- if the fragment does not contain an identifier
-
internalReferenceFragmentToId
Get the id based on a URI's fragment.- Parameters:
fragment
- the URI to extract the identifier from- Returns:
- the identifier
- Throws:
IllegalArgumentException
- if the fragment does not contain an identifier
-
findMatchingRLink
@Nullable public static BackMatter.Resource.Rlink findMatchingRLink(@NonNull BackMatter.Resource resource, @Nullable String preferredMediaType)
-