Package gov.nist.secauto.oscal.lib
Class OscalUtils
java.lang.Object
gov.nist.secauto.oscal.lib.OscalUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic BackMatter.Resource.RlinkfindMatchingRLink(BackMatter.Resource resource, String preferredMediaType) static StringinternalReferenceFragmentToId(String fragment) Get the id based on a URI's fragment.static StringinternalReferenceFragmentToId(URI fragment) Get the id based on a URI's fragment.static booleanisInternalReference(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)
-