@Test public void testLoadCoreVocabulary() throws Exception { MetadataParser parser = new MetadataParser(); parser.implicitlyLoadCoreVocabularies(true); parser.referenceResolver(testReferenceResolver); SchemaBasedEdmProvider provider = parser.buildEdmProvider(new FileReader("src/test/resources/test.xml")); Assert.assertNotNull(provider.getVocabularySchema("Org.OData.Core.V1")); Assert.assertNotNull(provider.getSchema("Org.OData.Core.V1")); }
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"); } else if ("Org.OData.Capabilities.V1".equalsIgnoreCase(namespace)) { 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"); } }
MetadataParser { 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"); } else if ("Org.OData.Capabilities.V1".equalsIgnoreCase(namespace)) { 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"); } } }
MetadataParser { 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"); } else if ("Org.OData.Capabilities.V1".equalsIgnoreCase(namespace)) { 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"); } }  }
MetadataParser { 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"); } else if ("Org.OData.Capabilities.V1".equalsIgnoreCase(namespace)) { 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"); } }  MetadataParser parseAnnotations(boolean parse); MetadataParser referenceResolver(ReferenceResolver resolver); MetadataParser useLocalCoreVocabularies(boolean load); MetadataParser recursivelyLoadReferences(boolean load); MetadataParser implicitlyLoadCoreVocabularies(boolean load); ServiceMetadata buildServiceMetadata(Reader csdl); SchemaBasedEdmProvider buildEdmProvider(Reader csdl); SchemaBasedEdmProvider addToEdmProvider(SchemaBasedEdmProvider existing, Reader csdl); void loadCoreVocabulary(SchemaBasedEdmProvider provider,
      String namespace); }
MetadataParser { 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"); } else if ("Org.OData.Capabilities.V1".equalsIgnoreCase(namespace)) { 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"); } }  MetadataParser parseAnnotations(boolean parse); MetadataParser referenceResolver(ReferenceResolver resolver); MetadataParser useLocalCoreVocabularies(boolean load); MetadataParser recursivelyLoadReferences(boolean load); MetadataParser implicitlyLoadCoreVocabularies(boolean load); ServiceMetadata buildServiceMetadata(Reader csdl); SchemaBasedEdmProvider buildEdmProvider(Reader csdl); SchemaBasedEdmProvider addToEdmProvider(SchemaBasedEdmProvider existing, Reader csdl); void loadCoreVocabulary(SchemaBasedEdmProvider provider,
      String namespace);  }