Skip to content

Commit 8affdef

Browse files
committed
[WIP] Adding URI resolver for #16.
1 parent 81e184f commit 8affdef

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/main/java/gov/nist/secauto/oscal/lib/profile/resolver/ProfileResolver.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,14 @@ public IDocumentNodeItem resolveProfile(@NonNull File file) throws IOException,
196196
protected IDocumentNodeItem resolveProfile(
197197
@NonNull IDocumentNodeItem profileDocument,
198198
@NonNull Stack<URI> importHistory) throws IOException, ProfileResolutionException {
199+
return resolveProfile(profileDocument, importHistory, profileDocument.getBaseUri());
200+
}
201+
202+
@NonNull
203+
protected IDocumentNodeItem resolveProfile(
204+
@NonNull IDocumentNodeItem profileDocument,
205+
@NonNull Stack<URI> importHistory,
206+
@NonNull URI resolvedCatalogUri) throws IOException, ProfileResolutionException {
199207
Catalog resolvedCatalog = new Catalog();
200208

201209
generateMetadata(resolvedCatalog, profileDocument);
@@ -210,7 +218,7 @@ protected IDocumentNodeItem resolveProfile(
210218
ObjectUtils.notNull(
211219
(IAssemblyClassBinding) OscalBindingContext.instance().getClassBinding(Catalog.class))),
212220
resolvedCatalog,
213-
profileDocument.getBaseUri());
221+
resolvedCatalogUri);
214222
}
215223

216224
@NonNull

0 commit comments

Comments
 (0)