Skip to content

Commit

Permalink
Adjusted schema names to use generated OSCAL schemas bundled with lib…
Browse files Browse the repository at this point in the history
…oscal-java.
  • Loading branch information
david-waltermire committed Aug 29, 2023
1 parent d612448 commit 46609eb
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ protected List<Source> getOscalXmlSchemas() throws IOException {
List<Source> retval = new LinkedList<>();
retval.add(
XmlUtil.getStreamSource(ObjectUtils.requireNonNull(
OscalBindingContext.class.getResource("/schema/xml/oscal_assessment-plan_schema.xsd"))));
OscalBindingContext.class.getResource("/schema/xml/oscal-ap_schema.xsd"))));
return CollectionUtil.unmodifiableList(retval);
}

@Override
protected JSONObject getOscalJsonSchema() throws IOException {
try (InputStream is = ObjectUtils.requireNonNull(
OscalBindingContext.class.getResourceAsStream("/schema/json/oscal_assessment-plan_schema.json"))) {
OscalBindingContext.class.getResourceAsStream("/schema/json/oscal-ap_schema.json"))) {
return JsonUtil.toJsonObject(is);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ protected List<Source> getOscalXmlSchemas() throws IOException {
List<Source> retval = new LinkedList<>();
retval.add(
XmlUtil.getStreamSource(ObjectUtils.requireNonNull(
OscalBindingContext.class.getResource("/schema/xml/oscal_assessment-results_schema.xsd"))));
OscalBindingContext.class.getResource("/schema/xml/oscal-ar_schema.xsd"))));
return CollectionUtil.unmodifiableList(retval);
}

@Override
protected JSONObject getOscalJsonSchema() throws IOException {
try (InputStream is = ObjectUtils.requireNonNull(
OscalBindingContext.class.getResourceAsStream("/schema/json/oscal_assessment-results_schema.json"))) {
OscalBindingContext.class.getResourceAsStream("/schema/json/oscal-ar_schema.json"))) {
return JsonUtil.toJsonObject(is);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ protected List<Source> getOscalXmlSchemas() throws IOException {
List<Source> retval = new LinkedList<>();
retval.add(
XmlUtil.getStreamSource(ObjectUtils.requireNonNull(
OscalBindingContext.class.getResource("/schema/xml/oscal_catalog_schema.xsd"))));
OscalBindingContext.class.getResource("/schema/xml/oscal-catalog_schema.xsd"))));
return CollectionUtil.unmodifiableList(retval);
}

@Override
protected JSONObject getOscalJsonSchema() throws IOException {
try (InputStream is = ObjectUtils.requireNonNull(
OscalBindingContext.class.getResourceAsStream("/schema/json/oscal_catalog_schema.json"))) {
OscalBindingContext.class.getResourceAsStream("/schema/json/oscal-catalog_schema.json"))) {
return JsonUtil.toJsonObject(is);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ protected List<Source> getOscalXmlSchemas() throws IOException {
List<Source> retval = new LinkedList<>();
retval.add(
XmlUtil.getStreamSource(ObjectUtils.requireNonNull(
OscalBindingContext.class.getResource("/schema/xml/oscal_component_schema.xsd"))));
OscalBindingContext.class.getResource("/schema/xml/oscal-component-definition_schema.xsd"))));
return CollectionUtil.unmodifiableList(retval);
}

@Override
protected JSONObject getOscalJsonSchema() throws IOException {
try (InputStream is = ObjectUtils.requireNonNull(
OscalBindingContext.class.getResourceAsStream("/schema/json/oscal_component_schema.json"))) {
OscalBindingContext.class.getResourceAsStream("/schema/json/oscal-component-definition_schema.json"))) {
return JsonUtil.toJsonObject(is);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ protected List<Source> getOscalXmlSchemas() throws IOException {
List<Source> retval = new LinkedList<>();
retval.add(
XmlUtil.getStreamSource(ObjectUtils.requireNonNull(
OscalBindingContext.class.getResource("/schema/xml/oscal_poam_schema.xsd"))));
OscalBindingContext.class.getResource("/schema/xml/oscal-poam_schema.xsd"))));
return CollectionUtil.unmodifiableList(retval);
}

@Override
protected JSONObject getOscalJsonSchema() throws IOException {
try (InputStream is = ObjectUtils.requireNonNull(
OscalBindingContext.class.getResourceAsStream("/schema/json/oscal_poam_schema.json"))) {
OscalBindingContext.class.getResourceAsStream("/schema/json/oscal-poam_schema.json"))) {
return JsonUtil.toJsonObject(is);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ protected List<Source> getOscalXmlSchemas() throws IOException {
List<Source> retval = new LinkedList<>();
retval.add(
XmlUtil.getStreamSource(ObjectUtils.requireNonNull(
OscalBindingContext.class.getResource("/schema/xml/oscal_profile_schema.xsd"))));
OscalBindingContext.class.getResource("/schema/xml/oscal-profile_schema.xsd"))));
return CollectionUtil.unmodifiableList(retval);
}

@Override
protected JSONObject getOscalJsonSchema() throws IOException {
try (InputStream is = ObjectUtils.requireNonNull(
OscalBindingContext.class.getResourceAsStream("/schema/json/oscal_profile_schema.json"))) {
OscalBindingContext.class.getResourceAsStream("/schema/json/oscal-profile_schema.json"))) {
return JsonUtil.toJsonObject(is);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ protected List<Source> getOscalXmlSchemas() throws IOException {
List<Source> retval = new LinkedList<>();
retval.add(
XmlUtil.getStreamSource(ObjectUtils.requireNonNull(
OscalBindingContext.class.getResource("/schema/xml/oscal_ssp_schema.xsd"))));
OscalBindingContext.class.getResource("/schema/xml/oscal-ssp_schema.xsd"))));
return CollectionUtil.unmodifiableList(retval);
}

@Override
protected JSONObject getOscalJsonSchema() throws IOException {
try (InputStream is = ObjectUtils.requireNonNull(
OscalBindingContext.class.getResourceAsStream("/schema/json/oscal_ssp_schema.json"))) {
OscalBindingContext.class.getResourceAsStream("/schema/json/oscal-ssp_schema.json"))) {
return JsonUtil.toJsonObject(is);
}
}
Expand Down

0 comments on commit 46609eb

Please sign in to comment.