@Test public void defaultNamespaceDefined() throws ODataException { Collection<Class<?>> localAnnotatedClasses = new ArrayList<Class<?>>(); localAnnotatedClasses.add(DefinedNamesTestClass.class); AnnotationEdmProvider localAep = new AnnotationEdmProvider(localAnnotatedClasses); EntityType testClass = localAep.getEntityType(new FullQualifiedName("MyTestNamespace", DefinedNamesTestClass.class.getSimpleName())); assertNotNull("Requested entity not found.", testClass); assertEquals("DefinedNamesTestClass", testClass.getName()); assertNull("This should not have a base type", testClass.getBaseType()); }
@Override public EntityType getEntityType(final FullQualifiedName edmFQName) throws ODataException { Schema schema = namespace2Schema.get(edmFQName.getNamespace()); if (schema != null) { List<EntityType> complexTypes = schema.getEntityTypes(); for (EntityType complexType : complexTypes) { if (complexType.getName().equals(edmFQName.getName())) { return complexType; } } } return null; }
AnnotationEdmProvider extends EdmProvider { @Override public EntityType getEntityType(final FullQualifiedName edmFQName) throws ODataException { Schema schema = namespace2Schema.get(edmFQName.getNamespace()); if (schema != null) { List<EntityType> complexTypes = schema.getEntityTypes(); for (EntityType complexType : complexTypes) { if (complexType.getName().equals(edmFQName.getName())) { return complexType; } } } return null; } }
AnnotationEdmProvider extends EdmProvider { @Override public EntityType getEntityType(final FullQualifiedName edmFQName) throws ODataException { Schema schema = namespace2Schema.get(edmFQName.getNamespace()); if (schema != null) { List<EntityType> complexTypes = schema.getEntityTypes(); for (EntityType complexType : complexTypes) { if (complexType.getName().equals(edmFQName.getName())) { return complexType; } } } return null; } AnnotationEdmProvider(final Collection<Class<?>> annotatedClasses);  AnnotationEdmProvider(final String packageToScan); }
AnnotationEdmProvider extends EdmProvider { @Override public EntityType getEntityType(final FullQualifiedName edmFQName) throws ODataException { Schema schema = namespace2Schema.get(edmFQName.getNamespace()); if (schema != null) { List<EntityType> complexTypes = schema.getEntityTypes(); for (EntityType complexType : complexTypes) { if (complexType.getName().equals(edmFQName.getName())) { return complexType; } } } return null; } AnnotationEdmProvider(final Collection<Class<?>> annotatedClasses);  AnnotationEdmProvider(final String packageToScan); @Override Association getAssociation(final FullQualifiedName edmFQName); @Override AssociationSet getAssociationSet(final String entityContainer, final FullQualifiedName association,
      final String sourceEntitySetName, final String sourceEntitySetRole); @Override ComplexType getComplexType(final FullQualifiedName edmFQName); @Override EntityContainerInfo getEntityContainerInfo(final String name); @Override EntitySet getEntitySet(final String entityContainer, final String name); @Override EntityType getEntityType(final FullQualifiedName edmFQName); @Override FunctionImport getFunctionImport(final String entityContainer, final String name); @Override List<Schema> getSchemas(); }
AnnotationEdmProvider extends EdmProvider { @Override public EntityType getEntityType(final FullQualifiedName edmFQName) throws ODataException { Schema schema = namespace2Schema.get(edmFQName.getNamespace()); if (schema != null) { List<EntityType> complexTypes = schema.getEntityTypes(); for (EntityType complexType : complexTypes) { if (complexType.getName().equals(edmFQName.getName())) { return complexType; } } } return null; } AnnotationEdmProvider(final Collection<Class<?>> annotatedClasses);  AnnotationEdmProvider(final String packageToScan); @Override Association getAssociation(final FullQualifiedName edmFQName); @Override AssociationSet getAssociationSet(final String entityContainer, final FullQualifiedName association,
      final String sourceEntitySetName, final String sourceEntitySetRole); @Override ComplexType getComplexType(final FullQualifiedName edmFQName); @Override EntityContainerInfo getEntityContainerInfo(final String name); @Override EntitySet getEntitySet(final String entityContainer, final String name); @Override EntityType getEntityType(final FullQualifiedName edmFQName); @Override FunctionImport getFunctionImport(final String entityContainer, final String name); @Override List<Schema> getSchemas();  }