diff --git a/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/AbstractResolveCommand.java b/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/AbstractResolveCommand.java index f4bfbbe..dec2609 100644 --- a/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/AbstractResolveCommand.java +++ b/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/AbstractResolveCommand.java @@ -16,6 +16,7 @@ import gov.nist.secauto.metaschema.core.metapath.item.node.IDocumentNodeItem; import gov.nist.secauto.metaschema.core.metapath.item.node.INodeItem; import gov.nist.secauto.metaschema.core.util.ObjectUtils; +import gov.nist.secauto.metaschema.core.util.UriUtils; import gov.nist.secauto.metaschema.databind.IBindingContext; import gov.nist.secauto.metaschema.databind.io.DeserializationFeature; import gov.nist.secauto.metaschema.databind.io.Format; @@ -33,6 +34,7 @@ import java.io.IOException; import java.io.PrintStream; import java.net.URI; +import java.net.URISyntaxException; import java.nio.file.Path; import java.util.Collection; import java.util.List; @@ -48,12 +50,19 @@ public abstract class AbstractResolveCommand private static final List EXTRA_ARGUMENTS = ObjectUtils.notNull(List.of( ExtraArgument.newInstance("URI to resolve", true), ExtraArgument.newInstance("destination file", false))); + private static final Option RELATIVE_TO = Option.builder() + .longOpt("relative-to") + .desc("Generate URI references relative to this resource") + .hasArg() + .build(); + @NonNull private static final List