Added methods to retrieve the String representation of Profile XSD
schema. Refs #17423
This commit is contained in:
parent
1292d0e50a
commit
6fbd228b0f
|
@ -174,22 +174,28 @@ public class DataCalogueMetadataFormatReader implements DataCatalogueMetadataDis
|
||||||
namespaceCategories = null;
|
namespaceCategories = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getProfileSchema() {
|
public String getProfileSchema() {
|
||||||
if(profileSchema == null) {
|
if(profileSchema == null) {
|
||||||
InputStream inputStream = getProfileSchemaInputStream();
|
profileSchema = DataCalogueMetadataFormatReader.getProfileSchemaString();
|
||||||
profileSchema = new BufferedReader(new InputStreamReader(inputStream)).lines()
|
|
||||||
.collect(Collectors.joining("\n"));
|
|
||||||
}
|
}
|
||||||
return profileSchema;
|
return profileSchema;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static InputStream getProfileSchemaInputStream() {
|
public static String getProfileSchemaString() {
|
||||||
|
InputStream inputStream = DataCalogueMetadataFormatReader.getProfileSchemaInputStream();
|
||||||
|
return new BufferedReader(new InputStreamReader(inputStream)).lines()
|
||||||
|
.collect(Collectors.joining("\n"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static InputStream getProfileSchemaInputStream() {
|
||||||
return DataCalogueMetadataFormatReader.class.getResourceAsStream(SCHEMA_FILENAME);
|
return DataCalogueMetadataFormatReader.class.getResourceAsStream(SCHEMA_FILENAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
static URL getProfileSchemaURL() {
|
public static URL getProfileSchemaURL() {
|
||||||
return DataCalogueMetadataFormatReader.class.getResource(SCHEMA_FILENAME);
|
return DataCalogueMetadataFormatReader.class.getResource(SCHEMA_FILENAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue