From b1640c596cc307497cc0cb45ad309d289301db31 Mon Sep 17 00:00:00 2001 From: Ramesh Reddy Date: Tue, 20 Nov 2018 11:30:00 -0600 Subject: [PATCH] OLINGO-1318: incresing the method scope for the load core vocabularies --- .../java/org/apache/olingo/server/core/MetadataParser.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/MetadataParser.java b/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/MetadataParser.java index 63b33d741..825ec1320 100644 --- a/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/MetadataParser.java +++ b/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/MetadataParser.java @@ -288,7 +288,7 @@ public class MetadataParser { } } - private void loadCoreVocabulary(SchemaBasedEdmProvider provider, + public void loadCoreVocabulary(SchemaBasedEdmProvider provider, String namespace) throws XMLStreamException { if("Org.OData.Core.V1".equalsIgnoreCase(namespace)) { loadLocalVocabularySchema(provider, "Org.OData.Core.V1", "Org.OData.Core.V1.xml"); @@ -296,6 +296,8 @@ public class MetadataParser { loadLocalVocabularySchema(provider, "Org.OData.Capabilities.V1", "Org.OData.Capabilities.V1.xml"); } else if ("Org.OData.Measures.V1".equalsIgnoreCase(namespace)) { loadLocalVocabularySchema(provider, "Org.OData.Measures.V1", "Org.OData.Measures.V1.xml"); + } else { + throw new XMLStreamException("Unknown namespace to load vocabulary"); } }