You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by il...@apache.org on 2014/03/07 10:04:38 UTC
[2/7] [OLINGO-169] client-api interface refinements + proxy of Edm
interfaces for V3 functionImport
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/1264aecd/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v4/TypeDefinitionImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v4/TypeDefinitionImpl.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v4/TypeDefinitionImpl.java
index cbccf9e..a6b27c4 100644
--- a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v4/TypeDefinitionImpl.java
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v4/TypeDefinitionImpl.java
@@ -21,6 +21,7 @@ package org.apache.olingo.odata4.client.core.edm.xml.v4;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import java.util.ArrayList;
import java.util.List;
+import org.apache.olingo.odata4.client.api.edm.xml.v4.Annotation;
import org.apache.olingo.odata4.client.api.edm.xml.v4.TypeDefinition;
import org.apache.olingo.odata4.client.core.edm.xml.AbstractEdmItem;
@@ -43,14 +44,13 @@ public class TypeDefinitionImpl extends AbstractEdmItem implements TypeDefinitio
private String srid;
- private final List<AnnotationImpl> annotations = new ArrayList<AnnotationImpl>();
+ private final List<Annotation> annotations = new ArrayList<Annotation>();
@Override
public String getName() {
return name;
}
- @Override
public void setName(final String name) {
this.name = name;
}
@@ -60,7 +60,6 @@ public class TypeDefinitionImpl extends AbstractEdmItem implements TypeDefinitio
return underlyingType;
}
- @Override
public void setUnderlyingType(final String underlyingType) {
this.underlyingType = underlyingType;
}
@@ -70,7 +69,6 @@ public class TypeDefinitionImpl extends AbstractEdmItem implements TypeDefinitio
return maxLength;
}
- @Override
public void setMaxLength(final Integer maxLength) {
this.maxLength = maxLength;
}
@@ -80,7 +78,6 @@ public class TypeDefinitionImpl extends AbstractEdmItem implements TypeDefinitio
return precision;
}
- @Override
public void setPrecision(final Integer precision) {
this.precision = precision;
}
@@ -90,7 +87,6 @@ public class TypeDefinitionImpl extends AbstractEdmItem implements TypeDefinitio
return scale;
}
- @Override
public void setScale(final Integer scale) {
this.scale = scale;
}
@@ -100,7 +96,6 @@ public class TypeDefinitionImpl extends AbstractEdmItem implements TypeDefinitio
return unicode;
}
- @Override
public void setUnicode(final boolean unicode) {
this.unicode = unicode;
}
@@ -110,13 +105,12 @@ public class TypeDefinitionImpl extends AbstractEdmItem implements TypeDefinitio
return srid;
}
- @Override
public void setSrid(final String srid) {
this.srid = srid;
}
@Override
- public List<AnnotationImpl> getAnnotations() {
+ public List<Annotation> getAnnotations() {
return annotations;
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/1264aecd/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v4/XMLMetadataImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v4/XMLMetadataImpl.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v4/XMLMetadataImpl.java
index 98c8914..9aef820 100644
--- a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v4/XMLMetadataImpl.java
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v4/XMLMetadataImpl.java
@@ -19,6 +19,9 @@
package org.apache.olingo.odata4.client.core.edm.xml.v4;
import java.util.List;
+import org.apache.olingo.odata4.client.api.edm.xml.v4.Edmx;
+import org.apache.olingo.odata4.client.api.edm.xml.v4.Reference;
+import org.apache.olingo.odata4.client.api.edm.xml.v4.Schema;
import org.apache.olingo.odata4.client.core.edm.xml.AbstractXMLMetadata;
public class XMLMetadataImpl extends AbstractXMLMetadata {
@@ -30,22 +33,16 @@ public class XMLMetadataImpl extends AbstractXMLMetadata {
}
@Override
- public SchemaImpl getSchema(final int index) {
- return (SchemaImpl) super.getSchema(index);
+ public Schema getSchema(final int index) {
+ return (Schema) super.getSchema(index);
}
@Override
- public SchemaImpl getSchema(final String key) {
- return (SchemaImpl) super.getSchema(key);
+ public Schema getSchema(final String key) {
+ return (Schema) super.getSchema(key);
}
- @Override
- @SuppressWarnings("unchecked")
- public List<SchemaImpl> getSchemas() {
- return (List<SchemaImpl>) super.getSchemas();
- }
-
- public List<ReferenceImpl> getReferences() {
- return ((EdmxImpl) this.edmx).getReferences();
+ public List<Reference> getReferences() {
+ return ((Edmx) this.edmx).getReferences();
}
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/1264aecd/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v4/annotation/AnnotatedDynExprConstruct.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v4/annotation/AnnotatedDynExprConstruct.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v4/annotation/AnnotatedDynExprConstruct.java
index 4fe94f9..1532cf0 100644
--- a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v4/annotation/AnnotatedDynExprConstruct.java
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v4/annotation/AnnotatedDynExprConstruct.java
@@ -20,21 +20,19 @@ package org.apache.olingo.odata4.client.core.edm.xml.v4.annotation;
import org.apache.olingo.odata4.client.api.edm.xml.v4.Annotation;
import org.apache.olingo.odata4.client.api.edm.xml.v4.AnnotatedEdmItem;
-import org.apache.olingo.odata4.client.core.edm.xml.v4.AnnotationImpl;
abstract class AnnotatedDynExprConstruct extends DynExprConstructImpl implements AnnotatedEdmItem {
private static final long serialVersionUID = -8117155475397749038L;
- private AnnotationImpl annotation;
+ private Annotation annotation;
@Override
- public AnnotationImpl getAnnotation() {
+ public Annotation getAnnotation() {
return annotation;
}
- @Override
public void setAnnotation(final Annotation annotation) {
- this.annotation = (AnnotationImpl) annotation;
+ this.annotation = annotation;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/1264aecd/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/client/core/v3/MetadataTest.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/client/core/v3/MetadataTest.java b/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/client/core/v3/MetadataTest.java
index b7d7492..483d6f5 100644
--- a/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/client/core/v3/MetadataTest.java
+++ b/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/client/core/v3/MetadataTest.java
@@ -18,20 +18,32 @@
*/
package org.apache.olingo.odata4.client.core.v3;
+import java.util.Arrays;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
import java.util.List;
+import org.apache.olingo.odata4.client.api.edm.xml.EntityContainer;
+import org.apache.olingo.odata4.client.api.edm.xml.EntityType;
+import org.apache.olingo.odata4.client.api.edm.xml.Schema;
+import org.apache.olingo.odata4.client.api.edm.xml.v3.FunctionImport;
import org.apache.olingo.odata4.client.api.http.HttpMethod;
import org.apache.olingo.odata4.client.core.AbstractTest;
import org.apache.olingo.odata4.client.core.ODataV3Client;
-import org.apache.olingo.odata4.client.core.edm.xml.v3.ComplexTypeImpl;
-import org.apache.olingo.odata4.client.core.edm.xml.v3.EntityContainerImpl;
-import org.apache.olingo.odata4.client.core.edm.xml.v3.EntityTypeImpl;
-import org.apache.olingo.odata4.client.core.edm.xml.v3.FunctionImportImpl;
-import org.apache.olingo.odata4.client.core.edm.xml.v3.SchemaImpl;
import org.apache.olingo.odata4.client.core.edm.xml.v3.XMLMetadataImpl;
+import org.apache.olingo.odata4.commons.api.edm.Edm;
+import org.apache.olingo.odata4.commons.api.edm.EdmAction;
+import org.apache.olingo.odata4.commons.api.edm.EdmActionImport;
+import org.apache.olingo.odata4.commons.api.edm.EdmComplexType;
+import org.apache.olingo.odata4.commons.api.edm.EdmEntityContainer;
+import org.apache.olingo.odata4.commons.api.edm.EdmEntityType;
+import org.apache.olingo.odata4.commons.api.edm.EdmFunction;
+import org.apache.olingo.odata4.commons.api.edm.EdmFunctionImport;
+import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName;
+import org.apache.olingo.odata4.commons.core.edm.primitivetype.EdmPrimitiveTypeKind;
import org.junit.Test;
public class MetadataTest extends AbstractTest {
@@ -47,17 +59,18 @@ public class MetadataTest extends AbstractTest {
toMetadata(getClass().getResourceAsStream("metadata.xml"));
assertNotNull(metadata);
- final EntityTypeImpl order = metadata.getSchemas().get(0).getEntityType("Order");
+ final EntityType order = metadata.getSchemas().get(0).getEntityType("Order");
assertNotNull(order);
assertEquals("Order", order.getName());
- final List<FunctionImportImpl> functionImports = metadata.getSchemas().get(0).
+ @SuppressWarnings("unchecked")
+ final List<FunctionImport> functionImports = (List<FunctionImport>) metadata.<FunctionImport>getSchemas().get(0).
getDefaultEntityContainer().getFunctionImports();
int legacyGetters = 0;
int legacyPosters = 0;
int actions = 0;
int functions = 0;
- for (FunctionImportImpl functionImport : functionImports) {
+ for (FunctionImport functionImport : functionImports) {
if (HttpMethod.GET.name().equals(functionImport.getHttpMethod())) {
legacyGetters++;
} else if (HttpMethod.POST.name().equals(functionImport.getHttpMethod())) {
@@ -82,61 +95,77 @@ public class MetadataTest extends AbstractTest {
toMetadata(getClass().getResourceAsStream("northwind-metadata.xml"));
assertNotNull(metadata);
- final SchemaImpl first = metadata.getSchema("NorthwindModel");
+ final Schema first = metadata.getSchema("NorthwindModel");
assertNotNull(first);
- final SchemaImpl second = metadata.getSchema("ODataWebV3.Northwind.Model");
+ final Schema second = metadata.getSchema("ODataWebV3.Northwind.Model");
assertNotNull(second);
- final EntityContainerImpl entityContainer = second.getDefaultEntityContainer();
+ final EntityContainer entityContainer = second.getDefaultEntityContainer();
assertNotNull(entityContainer);
assertEquals("NorthwindEntities", entityContainer.getName());
}
@Test
- public void entityType() {
- final XMLMetadataImpl metadata = getClient().getDeserializer().
- toMetadata(getClass().getResourceAsStream("metadata.xml"));
- assertNotNull(metadata);
-
- final EntityContainerImpl container = metadata.getSchema(0).getEntityContainers().get(0);
- assertNotNull(container);
- final EntityTypeImpl type = metadata.getSchema(0).getEntityType("ProductReview");
- assertNotNull(type);
-
- assertFalse(type.getProperties().isEmpty());
- assertNotNull(type.getProperties().get(0));
-
- assertFalse(type.getKey().getPropertyRefs().isEmpty());
- assertNotNull(type.getKey().getPropertyRefs().get(0));
- }
-
- @Test
- public void complexType() {
- final XMLMetadataImpl metadata = getClient().getDeserializer().
- toMetadata(getClass().getResourceAsStream("metadata.xml"));
+ public void complexAndEntityType() {
+ final Edm metadata = getClient().getReader().
+ readMetadata(getClass().getResourceAsStream("metadata.xml"));
assertNotNull(metadata);
- final EntityContainerImpl container = metadata.getSchema(0).getEntityContainers().get(0);
+ final EdmEntityContainer container = metadata.getEntityContainer(
+ new FullQualifiedName("Microsoft.Test.OData.Services.AstoriaDefaultService", "DefaultContainer"));
assertNotNull(container);
- final ComplexTypeImpl type = metadata.getSchema(0).getComplexType("ContactDetails");
- assertNotNull(type);
- assertFalse(type.getProperties().isEmpty());
- assertNotNull(type.getProperties().get(0));
+ final EdmComplexType complex = metadata.getComplexType(
+ new FullQualifiedName("Microsoft.Test.OData.Services.AstoriaDefaultService", "ContactDetails"));
+ assertNotNull(complex);
+ assertFalse(complex.getPropertyNames().isEmpty());
+ assertTrue(complex.getProperty("EmailBag").isCollection());
+
+ final EdmEntityType entity = metadata.getEntityType(
+ new FullQualifiedName("Microsoft.Test.OData.Services.AstoriaDefaultService", "ProductReview"));
+ assertNotNull(entity);
+ assertFalse(entity.getPropertyNames().isEmpty());
+ assertEquals(EdmPrimitiveTypeKind.Int32.getEdmPrimitiveTypeInstance(),
+ entity.getProperty("ProductId").getType());
+
+ assertFalse(entity.getKeyPropertyRefs().isEmpty());
+ assertNotNull("ProductId", entity.getKeyPropertyRef("ProductId").getKeyPropertyName());
}
@Test
public void functionImport() {
- final XMLMetadataImpl metadata = getClient().getDeserializer().
- toMetadata(getClass().getResourceAsStream("metadata.xml"));
+ final Edm metadata = getClient().getReader().
+ readMetadata(getClass().getResourceAsStream("metadata.xml"));
assertNotNull(metadata);
- final EntityContainerImpl container = metadata.getSchema(0).getEntityContainers().get(0);
+ final EdmEntityContainer container = metadata.getEntityContainer(
+ new FullQualifiedName("Microsoft.Test.OData.Services.AstoriaDefaultService", "DefaultContainer"));
assertNotNull(container);
- final FunctionImportImpl funcImp = container.getFunctionImport("GetArgumentPlusOne");
- assertNotNull(funcImp);
- assertNotNull(funcImp.getParameters().get(0));
+ final EdmFunctionImport getArgumentPlusOne = container.getFunctionImport("GetArgumentPlusOne");
+ assertNotNull(getArgumentPlusOne);
+ assertEquals(EdmPrimitiveTypeKind.Int32.getEdmPrimitiveTypeInstance(),
+ getArgumentPlusOne.getFunction(null).getReturnType().getType());
+
+ final EdmActionImport resetDataSource = container.getActionImport("ResetDataSource");
+ assertNotNull(resetDataSource);
+ assertTrue(resetDataSource.getAction().getParameterNames().isEmpty());
+ assertNull(resetDataSource.getAction().getReturnType());
+
+ final EdmEntityType computer = metadata.getEntityType(new FullQualifiedName(container.getNamespace(), "Computer"));
+ assertNotNull(computer);
+
+ final EdmFunction getComputer = metadata.getFunction(
+ new FullQualifiedName(container.getNamespace(), "GetComputer"),
+ new FullQualifiedName(container.getNamespace(), computer.getName()),
+ Boolean.FALSE, Arrays.asList(new String[]{"computer"}));
+ assertNotNull(getComputer);
+ assertEquals(computer, getComputer.getParameter("computer").getType());
+ assertEquals(computer, getComputer.getReturnType().getType());
+
+ final EdmAction resetDataSource2 = metadata.getAction(
+ new FullQualifiedName(container.getNamespace(), "ResetDataSource"), null, Boolean.FALSE);
+ assertNotNull(resetDataSource2);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/1264aecd/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/client/core/v4/MetadataTest.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/client/core/v4/MetadataTest.java b/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/client/core/v4/MetadataTest.java
index 1265f15..0ff9e77 100644
--- a/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/client/core/v4/MetadataTest.java
+++ b/odata4-lib/odata4-client-core/src/test/java/org/apache/olingo/odata4/client/core/v4/MetadataTest.java
@@ -23,18 +23,18 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
+import org.apache.olingo.odata4.client.api.edm.xml.v4.Annotation;
+import org.apache.olingo.odata4.client.api.edm.xml.v4.Annotations;
+import org.apache.olingo.odata4.client.api.edm.xml.v4.ComplexType;
+import org.apache.olingo.odata4.client.api.edm.xml.v4.EntityContainer;
+import org.apache.olingo.odata4.client.api.edm.xml.v4.EntityType;
+import org.apache.olingo.odata4.client.api.edm.xml.v4.Function;
+import org.apache.olingo.odata4.client.api.edm.xml.v4.FunctionImport;
+import org.apache.olingo.odata4.client.api.edm.xml.v4.Schema;
+import org.apache.olingo.odata4.client.api.edm.xml.v4.Singleton;
import org.apache.olingo.odata4.client.core.AbstractTest;
import org.apache.olingo.odata4.client.core.ODataV4Client;
import org.apache.olingo.odata4.client.core.edm.xml.v4.XMLMetadataImpl;
-import org.apache.olingo.odata4.client.core.edm.xml.v4.AnnotationImpl;
-import org.apache.olingo.odata4.client.core.edm.xml.v4.AnnotationsImpl;
-import org.apache.olingo.odata4.client.core.edm.xml.v4.ComplexTypeImpl;
-import org.apache.olingo.odata4.client.core.edm.xml.v4.EntityContainerImpl;
-import org.apache.olingo.odata4.client.core.edm.xml.v4.EntityTypeImpl;
-import org.apache.olingo.odata4.client.core.edm.xml.v4.FunctionImpl;
-import org.apache.olingo.odata4.client.core.edm.xml.v4.FunctionImportImpl;
-import org.apache.olingo.odata4.client.core.edm.xml.v4.SchemaImpl;
-import org.apache.olingo.odata4.client.core.edm.xml.v4.SingletonImpl;
import org.apache.olingo.odata4.client.core.edm.xml.v4.annotation.Apply;
import org.apache.olingo.odata4.client.core.edm.xml.v4.annotation.Collection;
import org.apache.olingo.odata4.client.core.edm.xml.v4.annotation.ConstExprConstructImpl;
@@ -128,7 +128,7 @@ public class MetadataTest extends AbstractTest {
assertNotNull(metadata);
assertFalse(metadata.getSchema(0).getAnnotationsList().isEmpty());
- final AnnotationsImpl annots = metadata.getSchema(0).getAnnotationsList("ODataDemo.DemoService/Suppliers");
+ final Annotations annots = metadata.getSchema(0).getAnnotationsList("ODataDemo.DemoService/Suppliers");
assertNotNull(annots);
assertFalse(annots.getAnnotations().isEmpty());
assertEquals(ConstExprConstructImpl.Type.String,
@@ -143,16 +143,16 @@ public class MetadataTest extends AbstractTest {
toMetadata(getClass().getResourceAsStream("northwind-metadata.xml"));
assertNotNull(metadata);
- final SchemaImpl first = metadata.getSchema("NorthwindModel");
+ final Schema first = metadata.getSchema("NorthwindModel");
assertNotNull(first);
- final SchemaImpl second = metadata.getSchema("ODataWebExperimental.Northwind.Model");
+ final Schema second = metadata.getSchema("ODataWebExperimental.Northwind.Model");
assertNotNull(second);
assertEquals(StoreGeneratedPattern.Identity,
first.getEntityType("Category").getProperty("CategoryID").getStoreGeneratedPattern());
- final EntityContainerImpl entityContainer = second.getDefaultEntityContainer();
+ final EntityContainer entityContainer = second.getEntityContainer();
assertNotNull(entityContainer);
assertEquals("NorthwindEntities", entityContainer.getName());
assertTrue(entityContainer.isLazyLoadingEnabled());
@@ -170,30 +170,30 @@ public class MetadataTest extends AbstractTest {
assertFalse(metadata.getReferences().isEmpty());
assertEquals("Org.OData.Measures.V1", metadata.getReferences().get(1).getIncludes().get(0).getNamespace());
- final EntityTypeImpl product = metadata.getSchema(0).getEntityType("Product");
+ final EntityType product = metadata.getSchema(0).getEntityType("Product");
assertTrue(product.isHasStream());
assertEquals("UoM.ISOCurrency", product.getProperty("Price").getAnnotation().getTerm());
assertEquals("Products", product.getNavigationProperty("Supplier").getPartner());
- final EntityTypeImpl category = metadata.getSchema(0).getEntityType("Category");
+ final EntityType category = metadata.getSchema(0).getEntityType("Category");
assertNotNull(category);
- final ComplexTypeImpl address = metadata.getSchema(0).getComplexType("Address");
+ final ComplexType address = metadata.getSchema(0).getComplexType("Address");
assertFalse(address.getNavigationProperty("Country").getReferentialConstraints().isEmpty());
assertEquals("Name",
address.getNavigationProperty("Country").getReferentialConstraints().get(0).getReferencedProperty());
- final FunctionImpl productsByRating = metadata.getSchema(0).getFunctions("ProductsByRating").get(0);
+ final Function productsByRating = metadata.getSchema(0).getFunctions("ProductsByRating").get(0);
assertNotNull(productsByRating.getParameter("Rating"));
assertEquals("Edm.Int32", productsByRating.getParameter("Rating").getType());
assertEquals("Collection(ODataDemo.Product)", productsByRating.getReturnType().getType());
- final SingletonImpl contoso = metadata.getSchema(0).getEntityContainer().getSingleton("Contoso");
+ final Singleton contoso = metadata.getSchema(0).getEntityContainer().getSingleton("Contoso");
assertNotNull(contoso);
assertFalse(contoso.getNavigationPropertyBindings().isEmpty());
assertEquals("Products", contoso.getNavigationPropertyBindings().get(0).getPath());
- final FunctionImportImpl functionImport = metadata.getSchema(0).getEntityContainer().
+ final FunctionImport functionImport = metadata.getSchema(0).getEntityContainer().
getFunctionImport("ProductsByRating");
assertNotNull(functionImport);
assertEquals(metadata.getSchema(0).getNamespace() + "." + productsByRating.getName(),
@@ -235,7 +235,7 @@ public class MetadataTest extends AbstractTest {
assertNotNull(metadata);
// Check displayName
- final AnnotationImpl displayName = metadata.getSchema(0).getAnnotationsList("ODataDemo.Supplier").
+ final Annotation displayName = metadata.getSchema(0).getAnnotationsList("ODataDemo.Supplier").
getAnnotation("Vocabulary1.DisplayName");
assertNotNull(displayName);
assertNull(displayName.getConstExpr());
@@ -260,7 +260,7 @@ public class MetadataTest extends AbstractTest {
assertEquals(thirdArg, apply.getParameters().get(2));
// Check Tags
- final AnnotationImpl tags = metadata.getSchema(0).getAnnotationsList("ODataDemo.Product").
+ final Annotation tags = metadata.getSchema(0).getAnnotationsList("ODataDemo.Product").
getAnnotation("Vocabulary1.Tags");
assertNotNull(tags);
assertNull(tags.getConstExpr());