OLINGO-1318: adding a way to load more vocabularies into single edm provider
This commit is contained in:
parent
b1640c596c
commit
fd481c11d8
|
@ -168,6 +168,14 @@ public class MetadataParser {
|
|||
this.useLocalCoreVocabularies, true, null);
|
||||
}
|
||||
|
||||
public SchemaBasedEdmProvider addToEdmProvider(SchemaBasedEdmProvider existing, Reader csdl)
|
||||
throws XMLStreamException {
|
||||
XMLInputFactory xmlInputFactory = XMLInputFactory.newInstance();
|
||||
XMLEventReader reader = xmlInputFactory.createXMLEventReader(csdl);
|
||||
return addToEdmProvider(existing, reader, this.referenceResolver, this.implicitlyLoadCoreVocabularies,
|
||||
this.useLocalCoreVocabularies, true, null);
|
||||
}
|
||||
|
||||
protected SchemaBasedEdmProvider buildEdmProvider(Reader csdl, ReferenceResolver resolver,
|
||||
boolean loadCore, boolean useLocal,
|
||||
boolean loadReferenceSchemas, String namespace)
|
||||
|
@ -185,11 +193,16 @@ public class MetadataParser {
|
|||
XMLEventReader reader = xmlInputFactory.createXMLEventReader(csdl);
|
||||
return buildEdmProvider(reader, resolver, loadCore, useLocal, loadReferenceSchemas, namespace);
|
||||
}
|
||||
|
||||
protected SchemaBasedEdmProvider buildEdmProvider(XMLEventReader reader, ReferenceResolver resolver, boolean loadCore,
|
||||
boolean useLocal, boolean loadReferenceSchemas, String namespace) throws XMLStreamException {
|
||||
SchemaBasedEdmProvider provider = new SchemaBasedEdmProvider();
|
||||
return addToEdmProvider(provider, reader, resolver, loadCore, useLocal, loadReferenceSchemas, namespace);
|
||||
}
|
||||
|
||||
protected SchemaBasedEdmProvider buildEdmProvider(XMLEventReader reader,
|
||||
protected SchemaBasedEdmProvider addToEdmProvider(SchemaBasedEdmProvider provider, XMLEventReader reader,
|
||||
ReferenceResolver resolver, boolean loadCore, boolean useLocal, boolean loadReferenceSchemas, String namespace)
|
||||
throws XMLStreamException {
|
||||
SchemaBasedEdmProvider provider = new SchemaBasedEdmProvider();
|
||||
|
||||
final StringBuilder xmlBase = new StringBuilder();
|
||||
|
||||
|
|
Loading…
Reference in New Issue