Added methods to retrieve the String representation of Profile XSD

schema. Refs #17423
This commit is contained in:
Luca Frosini 2019-09-02 14:44:35 +02:00
parent 1292d0e50a
commit 6fbd228b0f
1 changed files with 11 additions and 5 deletions

View File

@ -174,22 +174,28 @@ public class DataCalogueMetadataFormatReader implements DataCatalogueMetadataDis
namespaceCategories = null;
}
@Override
public String getProfileSchema() {
if(profileSchema == null) {
InputStream inputStream = getProfileSchemaInputStream();
profileSchema = new BufferedReader(new InputStreamReader(inputStream)).lines()
.collect(Collectors.joining("\n"));
profileSchema = DataCalogueMetadataFormatReader.getProfileSchemaString();
}
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);
}
static URL getProfileSchemaURL() {
public static URL getProfileSchemaURL() {
return DataCalogueMetadataFormatReader.class.getResource(SCHEMA_FILENAME);
}