[OLINGO-564] Renamed client edm classes
This commit is contained in:
parent
cceceafdb5
commit
754e23abee
|
@ -31,8 +31,8 @@ import org.apache.olingo.client.api.edm.xml.Include;
|
|||
import org.apache.olingo.client.api.edm.xml.IncludeAnnotations;
|
||||
import org.apache.olingo.client.api.edm.xml.Reference;
|
||||
import org.apache.olingo.client.api.edm.xml.XMLMetadata;
|
||||
import org.apache.olingo.client.core.edm.xml.AnnotationsImpl;
|
||||
import org.apache.olingo.client.core.edm.xml.SchemaImpl;
|
||||
import org.apache.olingo.client.core.edm.xml.ClientAnnotations;
|
||||
import org.apache.olingo.client.core.edm.xml.ClientSchema;
|
||||
import org.apache.olingo.commons.api.edm.provider.Annotation;
|
||||
import org.apache.olingo.commons.api.edm.provider.Annotations;
|
||||
import org.apache.olingo.commons.api.edm.provider.Schema;
|
||||
|
@ -68,7 +68,7 @@ public class XMLMetadataRequestImpl
|
|||
if (includedSchema != null) {
|
||||
response.getBody().getSchemas().add(includedSchema);
|
||||
if (StringUtils.isNotBlank(include.getAlias())) {
|
||||
((SchemaImpl) includedSchema).setAlias(include.getAlias());
|
||||
((ClientSchema) includedSchema).setAlias(include.getAlias());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ public class XMLMetadataRequestImpl
|
|||
for (IncludeAnnotations include : reference.getIncludeAnnotations()) {
|
||||
for (Schema schema : includeMetadata.getSchemas()) {
|
||||
// create empty schema that will be fed with edm:Annotations that match the criteria in IncludeAnnotations
|
||||
final SchemaImpl forInclusion = new SchemaImpl();
|
||||
final ClientSchema forInclusion = new ClientSchema();
|
||||
forInclusion.setNamespace(schema.getNamespace());
|
||||
forInclusion.setAlias(schema.getAlias());
|
||||
|
||||
|
@ -91,7 +91,7 @@ public class XMLMetadataRequestImpl
|
|||
&& (StringUtils.isBlank(include.getQualifier())
|
||||
|| include.getQualifier().equals(annotationGroup.getQualifier()))) {
|
||||
|
||||
final AnnotationsImpl toBeIncluded = new AnnotationsImpl();
|
||||
final ClientAnnotations toBeIncluded = new ClientAnnotations();
|
||||
toBeIncluded.setTarget(annotationGroup.getTarget());
|
||||
toBeIncluded.setQualifier(annotationGroup.getQualifier());
|
||||
// only import annotations with terms matching the given TermNamespace
|
||||
|
|
|
@ -20,34 +20,35 @@ package org.apache.olingo.client.core.edm.xml;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.apache.olingo.client.core.edm.xml.annotation.ConstantAnnotationExpressionImpl;
|
||||
import org.apache.olingo.client.core.edm.xml.annotation.ClientConstantAnnotationExpression;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import com.fasterxml.jackson.databind.JsonDeserializer;
|
||||
import com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser;
|
||||
|
||||
public abstract class AbstractEdmDeserializer<T> extends JsonDeserializer<T> {
|
||||
public abstract class AbstractClientEdmDeserializer<T> extends JsonDeserializer<T> {
|
||||
|
||||
protected boolean isAnnotationConstExprConstruct(final JsonParser jp) throws IOException {
|
||||
return ConstantAnnotationExpressionImpl.Type.fromString(jp.getCurrentName()) != null;
|
||||
return ClientConstantAnnotationExpression.Type.fromString(jp.getCurrentName()) != null;
|
||||
}
|
||||
|
||||
protected ConstantAnnotationExpressionImpl parseAnnotationConstExprConstruct(final JsonParser jp) throws IOException {
|
||||
final ConstantAnnotationExpressionImpl constExpr = new ConstantAnnotationExpressionImpl();
|
||||
constExpr.setType(ConstantAnnotationExpressionImpl.Type.fromString(jp.getCurrentName()));
|
||||
protected ClientConstantAnnotationExpression parseAnnotationConstExprConstruct(final JsonParser jp)
|
||||
throws IOException {
|
||||
final ClientConstantAnnotationExpression constExpr = new ClientConstantAnnotationExpression();
|
||||
constExpr.setType(ClientConstantAnnotationExpression.Type.fromString(jp.getCurrentName()));
|
||||
constExpr.setValue(jp.nextTextValue());
|
||||
return constExpr;
|
||||
}
|
||||
|
||||
protected ReturnTypeImpl parseReturnType(final JsonParser jp, final String elementName) throws IOException {
|
||||
final ReturnTypeImpl returnType;
|
||||
protected ClientReturnType parseReturnType(final JsonParser jp, final String elementName) throws IOException {
|
||||
final ClientReturnType returnType;
|
||||
if (elementName.equals(((FromXmlParser) jp).getStaxReader().getLocalName())) {
|
||||
returnType = new ReturnTypeImpl();
|
||||
returnType = new ClientReturnType();
|
||||
returnType.setType(jp.nextTextValue());
|
||||
} else {
|
||||
jp.nextToken();
|
||||
returnType = jp.readValueAs(ReturnTypeImpl.class);
|
||||
returnType = jp.readValueAs(ClientReturnType.class);
|
||||
}
|
||||
return returnType;
|
||||
}
|
|
@ -28,18 +28,18 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
@JsonDeserialize(using = ActionImpl.ActionDeserializer.class)
|
||||
public class ActionImpl extends Action {
|
||||
@JsonDeserialize(using = ClientAction.ActionDeserializer.class)
|
||||
public class ClientAction extends Action {
|
||||
|
||||
private static final long serialVersionUID = 5321541275349234088L;
|
||||
|
||||
static class ActionDeserializer extends AbstractEdmDeserializer<ActionImpl> {
|
||||
static class ActionDeserializer extends AbstractClientEdmDeserializer<ClientAction> {
|
||||
|
||||
@Override
|
||||
protected ActionImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
protected ClientAction doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
|
||||
final ActionImpl action = new ActionImpl();
|
||||
final ClientAction action = new ClientAction();
|
||||
|
||||
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
||||
|
@ -52,12 +52,12 @@ public class ActionImpl extends Action {
|
|||
action.setEntitySetPath(jp.nextTextValue());
|
||||
} else if ("Parameter".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
action.getParameters().add(jp.readValueAs(ParameterImpl.class));
|
||||
action.getParameters().add(jp.readValueAs(ClientParameter.class));
|
||||
} else if ("ReturnType".equals(jp.getCurrentName())) {
|
||||
action.setReturnType(parseReturnType(jp, "Action"));
|
||||
} else if ("Annotation".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
action.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
|
||||
action.getAnnotations().add(jp.readValueAs(ClientAnnotation.class));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -26,18 +26,18 @@ import org.apache.olingo.commons.api.edm.provider.ActionImport;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
@JsonDeserialize(using = ActionImportImpl.ActionImportDeserializer.class)
|
||||
public class ActionImportImpl extends ActionImport {
|
||||
@JsonDeserialize(using = ClientActionImport.ActionImportDeserializer.class)
|
||||
public class ClientActionImport extends ActionImport {
|
||||
|
||||
private static final long serialVersionUID = 2971468441177647068L;
|
||||
|
||||
static class ActionImportDeserializer extends AbstractEdmDeserializer<ActionImportImpl> {
|
||||
static class ActionImportDeserializer extends AbstractClientEdmDeserializer<ClientActionImport> {
|
||||
|
||||
@Override
|
||||
protected ActionImportImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
protected ClientActionImport doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
|
||||
final ActionImportImpl action = new ActionImportImpl();
|
||||
final ClientActionImport action = new ClientActionImport();
|
||||
|
||||
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
|
@ -23,23 +23,23 @@ import java.io.IOException;
|
|||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonToken;
|
||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import org.apache.olingo.client.core.edm.xml.annotation.AbstractDynamicAnnotationExpression;
|
||||
import org.apache.olingo.client.core.edm.xml.annotation.AbstractClientDynamicAnnotationExpression;
|
||||
import org.apache.olingo.commons.api.edm.provider.Annotation;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
|
||||
@JsonDeserialize(using = AnnotationImpl.AnnotationDeserializer.class)
|
||||
public class AnnotationImpl extends Annotation {
|
||||
@JsonDeserialize(using = ClientAnnotation.AnnotationDeserializer.class)
|
||||
public class ClientAnnotation extends Annotation {
|
||||
|
||||
private static final long serialVersionUID = 5464714417411058033L;
|
||||
|
||||
static class AnnotationDeserializer extends AbstractEdmDeserializer<Annotation> {
|
||||
static class AnnotationDeserializer extends AbstractClientEdmDeserializer<Annotation> {
|
||||
|
||||
@Override
|
||||
protected Annotation doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
|
||||
final AnnotationImpl annotation = new AnnotationImpl();
|
||||
final ClientAnnotation annotation = new ClientAnnotation();
|
||||
|
||||
for (; jp.getCurrentToken() != null && jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
||||
|
@ -50,13 +50,13 @@ public class AnnotationImpl extends Annotation {
|
|||
annotation.setQualifier(jp.nextTextValue());
|
||||
} else if ("Annotation".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
annotation.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
|
||||
annotation.getAnnotations().add(jp.readValueAs(ClientAnnotation.class));
|
||||
} else if (isAnnotationConstExprConstruct(jp)) {
|
||||
// Constant Expressions
|
||||
annotation.setExpression(parseAnnotationConstExprConstruct(jp));
|
||||
} else {
|
||||
// Dynamic Expressions
|
||||
annotation.setExpression(jp.readValueAs(AbstractDynamicAnnotationExpression.class));
|
||||
annotation.setExpression(jp.readValueAs(AbstractClientDynamicAnnotationExpression.class));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -27,18 +27,18 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
@JsonDeserialize(using = AnnotationsImpl.AnnotationsDeserializer.class)
|
||||
public class AnnotationsImpl extends Annotations {
|
||||
@JsonDeserialize(using = ClientAnnotations.AnnotationsDeserializer.class)
|
||||
public class ClientAnnotations extends Annotations {
|
||||
|
||||
private static final long serialVersionUID = -5961207981571644200L;
|
||||
|
||||
static class AnnotationsDeserializer extends AbstractEdmDeserializer<AnnotationsImpl> {
|
||||
static class AnnotationsDeserializer extends AbstractClientEdmDeserializer<ClientAnnotations> {
|
||||
|
||||
@Override
|
||||
protected AnnotationsImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
protected ClientAnnotations doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
|
||||
final AnnotationsImpl annotations = new AnnotationsImpl();
|
||||
final ClientAnnotations annotations = new ClientAnnotations();
|
||||
|
||||
for (; jp.getCurrentToken() != null && jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
||||
|
@ -49,7 +49,7 @@ public class AnnotationsImpl extends Annotations {
|
|||
annotations.setQualifier(jp.nextTextValue());
|
||||
} else if ("Annotation".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
annotations.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
|
||||
annotations.getAnnotations().add(jp.readValueAs(ClientAnnotation.class));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -28,18 +28,18 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
@JsonDeserialize(using = ComplexTypeImpl.ComplexTypeDeserializer.class)
|
||||
public class ComplexTypeImpl extends ComplexType {
|
||||
@JsonDeserialize(using = ClientComplexType.ComplexTypeDeserializer.class)
|
||||
public class ClientComplexType extends ComplexType {
|
||||
|
||||
private static final long serialVersionUID = 4076944306925840115L;
|
||||
|
||||
static class ComplexTypeDeserializer extends AbstractEdmDeserializer<ComplexType> {
|
||||
static class ComplexTypeDeserializer extends AbstractClientEdmDeserializer<ComplexType> {
|
||||
|
||||
@Override
|
||||
protected ComplexType doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
|
||||
final ComplexTypeImpl complexType = new ComplexTypeImpl();
|
||||
final ClientComplexType complexType = new ClientComplexType();
|
||||
|
||||
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
||||
|
@ -54,13 +54,13 @@ public class ComplexTypeImpl extends ComplexType {
|
|||
complexType.setOpenType(BooleanUtils.toBoolean(jp.nextTextValue()));
|
||||
} else if ("Property".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
complexType.getProperties().add(jp.readValueAs(PropertyImpl.class));
|
||||
complexType.getProperties().add(jp.readValueAs(ClientProperty.class));
|
||||
} else if ("NavigationProperty".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
complexType.getNavigationProperties().add(jp.readValueAs(NavigationPropertyImpl.class));
|
||||
complexType.getNavigationProperties().add(jp.readValueAs(ClientNavigationProperty.class));
|
||||
} else if ("Annotation".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
complexType.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
|
||||
complexType.getAnnotations().add(jp.readValueAs(ClientAnnotation.class));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -31,8 +31,8 @@ import org.apache.olingo.commons.api.edm.provider.Schema;
|
|||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
|
||||
@JsonDeserialize(using = DataServicesImpl.DataServicesDeserializer.class)
|
||||
public class DataServicesImpl extends AbstractEdmItem implements DataServices {
|
||||
@JsonDeserialize(using = ClientDataServices.DataServicesDeserializer.class)
|
||||
public class ClientDataServices extends AbstractEdmItem implements DataServices {
|
||||
|
||||
private static final long serialVersionUID = 4200317286476885204L;
|
||||
|
||||
|
@ -65,13 +65,13 @@ public class DataServicesImpl extends AbstractEdmItem implements DataServices {
|
|||
return schemas;
|
||||
}
|
||||
|
||||
static class DataServicesDeserializer extends AbstractEdmDeserializer<DataServicesImpl> {
|
||||
static class DataServicesDeserializer extends AbstractClientEdmDeserializer<ClientDataServices> {
|
||||
|
||||
@Override
|
||||
protected DataServicesImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
protected ClientDataServices doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
|
||||
final DataServicesImpl dataServices = new DataServicesImpl();
|
||||
final ClientDataServices dataServices = new ClientDataServices();
|
||||
|
||||
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
||||
|
@ -82,7 +82,7 @@ public class DataServicesImpl extends AbstractEdmItem implements DataServices {
|
|||
dataServices.setMaxDataServiceVersion(jp.nextTextValue());
|
||||
} else if ("Schema".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
dataServices.getSchemas().add(jp.readValueAs(SchemaImpl.class));
|
||||
dataServices.getSchemas().add(jp.readValueAs(ClientSchema.class));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -32,8 +32,8 @@ import org.apache.olingo.commons.api.edm.provider.AbstractEdmItem;
|
|||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
|
||||
@JsonDeserialize(using = EdmxImpl.EdmxDeserializer.class)
|
||||
public class EdmxImpl extends AbstractEdmItem implements Edmx {
|
||||
@JsonDeserialize(using = ClientEdmx.EdmxDeserializer.class)
|
||||
public class ClientEdmx extends AbstractEdmItem implements Edmx {
|
||||
|
||||
private static final long serialVersionUID = -6293476719276092572L;
|
||||
|
||||
|
@ -66,13 +66,13 @@ public class EdmxImpl extends AbstractEdmItem implements Edmx {
|
|||
return references;
|
||||
}
|
||||
|
||||
static class EdmxDeserializer extends AbstractEdmDeserializer<EdmxImpl> {
|
||||
static class EdmxDeserializer extends AbstractClientEdmDeserializer<ClientEdmx> {
|
||||
|
||||
@Override
|
||||
protected EdmxImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
protected ClientEdmx doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
|
||||
final EdmxImpl edmx = new EdmxImpl();
|
||||
final ClientEdmx edmx = new ClientEdmx();
|
||||
|
||||
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
||||
|
@ -81,10 +81,10 @@ public class EdmxImpl extends AbstractEdmItem implements Edmx {
|
|||
edmx.setVersion(jp.nextTextValue());
|
||||
} else if ("DataServices".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
edmx.setDataServices(jp.readValueAs(DataServicesImpl.class));
|
||||
edmx.setDataServices(jp.readValueAs(ClientDataServices.class));
|
||||
} else if ("Reference".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
edmx.getReferences().add(jp.readValueAs(ReferenceImpl.class));
|
||||
edmx.getReferences().add(jp.readValueAs(ClientReference.class));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -27,18 +27,18 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
@JsonDeserialize(using = EntityContainerImpl.EntityContainerDeserializer.class)
|
||||
public class EntityContainerImpl extends EntityContainer {
|
||||
@JsonDeserialize(using = ClientEntityContainer.EntityContainerDeserializer.class)
|
||||
public class ClientEntityContainer extends EntityContainer {
|
||||
|
||||
private static final long serialVersionUID = 5631432527646955795L;
|
||||
|
||||
static class EntityContainerDeserializer extends AbstractEdmDeserializer<EntityContainerImpl> {
|
||||
static class EntityContainerDeserializer extends AbstractClientEdmDeserializer<ClientEntityContainer> {
|
||||
|
||||
@Override
|
||||
protected EntityContainerImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
protected ClientEntityContainer doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
|
||||
final EntityContainerImpl entityContainer = new EntityContainerImpl();
|
||||
final ClientEntityContainer entityContainer = new ClientEntityContainer();
|
||||
|
||||
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
||||
|
@ -49,19 +49,19 @@ public class EntityContainerImpl extends EntityContainer {
|
|||
entityContainer.setExtendsContainer(jp.nextTextValue());
|
||||
} else if ("EntitySet".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
entityContainer.getEntitySets().add(jp.readValueAs(EntitySetImpl.class));
|
||||
entityContainer.getEntitySets().add(jp.readValueAs(ClientEntitySet.class));
|
||||
} else if ("Singleton".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
entityContainer.getSingletons().add(jp.readValueAs(SingletonImpl.class));
|
||||
entityContainer.getSingletons().add(jp.readValueAs(ClientSingleton.class));
|
||||
} else if ("ActionImport".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
entityContainer.getActionImports().add(jp.readValueAs(ActionImportImpl.class));
|
||||
entityContainer.getActionImports().add(jp.readValueAs(ClientActionImport.class));
|
||||
} else if ("FunctionImport".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
entityContainer.getFunctionImports().add(jp.readValueAs(FunctionImportImpl.class));
|
||||
entityContainer.getFunctionImports().add(jp.readValueAs(ClientFunctionImport.class));
|
||||
} else if ("Annotation".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
entityContainer.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
|
||||
entityContainer.getAnnotations().add(jp.readValueAs(ClientAnnotation.class));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -30,8 +30,8 @@ import org.apache.olingo.commons.api.edm.provider.PropertyRef;
|
|||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
|
||||
@JsonDeserialize(using = EntityKeyImpl.EntityKeyDeserializer.class)
|
||||
public class EntityKeyImpl extends AbstractEdmItem {
|
||||
@JsonDeserialize(using = ClientEntityKey.EntityKeyDeserializer.class)
|
||||
public class ClientEntityKey extends AbstractEdmItem {
|
||||
|
||||
private static final long serialVersionUID = 520227585458843347L;
|
||||
|
||||
|
@ -41,19 +41,19 @@ public class EntityKeyImpl extends AbstractEdmItem {
|
|||
return propertyRefs;
|
||||
}
|
||||
|
||||
static class EntityKeyDeserializer extends AbstractEdmDeserializer<EntityKeyImpl> {
|
||||
static class EntityKeyDeserializer extends AbstractClientEdmDeserializer<ClientEntityKey> {
|
||||
@Override
|
||||
protected EntityKeyImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
protected ClientEntityKey doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
|
||||
final EntityKeyImpl entityKey = new EntityKeyImpl();
|
||||
final ClientEntityKey entityKey = new ClientEntityKey();
|
||||
|
||||
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
||||
|
||||
if (token == JsonToken.FIELD_NAME && "PropertyRef".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
entityKey.getPropertyRefs().add(jp.readValueAs(PropertyRefImpl.class));
|
||||
entityKey.getPropertyRefs().add(jp.readValueAs(ClientPropertyRef.class));
|
||||
}
|
||||
}
|
||||
|
|
@ -28,17 +28,17 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
@JsonDeserialize(using = EntitySetImpl.EntitySetDeserializer.class)
|
||||
public class EntitySetImpl extends EntitySet {
|
||||
@JsonDeserialize(using = ClientEntitySet.EntitySetDeserializer.class)
|
||||
public class ClientEntitySet extends EntitySet {
|
||||
|
||||
private static final long serialVersionUID = -5553885465204370676L;
|
||||
|
||||
static class EntitySetDeserializer extends AbstractEdmDeserializer<EntitySet> {
|
||||
static class EntitySetDeserializer extends AbstractClientEdmDeserializer<EntitySet> {
|
||||
@Override
|
||||
protected EntitySet doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
|
||||
final EntitySetImpl entitySet = new EntitySetImpl();
|
||||
final ClientEntitySet entitySet = new ClientEntitySet();
|
||||
|
||||
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
||||
|
@ -51,10 +51,10 @@ public class EntitySetImpl extends EntitySet {
|
|||
entitySet.setIncludeInServiceDocument(BooleanUtils.toBoolean(jp.nextTextValue()));
|
||||
} else if ("NavigationPropertyBinding".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
entitySet.getNavigationPropertyBindings().add(jp.readValueAs(NavigationPropertyBindingImpl.class));
|
||||
entitySet.getNavigationPropertyBindings().add(jp.readValueAs(ClientNavigationPropertyBinding.class));
|
||||
} else if ("Annotation".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
entitySet.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
|
||||
entitySet.getAnnotations().add(jp.readValueAs(ClientAnnotation.class));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -28,17 +28,17 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
@JsonDeserialize(using = EntityTypeImpl.EntityTypeDeserializer.class)
|
||||
public class EntityTypeImpl extends EntityType {
|
||||
@JsonDeserialize(using = ClientEntityType.EntityTypeDeserializer.class)
|
||||
public class ClientEntityType extends EntityType {
|
||||
|
||||
private static final long serialVersionUID = -3986417775876689669L;
|
||||
|
||||
static class EntityTypeDeserializer extends AbstractEdmDeserializer<EntityType> {
|
||||
static class EntityTypeDeserializer extends AbstractClientEdmDeserializer<EntityType> {
|
||||
@Override
|
||||
protected EntityType doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
|
||||
final EntityTypeImpl entityType = new EntityTypeImpl();
|
||||
final ClientEntityType entityType = new ClientEntityType();
|
||||
|
||||
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
||||
|
@ -55,17 +55,17 @@ public class EntityTypeImpl extends EntityType {
|
|||
entityType.setHasStream(BooleanUtils.toBoolean(jp.nextTextValue()));
|
||||
} else if ("Key".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
EntityKeyImpl keyImpl = jp.readValueAs(EntityKeyImpl.class);
|
||||
ClientEntityKey keyImpl = jp.readValueAs(ClientEntityKey.class);
|
||||
entityType.setKey(keyImpl.getPropertyRefs());
|
||||
} else if ("Property".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
entityType.getProperties().add(jp.readValueAs(PropertyImpl.class));
|
||||
entityType.getProperties().add(jp.readValueAs(ClientProperty.class));
|
||||
} else if ("NavigationProperty".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
entityType.getNavigationProperties().add(jp.readValueAs(NavigationPropertyImpl.class));
|
||||
entityType.getNavigationProperties().add(jp.readValueAs(ClientNavigationProperty.class));
|
||||
} else if ("Annotation".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
entityType.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
|
||||
entityType.getAnnotations().add(jp.readValueAs(ClientAnnotation.class));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -26,12 +26,12 @@ import org.apache.olingo.commons.api.edm.provider.EnumMember;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
@JsonDeserialize(using = EnumMemberImpl.EnumMemberDeserializer.class)
|
||||
public class EnumMemberImpl extends EnumMember {
|
||||
@JsonDeserialize(using = ClientEnumMember.EnumMemberDeserializer.class)
|
||||
public class ClientEnumMember extends EnumMember {
|
||||
|
||||
private static final long serialVersionUID = -6138606817225829791L;
|
||||
|
||||
static class EnumMemberDeserializer extends AbstractEdmDeserializer<EnumMember> {
|
||||
static class EnumMemberDeserializer extends AbstractClientEdmDeserializer<EnumMember> {
|
||||
@Override
|
||||
protected EnumMember doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
|
@ -47,7 +47,7 @@ public class EnumMemberImpl extends EnumMember {
|
|||
member.setValue(jp.nextTextValue());
|
||||
} else if ("Annotation".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
member.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
|
||||
member.getAnnotations().add(jp.readValueAs(ClientAnnotation.class));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -28,17 +28,17 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
@JsonDeserialize(using = EnumTypeImpl.EnumTypeDeserializer.class)
|
||||
public class EnumTypeImpl extends EnumType {
|
||||
@JsonDeserialize(using = ClientEnumType.EnumTypeDeserializer.class)
|
||||
public class ClientEnumType extends EnumType {
|
||||
|
||||
private static final long serialVersionUID = 9191189755592743333L;
|
||||
|
||||
static class EnumTypeDeserializer extends AbstractEdmDeserializer<EnumTypeImpl> {
|
||||
static class EnumTypeDeserializer extends AbstractClientEdmDeserializer<ClientEnumType> {
|
||||
@Override
|
||||
protected EnumTypeImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
protected ClientEnumType doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
|
||||
final EnumTypeImpl enumType = new EnumTypeImpl();
|
||||
final ClientEnumType enumType = new ClientEnumType();
|
||||
|
||||
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
||||
|
@ -51,10 +51,10 @@ public class EnumTypeImpl extends EnumType {
|
|||
enumType.setFlags(BooleanUtils.toBoolean(jp.nextTextValue()));
|
||||
} else if ("Member".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
enumType.getMembers().add(jp.readValueAs(EnumMemberImpl.class));
|
||||
enumType.getMembers().add(jp.readValueAs(ClientEnumMember.class));
|
||||
} else if ("Annotation".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
enumType.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
|
||||
enumType.getAnnotations().add(jp.readValueAs(ClientAnnotation.class));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -28,17 +28,17 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
@JsonDeserialize(using = FunctionImpl.FunctionDeserializer.class)
|
||||
public class FunctionImpl extends Function {
|
||||
@JsonDeserialize(using = ClientFunction.FunctionDeserializer.class)
|
||||
public class ClientFunction extends Function {
|
||||
|
||||
private static final long serialVersionUID = -5494898295282843362L;
|
||||
|
||||
static class FunctionDeserializer extends AbstractEdmDeserializer<FunctionImpl> {
|
||||
static class FunctionDeserializer extends AbstractClientEdmDeserializer<ClientFunction> {
|
||||
@Override
|
||||
protected FunctionImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
protected ClientFunction doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
|
||||
final FunctionImpl functionImpl = new FunctionImpl();
|
||||
final ClientFunction functionImpl = new ClientFunction();
|
||||
|
||||
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
||||
|
@ -53,12 +53,12 @@ public class FunctionImpl extends Function {
|
|||
functionImpl.setEntitySetPath(jp.nextTextValue());
|
||||
} else if ("Parameter".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
functionImpl.getParameters().add(jp.readValueAs(ParameterImpl.class));
|
||||
functionImpl.getParameters().add(jp.readValueAs(ClientParameter.class));
|
||||
} else if ("ReturnType".equals(jp.getCurrentName())) {
|
||||
functionImpl.setReturnType(parseReturnType(jp, "Function"));
|
||||
} else if ("Annotation".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
functionImpl.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
|
||||
functionImpl.getAnnotations().add(jp.readValueAs(ClientAnnotation.class));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -28,17 +28,17 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
@JsonDeserialize(using = FunctionImportImpl.FunctionImportDeserializer.class)
|
||||
public class FunctionImportImpl extends FunctionImport {
|
||||
@JsonDeserialize(using = ClientFunctionImport.FunctionImportDeserializer.class)
|
||||
public class ClientFunctionImport extends FunctionImport {
|
||||
|
||||
private static final long serialVersionUID = -1686801084142932402L;
|
||||
|
||||
static class FunctionImportDeserializer extends AbstractEdmDeserializer<FunctionImportImpl> {
|
||||
static class FunctionImportDeserializer extends AbstractClientEdmDeserializer<ClientFunctionImport> {
|
||||
@Override
|
||||
protected FunctionImportImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
protected ClientFunctionImport doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
|
||||
final FunctionImportImpl functImpImpl = new FunctionImportImpl();
|
||||
final ClientFunctionImport functImpImpl = new ClientFunctionImport();
|
||||
|
||||
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
||||
|
@ -53,7 +53,7 @@ public class FunctionImportImpl extends FunctionImport {
|
|||
functImpImpl.setIncludeInServiceDocument(BooleanUtils.toBoolean(jp.nextTextValue()));
|
||||
} else if ("Annotation".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
functImpImpl.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
|
||||
functImpImpl.getAnnotations().add(jp.readValueAs(ClientAnnotation.class));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -27,8 +27,8 @@ import org.apache.olingo.commons.api.edm.provider.AbstractEdmItem;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
@JsonDeserialize(using = IncludeImpl.IncludeDeserializer.class)
|
||||
public class IncludeImpl extends AbstractEdmItem implements Include {
|
||||
@JsonDeserialize(using = ClientInclude.IncludeDeserializer.class)
|
||||
public class ClientInclude extends AbstractEdmItem implements Include {
|
||||
|
||||
private static final long serialVersionUID = -5450008299655584221L;
|
||||
|
||||
|
@ -53,12 +53,12 @@ public class IncludeImpl extends AbstractEdmItem implements Include {
|
|||
this.alias = alias;
|
||||
}
|
||||
|
||||
static class IncludeDeserializer extends AbstractEdmDeserializer<Include> {
|
||||
static class IncludeDeserializer extends AbstractClientEdmDeserializer<Include> {
|
||||
@Override
|
||||
protected Include doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
|
||||
final IncludeImpl include = new IncludeImpl();
|
||||
final ClientInclude include = new ClientInclude();
|
||||
|
||||
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
|
@ -27,8 +27,8 @@ import org.apache.olingo.commons.api.edm.provider.AbstractEdmItem;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
@JsonDeserialize(using = IncludeAnnotationsImpl.IncludeAnnotationsDeserializer.class)
|
||||
public class IncludeAnnotationsImpl extends AbstractEdmItem implements IncludeAnnotations {
|
||||
@JsonDeserialize(using = ClientIncludeAnnotations.IncludeAnnotationsDeserializer.class)
|
||||
public class ClientIncludeAnnotations extends AbstractEdmItem implements IncludeAnnotations {
|
||||
|
||||
private static final long serialVersionUID = -8157841387011422396L;
|
||||
|
||||
|
@ -63,12 +63,12 @@ public class IncludeAnnotationsImpl extends AbstractEdmItem implements IncludeAn
|
|||
this.targetNamespace = targetNamespace;
|
||||
}
|
||||
|
||||
static class IncludeAnnotationsDeserializer extends AbstractEdmDeserializer<IncludeAnnotations> {
|
||||
static class IncludeAnnotationsDeserializer extends AbstractClientEdmDeserializer<IncludeAnnotations> {
|
||||
@Override
|
||||
protected IncludeAnnotations doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
|
||||
final IncludeAnnotationsImpl member = new IncludeAnnotationsImpl();
|
||||
final ClientIncludeAnnotations member = new ClientIncludeAnnotations();
|
||||
|
||||
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
|
@ -28,18 +28,18 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
@JsonDeserialize(using = NavigationPropertyImpl.NavigationPropertyDeserializer.class)
|
||||
public class NavigationPropertyImpl extends NavigationProperty {
|
||||
@JsonDeserialize(using = ClientNavigationProperty.NavigationPropertyDeserializer.class)
|
||||
public class ClientNavigationProperty extends NavigationProperty {
|
||||
|
||||
private static final long serialVersionUID = 6240231735592427582L;
|
||||
|
||||
static class NavigationPropertyDeserializer extends AbstractEdmDeserializer<NavigationProperty> {
|
||||
static class NavigationPropertyDeserializer extends AbstractClientEdmDeserializer<NavigationProperty> {
|
||||
|
||||
@Override
|
||||
protected NavigationProperty doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
|
||||
final NavigationProperty property = new NavigationPropertyImpl();
|
||||
final NavigationProperty property = new ClientNavigationProperty();
|
||||
|
||||
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
||||
|
@ -64,13 +64,13 @@ public class NavigationPropertyImpl extends NavigationProperty {
|
|||
property.setContainsTarget(BooleanUtils.toBoolean(jp.nextTextValue()));
|
||||
} else if ("ReferentialConstraint".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
property.getReferentialConstraints().add(jp.readValueAs(ReferentialConstraintImpl.class));
|
||||
property.getReferentialConstraints().add(jp.readValueAs(ClientReferentialConstraint.class));
|
||||
} else if ("OnDelete".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
property.setOnDelete(jp.readValueAs(OnDeleteImpl.class));
|
||||
property.setOnDelete(jp.readValueAs(ClientOnDelete.class));
|
||||
} else if ("Annotation".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
property.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
|
||||
property.getAnnotations().add(jp.readValueAs(ClientAnnotation.class));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -26,8 +26,8 @@ import org.apache.olingo.commons.api.edm.provider.NavigationPropertyBinding;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
@JsonDeserialize(using = NavigationPropertyBindingImpl.NavigationPropertyBindingDeserializer.class)
|
||||
public class NavigationPropertyBindingImpl extends NavigationPropertyBinding {
|
||||
@JsonDeserialize(using = ClientNavigationPropertyBinding.NavigationPropertyBindingDeserializer.class)
|
||||
public class ClientNavigationPropertyBinding extends NavigationPropertyBinding {
|
||||
|
||||
private static final long serialVersionUID = -7056978592235483660L;
|
||||
|
||||
|
@ -43,12 +43,12 @@ public class NavigationPropertyBindingImpl extends NavigationPropertyBinding {
|
|||
return this;
|
||||
}
|
||||
|
||||
static class NavigationPropertyBindingDeserializer extends AbstractEdmDeserializer<NavigationPropertyBinding> {
|
||||
static class NavigationPropertyBindingDeserializer extends AbstractClientEdmDeserializer<NavigationPropertyBinding> {
|
||||
@Override
|
||||
protected NavigationPropertyBinding doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
|
||||
final NavigationPropertyBindingImpl member = new NavigationPropertyBindingImpl();
|
||||
final ClientNavigationPropertyBinding member = new ClientNavigationPropertyBinding();
|
||||
|
||||
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
|
@ -27,17 +27,17 @@ import org.apache.olingo.commons.api.edm.provider.OnDeleteAction;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
@JsonDeserialize(using = OnDeleteImpl.OnDeleteDeserializer.class)
|
||||
public class OnDeleteImpl extends OnDelete {
|
||||
@JsonDeserialize(using = ClientOnDelete.OnDeleteDeserializer.class)
|
||||
public class ClientOnDelete extends OnDelete {
|
||||
|
||||
private static final long serialVersionUID = -7130889202653716784L;
|
||||
|
||||
static class OnDeleteDeserializer extends AbstractEdmDeserializer<OnDelete> {
|
||||
static class OnDeleteDeserializer extends AbstractClientEdmDeserializer<OnDelete> {
|
||||
@Override
|
||||
protected OnDelete doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
|
||||
final OnDelete ondelete = new OnDeleteImpl();
|
||||
final OnDelete ondelete = new ClientOnDelete();
|
||||
|
||||
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
|
@ -29,17 +29,17 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
@JsonDeserialize(using = ParameterImpl.ParameterDeserializer.class)
|
||||
public class ParameterImpl extends Parameter {
|
||||
@JsonDeserialize(using = ClientParameter.ParameterDeserializer.class)
|
||||
public class ClientParameter extends Parameter {
|
||||
|
||||
private static final long serialVersionUID = 7119478691341167904L;
|
||||
|
||||
static class ParameterDeserializer extends AbstractEdmDeserializer<ParameterImpl> {
|
||||
static class ParameterDeserializer extends AbstractClientEdmDeserializer<ClientParameter> {
|
||||
@Override
|
||||
protected ParameterImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
protected ClientParameter doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
|
||||
final ParameterImpl parameter = new ParameterImpl();
|
||||
final ClientParameter parameter = new ClientParameter();
|
||||
|
||||
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
||||
|
@ -73,7 +73,7 @@ public class ParameterImpl extends Parameter {
|
|||
}
|
||||
} else if ("Annotation".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
parameter.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
|
||||
parameter.getAnnotations().add(jp.readValueAs(ClientAnnotation.class));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -29,17 +29,17 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
@JsonDeserialize(using = PropertyImpl.PropertyDeserializer.class)
|
||||
public class PropertyImpl extends Property {
|
||||
@JsonDeserialize(using = ClientProperty.PropertyDeserializer.class)
|
||||
public class ClientProperty extends Property {
|
||||
|
||||
private static final long serialVersionUID = -4521766603286651372L;
|
||||
|
||||
static class PropertyDeserializer extends AbstractEdmDeserializer<PropertyImpl> {
|
||||
static class PropertyDeserializer extends AbstractClientEdmDeserializer<ClientProperty> {
|
||||
@Override
|
||||
protected PropertyImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
protected ClientProperty doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
|
||||
final PropertyImpl property = new org.apache.olingo.client.core.edm.xml.PropertyImpl();
|
||||
final ClientProperty property = new ClientProperty();
|
||||
|
||||
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
||||
|
@ -77,7 +77,7 @@ public class PropertyImpl extends Property {
|
|||
}
|
||||
} else if ("Annotation".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
property.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
|
||||
property.getAnnotations().add(jp.readValueAs(ClientAnnotation.class));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -26,17 +26,17 @@ import org.apache.olingo.commons.api.edm.provider.PropertyRef;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
@JsonDeserialize(using = PropertyRefImpl.PropertyRefDeserializer.class)
|
||||
public class PropertyRefImpl extends PropertyRef {
|
||||
@JsonDeserialize(using = ClientPropertyRef.PropertyRefDeserializer.class)
|
||||
public class ClientPropertyRef extends PropertyRef {
|
||||
|
||||
private static final long serialVersionUID = 1504095609268590326L;
|
||||
|
||||
static class PropertyRefDeserializer extends AbstractEdmDeserializer<PropertyRef> {
|
||||
static class PropertyRefDeserializer extends AbstractClientEdmDeserializer<PropertyRef> {
|
||||
@Override
|
||||
protected PropertyRef doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
|
||||
final PropertyRef propertyRef = new PropertyRefImpl();
|
||||
final PropertyRef propertyRef = new ClientPropertyRef();
|
||||
|
||||
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
|
@ -34,8 +34,8 @@ import org.apache.olingo.commons.api.edm.provider.Annotation;
|
|||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
|
||||
@JsonDeserialize(using = ReferenceImpl.ReferenceDeserializer.class)
|
||||
public class ReferenceImpl extends AbstractEdmItem implements Reference {
|
||||
@JsonDeserialize(using = ClientReference.ReferenceDeserializer.class)
|
||||
public class ClientReference extends AbstractEdmItem implements Reference {
|
||||
|
||||
private static final long serialVersionUID = 7720274712545267654L;
|
||||
|
||||
|
@ -68,11 +68,11 @@ public class ReferenceImpl extends AbstractEdmItem implements Reference {
|
|||
return includeAnnotations;
|
||||
}
|
||||
|
||||
static class ReferenceDeserializer extends AbstractEdmDeserializer<ReferenceImpl> {
|
||||
static class ReferenceDeserializer extends AbstractClientEdmDeserializer<ClientReference> {
|
||||
@Override
|
||||
protected ReferenceImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
protected ClientReference doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
final ReferenceImpl reference = new ReferenceImpl();
|
||||
final ClientReference reference = new ClientReference();
|
||||
|
||||
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
||||
|
@ -81,13 +81,13 @@ public class ReferenceImpl extends AbstractEdmItem implements Reference {
|
|||
reference.setUri(URI.create(jp.nextTextValue()));
|
||||
} else if ("Include".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
reference.getIncludes().add(jp.readValueAs( IncludeImpl.class));
|
||||
reference.getIncludes().add(jp.readValueAs( ClientInclude.class));
|
||||
} else if ("IncludeAnnotations".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
reference.getIncludeAnnotations().add(jp.readValueAs( IncludeAnnotationsImpl.class));
|
||||
reference.getIncludeAnnotations().add(jp.readValueAs( ClientIncludeAnnotations.class));
|
||||
} else if ("Annotation".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
reference.getAnnotations().add(jp.readValueAs( AnnotationImpl.class));
|
||||
reference.getAnnotations().add(jp.readValueAs( ClientAnnotation.class));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -26,17 +26,17 @@ import org.apache.olingo.commons.api.edm.provider.ReferentialConstraint;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
@JsonDeserialize(using = ReferentialConstraintImpl.ReferentialConstraintDeserializer.class)
|
||||
public class ReferentialConstraintImpl extends ReferentialConstraint {
|
||||
@JsonDeserialize(using = ClientReferentialConstraint.ReferentialConstraintDeserializer.class)
|
||||
public class ClientReferentialConstraint extends ReferentialConstraint {
|
||||
|
||||
private static final long serialVersionUID = -5822115908069878139L;
|
||||
|
||||
static class ReferentialConstraintDeserializer extends AbstractEdmDeserializer<ReferentialConstraint> {
|
||||
static class ReferentialConstraintDeserializer extends AbstractClientEdmDeserializer<ReferentialConstraint> {
|
||||
@Override
|
||||
protected ReferentialConstraint doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
|
||||
final ReferentialConstraint refConst = new ReferentialConstraintImpl();
|
||||
final ReferentialConstraint refConst = new ClientReferentialConstraint();
|
||||
|
||||
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
|
@ -29,16 +29,16 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
@JsonDeserialize(using = ReturnTypeImpl.ReturnTypeDeserializer.class)
|
||||
public class ReturnTypeImpl extends ReturnType {
|
||||
@JsonDeserialize(using = ClientReturnType.ReturnTypeDeserializer.class)
|
||||
public class ClientReturnType extends ReturnType {
|
||||
|
||||
private static final long serialVersionUID = 6261092793901735110L;
|
||||
|
||||
static class ReturnTypeDeserializer extends AbstractEdmDeserializer<ReturnTypeImpl> {
|
||||
static class ReturnTypeDeserializer extends AbstractClientEdmDeserializer<ClientReturnType> {
|
||||
@Override
|
||||
protected ReturnTypeImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
protected ClientReturnType doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
final ReturnTypeImpl returnType = new ReturnTypeImpl();
|
||||
final ClientReturnType returnType = new ClientReturnType();
|
||||
|
||||
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
|
@ -27,16 +27,16 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
@JsonDeserialize(using = SchemaImpl.SchemaDeserializer.class)
|
||||
public class SchemaImpl extends Schema {
|
||||
@JsonDeserialize(using = ClientSchema.SchemaDeserializer.class)
|
||||
public class ClientSchema extends Schema {
|
||||
|
||||
private static final long serialVersionUID = 1911087363912024939L;
|
||||
|
||||
static class SchemaDeserializer extends AbstractEdmDeserializer<SchemaImpl> {
|
||||
static class SchemaDeserializer extends AbstractClientEdmDeserializer<ClientSchema> {
|
||||
@Override
|
||||
protected SchemaImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
protected ClientSchema doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
final SchemaImpl schema = new SchemaImpl();
|
||||
final ClientSchema schema = new ClientSchema();
|
||||
|
||||
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
||||
|
@ -47,36 +47,36 @@ public class SchemaImpl extends Schema {
|
|||
schema.setAlias(jp.nextTextValue());
|
||||
} else if ("ComplexType".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
schema.getComplexTypes().add(jp.readValueAs(ComplexTypeImpl.class));
|
||||
schema.getComplexTypes().add(jp.readValueAs(ClientComplexType.class));
|
||||
} else if ("EntityType".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
schema.getEntityTypes().add(jp.readValueAs(EntityTypeImpl.class));
|
||||
schema.getEntityTypes().add(jp.readValueAs(ClientEntityType.class));
|
||||
} else if ("EnumType".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
schema.getEnumTypes().add(jp.readValueAs(EnumTypeImpl.class));
|
||||
schema.getEnumTypes().add(jp.readValueAs(ClientEnumType.class));
|
||||
} else if ("EntityContainer".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
EntityContainerImpl entityContainer = jp.readValueAs(EntityContainerImpl.class);
|
||||
ClientEntityContainer entityContainer = jp.readValueAs(ClientEntityContainer.class);
|
||||
schema.setEntityContainer(entityContainer);
|
||||
} else if ("Action".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
schema.getActions().add(jp.readValueAs(ActionImpl.class));
|
||||
schema.getActions().add(jp.readValueAs(ClientAction.class));
|
||||
} else if ("Function".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
schema.getFunctions().add(jp.readValueAs(FunctionImpl.class));
|
||||
schema.getFunctions().add(jp.readValueAs(ClientFunction.class));
|
||||
} else if ("TypeDefinition".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
schema.getTypeDefinitions().add(jp.readValueAs(TypeDefinitionImpl.class));
|
||||
schema.getTypeDefinitions().add(jp.readValueAs(ClientTypeDefinition.class));
|
||||
}
|
||||
} else if ("Annotations".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
schema.getAnnotationGroups().add(jp.readValueAs(AnnotationsImpl.class));
|
||||
schema.getAnnotationGroups().add(jp.readValueAs(ClientAnnotations.class));
|
||||
} else if ("Annotation".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
schema.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
|
||||
schema.getAnnotations().add(jp.readValueAs(ClientAnnotation.class));
|
||||
} else if ("Term".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
schema.getTerms().add(jp.readValueAs(TermImpl.class));
|
||||
schema.getTerms().add(jp.readValueAs(ClientTerm.class));
|
||||
}
|
||||
}
|
||||
|
|
@ -27,16 +27,16 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
@JsonDeserialize(using = SingletonImpl.SingletonDeserializer.class)
|
||||
public class SingletonImpl extends Singleton {
|
||||
@JsonDeserialize(using = ClientSingleton.SingletonDeserializer.class)
|
||||
public class ClientSingleton extends Singleton {
|
||||
|
||||
private static final long serialVersionUID = 1656749615107151921L;
|
||||
|
||||
static class SingletonDeserializer extends AbstractEdmDeserializer<SingletonImpl> {
|
||||
static class SingletonDeserializer extends AbstractClientEdmDeserializer<ClientSingleton> {
|
||||
@Override
|
||||
protected SingletonImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
protected ClientSingleton doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
final SingletonImpl singleton = new SingletonImpl();
|
||||
final ClientSingleton singleton = new ClientSingleton();
|
||||
|
||||
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
||||
|
@ -48,10 +48,10 @@ public class SingletonImpl extends Singleton {
|
|||
} else if ("NavigationPropertyBinding".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
singleton.getNavigationPropertyBindings().add(
|
||||
jp.readValueAs(NavigationPropertyBindingImpl.class));
|
||||
jp.readValueAs(ClientNavigationPropertyBinding.class));
|
||||
} else if ("Annotation".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
singleton.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
|
||||
singleton.getAnnotations().add(jp.readValueAs(ClientAnnotation.class));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -31,16 +31,16 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
|||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
|
||||
@JsonDeserialize(using = TermImpl.TermDeserializer.class)
|
||||
public class TermImpl extends Term {
|
||||
@JsonDeserialize(using = ClientTerm.TermDeserializer.class)
|
||||
public class ClientTerm extends Term {
|
||||
|
||||
private static final long serialVersionUID = -8350072064720586186L;
|
||||
|
||||
static class TermDeserializer extends AbstractEdmDeserializer<TermImpl> {
|
||||
static class TermDeserializer extends AbstractClientEdmDeserializer<ClientTerm> {
|
||||
@Override
|
||||
protected TermImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
protected ClientTerm doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
final TermImpl term = new TermImpl();
|
||||
final ClientTerm term = new ClientTerm();
|
||||
|
||||
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
||||
|
@ -72,7 +72,7 @@ public class TermImpl extends Term {
|
|||
term.getAppliesTo().addAll(Arrays.asList(StringUtils.split(jp.nextTextValue())));
|
||||
} else if ("Annotation".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
term.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
|
||||
term.getAnnotations().add(jp.readValueAs(ClientAnnotation.class));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -29,16 +29,16 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
@JsonDeserialize(using = TypeDefinitionImpl.TypeDefinitionDeserializer.class)
|
||||
public class TypeDefinitionImpl extends TypeDefinition {
|
||||
@JsonDeserialize(using = ClientTypeDefinition.TypeDefinitionDeserializer.class)
|
||||
public class ClientTypeDefinition extends TypeDefinition {
|
||||
|
||||
private static final long serialVersionUID = -902407149079419602L;
|
||||
|
||||
static class TypeDefinitionDeserializer extends AbstractEdmDeserializer<TypeDefinitionImpl> {
|
||||
static class TypeDefinitionDeserializer extends AbstractClientEdmDeserializer<ClientTypeDefinition> {
|
||||
@Override
|
||||
protected TypeDefinitionImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
protected ClientTypeDefinition doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
final TypeDefinitionImpl typeDefinition = new TypeDefinitionImpl();
|
||||
final ClientTypeDefinition typeDefinition = new ClientTypeDefinition();
|
||||
|
||||
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
||||
|
@ -63,7 +63,7 @@ public class TypeDefinitionImpl extends TypeDefinition {
|
|||
}
|
||||
} else if ("Annotation".equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
typeDefinition.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
|
||||
typeDefinition.getAnnotations().add(jp.readValueAs(ClientAnnotation.class));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -32,12 +32,12 @@ import org.apache.olingo.commons.api.edm.provider.Schema;
|
|||
/**
|
||||
* Entry point for access information about EDM metadata.
|
||||
*/
|
||||
public class XMLMetadataImpl extends AbstractEdmItem implements XMLMetadata {
|
||||
public class ClientXMLMetadata extends AbstractEdmItem implements XMLMetadata {
|
||||
|
||||
private static final long serialVersionUID = 6025723060298454901L;
|
||||
protected final Edmx edmx;
|
||||
|
||||
public XMLMetadataImpl(final Edmx edmx) {
|
||||
public ClientXMLMetadata(final Edmx edmx) {
|
||||
this.edmx = edmx;
|
||||
}
|
||||
|
|
@ -24,8 +24,8 @@ import java.util.List;
|
|||
import org.apache.olingo.commons.api.edm.provider.Annotatable;
|
||||
import org.apache.olingo.commons.api.edm.provider.Annotation;
|
||||
|
||||
abstract class AbstractAnnotatableDynamicAnnotationExpression
|
||||
extends AbstractDynamicAnnotationExpression implements Annotatable {
|
||||
abstract class AbstractClientAnnotatableDynamicAnnotationExpression
|
||||
extends AbstractClientDynamicAnnotationExpression implements Annotatable {
|
||||
|
||||
private static final long serialVersionUID = -450668773857358139L;
|
||||
|
|
@ -23,7 +23,7 @@ import org.apache.olingo.commons.api.edm.provider.annotation.AnnotationExpressio
|
|||
import org.apache.olingo.commons.api.edm.provider.annotation.ConstantAnnotationExpression;
|
||||
import org.apache.olingo.commons.api.edm.provider.annotation.DynamicAnnotationExpression;
|
||||
|
||||
public abstract class AbstractAnnotationExpression extends AbstractEdmItem implements AnnotationExpression {
|
||||
public abstract class AbstractClientAnnotationExpression extends AbstractEdmItem implements AnnotationExpression {
|
||||
|
||||
private static final long serialVersionUID = -4238652997159205377L;
|
||||
|
|
@ -25,7 +25,7 @@ import com.fasterxml.jackson.core.JsonToken;
|
|||
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.apache.commons.lang3.ClassUtils;
|
||||
import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
|
||||
import org.apache.olingo.client.core.edm.xml.AbstractClientEdmDeserializer;
|
||||
import org.apache.olingo.commons.api.edm.provider.annotation.AnnotationPath;
|
||||
import org.apache.olingo.commons.api.edm.provider.annotation.Apply;
|
||||
import org.apache.olingo.commons.api.edm.provider.annotation.Cast;
|
||||
|
@ -49,9 +49,9 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
@JsonDeserialize(using = AbstractDynamicAnnotationExpression.DynamicAnnotationExpressionDeserializer.class)
|
||||
public abstract class AbstractDynamicAnnotationExpression
|
||||
extends AbstractAnnotationExpression implements DynamicAnnotationExpression {
|
||||
@JsonDeserialize(using = AbstractClientDynamicAnnotationExpression.DynamicAnnotationExpressionDeserializer.class)
|
||||
public abstract class AbstractClientDynamicAnnotationExpression
|
||||
extends AbstractClientAnnotationExpression implements DynamicAnnotationExpression {
|
||||
|
||||
private static final long serialVersionUID = 1093411847477874348L;
|
||||
|
||||
|
@ -227,7 +227,7 @@ public abstract class AbstractDynamicAnnotationExpression
|
|||
}
|
||||
|
||||
static class DynamicAnnotationExpressionDeserializer
|
||||
extends AbstractEdmDeserializer<AbstractDynamicAnnotationExpression> {
|
||||
extends AbstractClientEdmDeserializer<AbstractClientDynamicAnnotationExpression> {
|
||||
|
||||
private static final String[] EL_OR_ATTR = {
|
||||
AnnotationPath.class.getSimpleName(), NavigationPropertyPath.class.getSimpleName(),
|
||||
|
@ -244,26 +244,26 @@ public abstract class AbstractDynamicAnnotationExpression
|
|||
private static final String RECORD = Record.class.getSimpleName();
|
||||
private static final String URL_REF = UrlRef.class.getSimpleName();
|
||||
|
||||
private AbstractElementOrAttributeExpression getElementOrAttributeExpression(final String simpleClassName)
|
||||
private AbstractClientElementOrAttributeExpression getElementOrAttributeExpression(final String simpleClassName)
|
||||
throws JsonParseException {
|
||||
|
||||
try {
|
||||
@SuppressWarnings("unchecked")
|
||||
Class<? extends AbstractElementOrAttributeExpression> elOrAttrClass =
|
||||
(Class<? extends AbstractElementOrAttributeExpression>) ClassUtils.getClass(
|
||||
getClass().getPackage().getName() + "." + simpleClassName + "Impl");
|
||||
Class<? extends AbstractClientElementOrAttributeExpression> elOrAttrClass =
|
||||
(Class<? extends AbstractClientElementOrAttributeExpression>) ClassUtils.getClass(
|
||||
getClass().getPackage().getName() + ".Client" + simpleClassName);
|
||||
return elOrAttrClass.newInstance();
|
||||
} catch (Exception e) {
|
||||
throw new JsonParseException("Could not instantiate " + simpleClassName, JsonLocation.NA, e);
|
||||
}
|
||||
}
|
||||
|
||||
private AbstractAnnotationExpression parseConstOrEnumExpression(final JsonParser jp) throws IOException {
|
||||
AbstractAnnotationExpression result;
|
||||
private AbstractClientAnnotationExpression parseConstOrEnumExpression(final JsonParser jp) throws IOException {
|
||||
AbstractClientAnnotationExpression result;
|
||||
if (isAnnotationConstExprConstruct(jp)) {
|
||||
result = parseAnnotationConstExprConstruct(jp);
|
||||
} else {
|
||||
result = jp.readValueAs(AbstractDynamicAnnotationExpression.class);
|
||||
result = jp.readValueAs(AbstractClientDynamicAnnotationExpression.class);
|
||||
}
|
||||
jp.nextToken();
|
||||
|
||||
|
@ -271,20 +271,20 @@ public abstract class AbstractDynamicAnnotationExpression
|
|||
}
|
||||
|
||||
@Override
|
||||
protected AbstractDynamicAnnotationExpression doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
protected AbstractClientDynamicAnnotationExpression doDeserialize(final JsonParser jp,
|
||||
final DeserializationContext ctxt) throws IOException {
|
||||
|
||||
AbstractDynamicAnnotationExpression expression = null;
|
||||
AbstractClientDynamicAnnotationExpression expression = null;
|
||||
|
||||
if ("Not".equals(jp.getCurrentName())) {
|
||||
final NotImpl not = new NotImpl();
|
||||
final ClientNot not = new ClientNot();
|
||||
|
||||
jp.nextToken();
|
||||
//Search for field name
|
||||
while (jp.getCurrentToken() != JsonToken.FIELD_NAME) {
|
||||
jp.nextToken();
|
||||
}
|
||||
not.setExpression(jp.readValueAs(AbstractDynamicAnnotationExpression.class));
|
||||
not.setExpression(jp.readValueAs(AbstractClientDynamicAnnotationExpression.class));
|
||||
//Search for end object
|
||||
while (jp.getCurrentToken() != JsonToken.END_OBJECT || !jp.getCurrentName().equals("Not")) {
|
||||
jp.nextToken();
|
||||
|
@ -292,8 +292,8 @@ public abstract class AbstractDynamicAnnotationExpression
|
|||
|
||||
expression = not;
|
||||
} else if (TwoParamsOpDynamicAnnotationExpression.Type.fromString(jp.getCurrentName()) != null) {
|
||||
final TwoParamsOpDynamicAnnotationExpressionImpl dynExprDoubleParamOp =
|
||||
new TwoParamsOpDynamicAnnotationExpressionImpl();
|
||||
final ClientTwoParamsOpDynamicAnnotationExpression dynExprDoubleParamOp =
|
||||
new ClientTwoParamsOpDynamicAnnotationExpression();
|
||||
dynExprDoubleParamOp.setType(TwoParamsOpDynamicAnnotationExpression.Type.fromString(jp.getCurrentName()));
|
||||
|
||||
jp.nextToken();
|
||||
|
@ -301,8 +301,8 @@ public abstract class AbstractDynamicAnnotationExpression
|
|||
while (jp.getCurrentToken() != JsonToken.FIELD_NAME) {
|
||||
jp.nextToken();
|
||||
}
|
||||
dynExprDoubleParamOp.setLeftExpression(jp.readValueAs(AbstractDynamicAnnotationExpression.class));
|
||||
dynExprDoubleParamOp.setRightExpression(jp.readValueAs(AbstractDynamicAnnotationExpression.class));
|
||||
dynExprDoubleParamOp.setLeftExpression(jp.readValueAs(AbstractClientDynamicAnnotationExpression.class));
|
||||
dynExprDoubleParamOp.setRightExpression(jp.readValueAs(AbstractClientDynamicAnnotationExpression.class));
|
||||
//Search for expression
|
||||
while (jp.getCurrentToken() != JsonToken.END_OBJECT || !jp.getCurrentName().equals(dynExprDoubleParamOp
|
||||
.getType().name())) {
|
||||
|
@ -311,23 +311,24 @@ public abstract class AbstractDynamicAnnotationExpression
|
|||
|
||||
expression = dynExprDoubleParamOp;
|
||||
} else if (ArrayUtils.contains(EL_OR_ATTR, jp.getCurrentName())) {
|
||||
final AbstractElementOrAttributeExpression elOrAttr = getElementOrAttributeExpression(jp.getCurrentName());
|
||||
final AbstractClientElementOrAttributeExpression elOrAttr =
|
||||
getElementOrAttributeExpression(jp.getCurrentName());
|
||||
elOrAttr.setValue(jp.nextTextValue());
|
||||
expression = elOrAttr;
|
||||
} else if (APPLY.equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
expression = jp.readValueAs(ApplyImpl.class);
|
||||
expression = jp.readValueAs(ClientApply.class);
|
||||
} else if (CAST.equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
expression = jp.readValueAs(CastImpl.class);
|
||||
expression = jp.readValueAs(ClientCast.class);
|
||||
} else if (COLLECTION.equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
expression = jp.readValueAs(CollectionImpl.class);
|
||||
expression = jp.readValueAs(ClientCollection.class);
|
||||
} else if (IF.equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
jp.nextToken();
|
||||
|
||||
final IfImpl ifImpl = new IfImpl();
|
||||
final ClientIf ifImpl = new ClientIf();
|
||||
ifImpl.setGuard(parseConstOrEnumExpression(jp));
|
||||
ifImpl.setThen(parseConstOrEnumExpression(jp));
|
||||
ifImpl.setElse(parseConstOrEnumExpression(jp));
|
||||
|
@ -335,19 +336,19 @@ public abstract class AbstractDynamicAnnotationExpression
|
|||
expression = ifImpl;
|
||||
} else if (IS_OF.equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
expression = jp.readValueAs(IsOfImpl.class);
|
||||
expression = jp.readValueAs(ClientIsOf.class);
|
||||
} else if (LABELED_ELEMENT.equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
expression = jp.readValueAs(LabeledElementImpl.class);
|
||||
expression = jp.readValueAs(ClientLabeledElement.class);
|
||||
} else if (NULL.equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
expression = jp.readValueAs(NullImpl.class);
|
||||
expression = jp.readValueAs(ClientNull.class);
|
||||
} else if (RECORD.equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
expression = jp.readValueAs(RecordImpl.class);
|
||||
expression = jp.readValueAs(ClientRecord.class);
|
||||
} else if (URL_REF.equals(jp.getCurrentName())) {
|
||||
jp.nextToken();
|
||||
expression = jp.readValueAs(UrlRefImpl.class);
|
||||
expression = jp.readValueAs(ClientUrlRef.class);
|
||||
}
|
||||
|
||||
return expression;
|
|
@ -21,7 +21,7 @@ package org.apache.olingo.client.core.edm.xml.annotation;
|
|||
/**
|
||||
* Groups dynamic expressions that may be provided using element notation or attribute notation.
|
||||
*/
|
||||
abstract class AbstractElementOrAttributeExpression extends AbstractDynamicAnnotationExpression {
|
||||
abstract class AbstractClientElementOrAttributeExpression extends AbstractClientDynamicAnnotationExpression {
|
||||
|
||||
private static final long serialVersionUID = 1588336268773032932L;
|
||||
|
|
@ -20,7 +20,7 @@ package org.apache.olingo.client.core.edm.xml.annotation;
|
|||
|
||||
import org.apache.olingo.commons.api.edm.provider.annotation.AnnotationPath;
|
||||
|
||||
public class AnnotationPathImpl extends AbstractElementOrAttributeExpression implements AnnotationPath {
|
||||
public class ClientAnnotationPath extends AbstractClientElementOrAttributeExpression implements AnnotationPath {
|
||||
|
||||
private static final long serialVersionUID = 5360735207353494466L;
|
||||
|
|
@ -25,15 +25,15 @@ import java.util.List;
|
|||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonToken;
|
||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
|
||||
import org.apache.olingo.client.core.edm.xml.AnnotationImpl;
|
||||
import org.apache.olingo.client.core.edm.xml.AbstractClientEdmDeserializer;
|
||||
import org.apache.olingo.client.core.edm.xml.ClientAnnotation;
|
||||
import org.apache.olingo.commons.api.edm.provider.annotation.AnnotationExpression;
|
||||
import org.apache.olingo.commons.api.edm.provider.annotation.Apply;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
|
||||
@JsonDeserialize(using = ApplyImpl.ApplyDeserializer.class)
|
||||
public class ApplyImpl extends AbstractAnnotatableDynamicAnnotationExpression implements Apply {
|
||||
@JsonDeserialize(using = ClientApply.ApplyDeserializer.class)
|
||||
public class ClientApply extends AbstractClientAnnotatableDynamicAnnotationExpression implements Apply {
|
||||
|
||||
private static final long serialVersionUID = 4358398303405059879L;
|
||||
|
||||
|
@ -55,23 +55,23 @@ public class ApplyImpl extends AbstractAnnotatableDynamicAnnotationExpression im
|
|||
return parameters;
|
||||
}
|
||||
|
||||
static class ApplyDeserializer extends AbstractEdmDeserializer<ApplyImpl> {
|
||||
static class ApplyDeserializer extends AbstractClientEdmDeserializer<ClientApply> {
|
||||
|
||||
@Override
|
||||
protected ApplyImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
protected ClientApply doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
final ApplyImpl apply = new ApplyImpl();
|
||||
final ClientApply apply = new ClientApply();
|
||||
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
||||
if (token == JsonToken.FIELD_NAME) {
|
||||
if ("Function".equals(jp.getCurrentName())) {
|
||||
apply.setFunction(jp.nextTextValue());
|
||||
} else if ("Annotation".equals(jp.getCurrentName())) {
|
||||
apply.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
|
||||
apply.getAnnotations().add(jp.readValueAs(ClientAnnotation.class));
|
||||
} else if (isAnnotationConstExprConstruct(jp)) {
|
||||
apply.getParameters().add(parseAnnotationConstExprConstruct(jp));
|
||||
} else {
|
||||
apply.getParameters().add(jp.readValueAs(AbstractDynamicAnnotationExpression.class));
|
||||
apply.getParameters().add(jp.readValueAs(AbstractClientDynamicAnnotationExpression.class));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -21,8 +21,8 @@ package org.apache.olingo.client.core.edm.xml.annotation;
|
|||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonToken;
|
||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
|
||||
import org.apache.olingo.client.core.edm.xml.AnnotationImpl;
|
||||
import org.apache.olingo.client.core.edm.xml.AbstractClientEdmDeserializer;
|
||||
import org.apache.olingo.client.core.edm.xml.ClientAnnotation;
|
||||
import org.apache.olingo.commons.api.edm.geo.SRID;
|
||||
import org.apache.olingo.commons.api.edm.provider.annotation.Cast;
|
||||
import org.apache.olingo.commons.api.edm.provider.annotation.DynamicAnnotationExpression;
|
||||
|
@ -31,8 +31,8 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
@JsonDeserialize(using = CastImpl.CastDeserializer.class)
|
||||
public class CastImpl extends AbstractAnnotatableDynamicAnnotationExpression implements Cast {
|
||||
@JsonDeserialize(using = ClientCast.CastDeserializer.class)
|
||||
public class ClientCast extends AbstractClientAnnotatableDynamicAnnotationExpression implements Cast {
|
||||
|
||||
private static final long serialVersionUID = 3312415984116005313L;
|
||||
|
||||
|
@ -102,19 +102,19 @@ public class CastImpl extends AbstractAnnotatableDynamicAnnotationExpression imp
|
|||
this.value = value;
|
||||
}
|
||||
|
||||
static class CastDeserializer extends AbstractEdmDeserializer<CastImpl> {
|
||||
static class CastDeserializer extends AbstractClientEdmDeserializer<ClientCast> {
|
||||
|
||||
@Override
|
||||
protected CastImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
protected ClientCast doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
final CastImpl cast = new CastImpl();
|
||||
final ClientCast cast = new ClientCast();
|
||||
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
||||
if (token == JsonToken.FIELD_NAME) {
|
||||
if ("Type".equals(jp.getCurrentName())) {
|
||||
cast.setType(jp.nextTextValue());
|
||||
} else if ("Annotation".equals(jp.getCurrentName())) {
|
||||
cast.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
|
||||
cast.getAnnotations().add(jp.readValueAs(ClientAnnotation.class));
|
||||
} else if ("MaxLength".equals(jp.getCurrentName())) {
|
||||
final String maxLenght = jp.nextTextValue();
|
||||
cast.setMaxLength(maxLenght.equalsIgnoreCase("max") ? Integer.MAX_VALUE : Integer.valueOf(maxLenght));
|
||||
|
@ -129,7 +129,7 @@ public class CastImpl extends AbstractAnnotatableDynamicAnnotationExpression imp
|
|||
cast.setSrid(SRID.valueOf(srid));
|
||||
}
|
||||
} else {
|
||||
cast.setValue(jp.readValueAs(AbstractDynamicAnnotationExpression.class));
|
||||
cast.setValue(jp.readValueAs(AbstractClientDynamicAnnotationExpression.class));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -25,14 +25,14 @@ import java.util.List;
|
|||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonToken;
|
||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
|
||||
import org.apache.olingo.client.core.edm.xml.AbstractClientEdmDeserializer;
|
||||
import org.apache.olingo.commons.api.edm.provider.annotation.AnnotationExpression;
|
||||
import org.apache.olingo.commons.api.edm.provider.annotation.Collection;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
|
||||
@JsonDeserialize(using = CollectionImpl.CollectionDeserializer.class)
|
||||
public class CollectionImpl extends AbstractDynamicAnnotationExpression implements Collection {
|
||||
@JsonDeserialize(using = ClientCollection.CollectionDeserializer.class)
|
||||
public class ClientCollection extends AbstractClientDynamicAnnotationExpression implements Collection {
|
||||
|
||||
private static final long serialVersionUID = -724749123749715643L;
|
||||
|
||||
|
@ -43,18 +43,18 @@ public class CollectionImpl extends AbstractDynamicAnnotationExpression implemen
|
|||
return items;
|
||||
}
|
||||
|
||||
static class CollectionDeserializer extends AbstractEdmDeserializer<CollectionImpl> {
|
||||
static class CollectionDeserializer extends AbstractClientEdmDeserializer<ClientCollection> {
|
||||
@Override
|
||||
protected CollectionImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
protected ClientCollection doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
final CollectionImpl collection = new CollectionImpl();
|
||||
final ClientCollection collection = new ClientCollection();
|
||||
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
||||
if (token == JsonToken.FIELD_NAME) {
|
||||
if (isAnnotationConstExprConstruct(jp)) {
|
||||
collection.getItems().add(parseAnnotationConstExprConstruct(jp));
|
||||
} else {
|
||||
collection.getItems().add(jp.readValueAs(AbstractDynamicAnnotationExpression.class));
|
||||
collection.getItems().add(jp.readValueAs(AbstractClientDynamicAnnotationExpression.class));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -20,8 +20,8 @@ package org.apache.olingo.client.core.edm.xml.annotation;
|
|||
|
||||
import org.apache.olingo.commons.api.edm.provider.annotation.ConstantAnnotationExpression;
|
||||
|
||||
public class ConstantAnnotationExpressionImpl
|
||||
extends AbstractAnnotationExpression implements ConstantAnnotationExpression {
|
||||
public class ClientConstantAnnotationExpression
|
||||
extends AbstractClientAnnotationExpression implements ConstantAnnotationExpression {
|
||||
|
||||
private static final long serialVersionUID = 5618680702707972904L;
|
||||
|
|
@ -21,7 +21,7 @@ package org.apache.olingo.client.core.edm.xml.annotation;
|
|||
import org.apache.olingo.commons.api.edm.provider.annotation.AnnotationExpression;
|
||||
import org.apache.olingo.commons.api.edm.provider.annotation.If;
|
||||
|
||||
public class IfImpl extends AbstractAnnotatableDynamicAnnotationExpression implements If {
|
||||
public class ClientIf extends AbstractClientAnnotatableDynamicAnnotationExpression implements If {
|
||||
|
||||
private static final long serialVersionUID = -8571383625077590656L;
|
||||
|
|
@ -21,8 +21,8 @@ package org.apache.olingo.client.core.edm.xml.annotation;
|
|||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonToken;
|
||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
|
||||
import org.apache.olingo.client.core.edm.xml.AnnotationImpl;
|
||||
import org.apache.olingo.client.core.edm.xml.AbstractClientEdmDeserializer;
|
||||
import org.apache.olingo.client.core.edm.xml.ClientAnnotation;
|
||||
import org.apache.olingo.commons.api.edm.geo.SRID;
|
||||
import org.apache.olingo.commons.api.edm.provider.annotation.DynamicAnnotationExpression;
|
||||
import org.apache.olingo.commons.api.edm.provider.annotation.IsOf;
|
||||
|
@ -31,8 +31,8 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
@JsonDeserialize(using = IsOfImpl.IsOfDeserializer.class)
|
||||
public class IsOfImpl extends AbstractAnnotatableDynamicAnnotationExpression implements IsOf {
|
||||
@JsonDeserialize(using = ClientIsOf.IsOfDeserializer.class)
|
||||
public class ClientIsOf extends AbstractClientAnnotatableDynamicAnnotationExpression implements IsOf {
|
||||
|
||||
private static final long serialVersionUID = -893355856129761174L;
|
||||
|
||||
|
@ -102,18 +102,18 @@ public class IsOfImpl extends AbstractAnnotatableDynamicAnnotationExpression imp
|
|||
this.value = value;
|
||||
}
|
||||
|
||||
static class IsOfDeserializer extends AbstractEdmDeserializer<IsOfImpl> {
|
||||
static class IsOfDeserializer extends AbstractClientEdmDeserializer<ClientIsOf> {
|
||||
@Override
|
||||
protected IsOfImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
protected ClientIsOf doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
final IsOfImpl isof = new IsOfImpl();
|
||||
final ClientIsOf isof = new ClientIsOf();
|
||||
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
||||
if (token == JsonToken.FIELD_NAME) {
|
||||
if ("Type".equals(jp.getCurrentName())) {
|
||||
isof.setType(jp.nextTextValue());
|
||||
} else if ("Annotation".equals(jp.getCurrentName())) {
|
||||
isof.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
|
||||
isof.getAnnotations().add(jp.readValueAs(ClientAnnotation.class));
|
||||
} else if ("MaxLength".equals(jp.getCurrentName())) {
|
||||
final String maxLenght = jp.nextTextValue();
|
||||
isof.setMaxLength(maxLenght.equalsIgnoreCase("max") ? Integer.MAX_VALUE : Integer.valueOf(maxLenght));
|
||||
|
@ -128,7 +128,7 @@ public class IsOfImpl extends AbstractAnnotatableDynamicAnnotationExpression imp
|
|||
isof.setSrid(SRID.valueOf(srid));
|
||||
}
|
||||
} else {
|
||||
isof.setValue(jp.readValueAs(AbstractDynamicAnnotationExpression.class));
|
||||
isof.setValue(jp.readValueAs(AbstractClientDynamicAnnotationExpression.class));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -21,8 +21,8 @@ package org.apache.olingo.client.core.edm.xml.annotation;
|
|||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonToken;
|
||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
|
||||
import org.apache.olingo.client.core.edm.xml.AnnotationImpl;
|
||||
import org.apache.olingo.client.core.edm.xml.AbstractClientEdmDeserializer;
|
||||
import org.apache.olingo.client.core.edm.xml.ClientAnnotation;
|
||||
import org.apache.olingo.commons.api.edm.provider.annotation.DynamicAnnotationExpression;
|
||||
import org.apache.olingo.commons.api.edm.provider.annotation.LabeledElement;
|
||||
|
||||
|
@ -30,9 +30,9 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
@JsonDeserialize(using = LabeledElementImpl.LabeledElementDeserializer.class)
|
||||
public class LabeledElementImpl
|
||||
extends AbstractAnnotatableDynamicAnnotationExpression implements LabeledElement {
|
||||
@JsonDeserialize(using = ClientLabeledElement.LabeledElementDeserializer.class)
|
||||
public class ClientLabeledElement
|
||||
extends AbstractClientAnnotatableDynamicAnnotationExpression implements LabeledElement {
|
||||
|
||||
private static final long serialVersionUID = 4909387630253341824L;
|
||||
|
||||
|
@ -58,20 +58,20 @@ public class LabeledElementImpl
|
|||
this.value = value;
|
||||
}
|
||||
|
||||
static class LabeledElementDeserializer extends AbstractEdmDeserializer<LabeledElementImpl> {
|
||||
static class LabeledElementDeserializer extends AbstractClientEdmDeserializer<ClientLabeledElement> {
|
||||
@Override
|
||||
protected LabeledElementImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
protected ClientLabeledElement doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
final LabeledElementImpl element = new LabeledElementImpl();
|
||||
final ClientLabeledElement element = new ClientLabeledElement();
|
||||
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
||||
if (token == JsonToken.FIELD_NAME) {
|
||||
if ("Name".equals(jp.getCurrentName())) {
|
||||
element.setName(jp.nextTextValue());
|
||||
} else if ("Annotation".equals(jp.getCurrentName())) {
|
||||
element.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
|
||||
element.getAnnotations().add(jp.readValueAs(ClientAnnotation.class));
|
||||
} else {
|
||||
element.setValue(jp.readValueAs(AbstractDynamicAnnotationExpression.class));
|
||||
element.setValue(jp.readValueAs(AbstractClientDynamicAnnotationExpression.class));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -20,8 +20,8 @@ package org.apache.olingo.client.core.edm.xml.annotation;
|
|||
|
||||
import org.apache.olingo.commons.api.edm.provider.annotation.LabeledElementReference;
|
||||
|
||||
public class LabeledElementReferenceImpl
|
||||
extends AbstractElementOrAttributeExpression implements LabeledElementReference {
|
||||
public class ClientLabeledElementReference
|
||||
extends AbstractClientElementOrAttributeExpression implements LabeledElementReference {
|
||||
|
||||
private static final long serialVersionUID = 7560525604021670529L;
|
||||
|
|
@ -20,7 +20,8 @@ package org.apache.olingo.client.core.edm.xml.annotation;
|
|||
|
||||
import org.apache.olingo.commons.api.edm.provider.annotation.NavigationPropertyPath;
|
||||
|
||||
public class NavigationPropertyPathImpl extends AbstractElementOrAttributeExpression implements NavigationPropertyPath {
|
||||
public class ClientNavigationPropertyPath extends AbstractClientElementOrAttributeExpression
|
||||
implements NavigationPropertyPath {
|
||||
|
||||
private static final long serialVersionUID = 879840502446301312L;
|
||||
|
|
@ -21,7 +21,7 @@ package org.apache.olingo.client.core.edm.xml.annotation;
|
|||
import org.apache.olingo.commons.api.edm.provider.annotation.DynamicAnnotationExpression;
|
||||
import org.apache.olingo.commons.api.edm.provider.annotation.Not;
|
||||
|
||||
public class NotImpl extends AbstractDynamicAnnotationExpression implements Not {
|
||||
public class ClientNot extends AbstractClientDynamicAnnotationExpression implements Not {
|
||||
|
||||
private static final long serialVersionUID = -437788415922966812L;
|
||||
|
|
@ -21,29 +21,29 @@ package org.apache.olingo.client.core.edm.xml.annotation;
|
|||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonToken;
|
||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
|
||||
import org.apache.olingo.client.core.edm.xml.AnnotationImpl;
|
||||
import org.apache.olingo.client.core.edm.xml.AbstractClientEdmDeserializer;
|
||||
import org.apache.olingo.client.core.edm.xml.ClientAnnotation;
|
||||
import org.apache.olingo.commons.api.edm.provider.annotation.Null;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@JsonDeserialize(using = NullImpl.NullDeserializer.class)
|
||||
public class NullImpl extends AbstractAnnotatableDynamicAnnotationExpression implements Null {
|
||||
@JsonDeserialize(using = ClientNull.NullDeserializer.class)
|
||||
public class ClientNull extends AbstractClientAnnotatableDynamicAnnotationExpression implements Null {
|
||||
|
||||
private static final long serialVersionUID = -3148516847180393142L;
|
||||
|
||||
static class NullDeserializer extends AbstractEdmDeserializer<NullImpl> {
|
||||
static class NullDeserializer extends AbstractClientEdmDeserializer<ClientNull> {
|
||||
@Override
|
||||
protected NullImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
protected ClientNull doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
final NullImpl _null = new NullImpl();
|
||||
final ClientNull _null = new ClientNull();
|
||||
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
||||
if (token == JsonToken.FIELD_NAME) {
|
||||
if ("Annotation".equals(jp.getCurrentName())) {
|
||||
_null.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
|
||||
_null.getAnnotations().add(jp.readValueAs(ClientAnnotation.class));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -20,7 +20,7 @@ package org.apache.olingo.client.core.edm.xml.annotation;
|
|||
|
||||
import org.apache.olingo.commons.api.edm.provider.annotation.Path;
|
||||
|
||||
public class PathImpl extends AbstractElementOrAttributeExpression implements Path {
|
||||
public class ClientPath extends AbstractClientElementOrAttributeExpression implements Path {
|
||||
|
||||
private static final long serialVersionUID = 6020168217561402545L;
|
||||
|
|
@ -20,7 +20,7 @@ package org.apache.olingo.client.core.edm.xml.annotation;
|
|||
|
||||
import org.apache.olingo.commons.api.edm.provider.annotation.PropertyPath;
|
||||
|
||||
public class PropertyPathImpl extends AbstractElementOrAttributeExpression implements PropertyPath {
|
||||
public class ClientPropertyPath extends AbstractClientElementOrAttributeExpression implements PropertyPath {
|
||||
|
||||
private static final long serialVersionUID = -9133862135834738470L;
|
||||
|
|
@ -21,8 +21,8 @@ package org.apache.olingo.client.core.edm.xml.annotation;
|
|||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonToken;
|
||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
|
||||
import org.apache.olingo.client.core.edm.xml.AnnotationImpl;
|
||||
import org.apache.olingo.client.core.edm.xml.AbstractClientEdmDeserializer;
|
||||
import org.apache.olingo.client.core.edm.xml.ClientAnnotation;
|
||||
import org.apache.olingo.commons.api.edm.provider.annotation.AnnotationExpression;
|
||||
import org.apache.olingo.commons.api.edm.provider.annotation.PropertyValue;
|
||||
|
||||
|
@ -30,8 +30,8 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
@JsonDeserialize(using = PropertyValueImpl.PropertyValueDeserializer.class)
|
||||
public class PropertyValueImpl extends AbstractAnnotatableDynamicAnnotationExpression implements PropertyValue {
|
||||
@JsonDeserialize(using = ClientPropertyValue.PropertyValueDeserializer.class)
|
||||
public class ClientPropertyValue extends AbstractClientAnnotatableDynamicAnnotationExpression implements PropertyValue {
|
||||
|
||||
private static final long serialVersionUID = -8437649215282645228L;
|
||||
|
||||
|
@ -57,22 +57,22 @@ public class PropertyValueImpl extends AbstractAnnotatableDynamicAnnotationExpre
|
|||
this.value = value;
|
||||
}
|
||||
|
||||
static class PropertyValueDeserializer extends AbstractEdmDeserializer<PropertyValueImpl> {
|
||||
static class PropertyValueDeserializer extends AbstractClientEdmDeserializer<ClientPropertyValue> {
|
||||
@Override
|
||||
protected PropertyValueImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
protected ClientPropertyValue doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
final PropertyValueImpl propValue = new PropertyValueImpl();
|
||||
final ClientPropertyValue propValue = new ClientPropertyValue();
|
||||
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
||||
if (token == JsonToken.FIELD_NAME) {
|
||||
if ("Property".equals(jp.getCurrentName())) {
|
||||
propValue.setProperty(jp.nextTextValue());
|
||||
} else if ("Annotation".equals(jp.getCurrentName())) {
|
||||
propValue.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
|
||||
propValue.getAnnotations().add(jp.readValueAs(ClientAnnotation.class));
|
||||
} else if (isAnnotationConstExprConstruct(jp)) {
|
||||
propValue.setValue(parseAnnotationConstExprConstruct(jp));
|
||||
} else {
|
||||
propValue.setValue(jp.readValueAs(AbstractDynamicAnnotationExpression.class));
|
||||
propValue.setValue(jp.readValueAs(AbstractClientDynamicAnnotationExpression.class));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -25,15 +25,15 @@ import java.util.List;
|
|||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonToken;
|
||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
|
||||
import org.apache.olingo.client.core.edm.xml.AnnotationImpl;
|
||||
import org.apache.olingo.client.core.edm.xml.AbstractClientEdmDeserializer;
|
||||
import org.apache.olingo.client.core.edm.xml.ClientAnnotation;
|
||||
import org.apache.olingo.commons.api.edm.provider.annotation.PropertyValue;
|
||||
import org.apache.olingo.commons.api.edm.provider.annotation.Record;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
|
||||
@JsonDeserialize(using = RecordImpl.RecordDeserializer.class)
|
||||
public class RecordImpl extends AbstractAnnotatableDynamicAnnotationExpression implements Record {
|
||||
@JsonDeserialize(using = ClientRecord.RecordDeserializer.class)
|
||||
public class ClientRecord extends AbstractClientAnnotatableDynamicAnnotationExpression implements Record {
|
||||
|
||||
private static final long serialVersionUID = 4275271751615410709L;
|
||||
|
||||
|
@ -55,20 +55,20 @@ public class RecordImpl extends AbstractAnnotatableDynamicAnnotationExpression i
|
|||
return propertyValues;
|
||||
}
|
||||
|
||||
static class RecordDeserializer extends AbstractEdmDeserializer<RecordImpl> {
|
||||
static class RecordDeserializer extends AbstractClientEdmDeserializer<ClientRecord> {
|
||||
@Override
|
||||
protected RecordImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
protected ClientRecord doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
final RecordImpl record = new RecordImpl();
|
||||
final ClientRecord record = new ClientRecord();
|
||||
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
||||
if (token == JsonToken.FIELD_NAME) {
|
||||
if ("Type".equals(jp.getCurrentName())) {
|
||||
record.setType(jp.nextTextValue());
|
||||
} else if ("Annotation".equals(jp.getCurrentName())) {
|
||||
record.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
|
||||
record.getAnnotations().add(jp.readValueAs(ClientAnnotation.class));
|
||||
} else {
|
||||
record.getPropertyValues().add(jp.readValueAs(PropertyValueImpl.class));
|
||||
record.getPropertyValues().add(jp.readValueAs(ClientPropertyValue.class));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -21,8 +21,8 @@ package org.apache.olingo.client.core.edm.xml.annotation;
|
|||
import org.apache.olingo.commons.api.edm.provider.annotation.DynamicAnnotationExpression;
|
||||
import org.apache.olingo.commons.api.edm.provider.annotation.TwoParamsOpDynamicAnnotationExpression;
|
||||
|
||||
public class TwoParamsOpDynamicAnnotationExpressionImpl
|
||||
extends AbstractDynamicAnnotationExpression implements TwoParamsOpDynamicAnnotationExpression {
|
||||
public class ClientTwoParamsOpDynamicAnnotationExpression
|
||||
extends AbstractClientDynamicAnnotationExpression implements TwoParamsOpDynamicAnnotationExpression {
|
||||
|
||||
private static final long serialVersionUID = 6241842185452451946L;
|
||||
|
|
@ -21,7 +21,7 @@ package org.apache.olingo.client.core.edm.xml.annotation;
|
|||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonToken;
|
||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
|
||||
import org.apache.olingo.client.core.edm.xml.AbstractClientEdmDeserializer;
|
||||
import org.apache.olingo.commons.api.edm.provider.annotation.AnnotationExpression;
|
||||
import org.apache.olingo.commons.api.edm.provider.annotation.UrlRef;
|
||||
|
||||
|
@ -29,8 +29,8 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
@JsonDeserialize(using = UrlRefImpl.UrlRefDeserializer.class)
|
||||
public class UrlRefImpl extends AbstractDynamicAnnotationExpression implements UrlRef {
|
||||
@JsonDeserialize(using = ClientUrlRef.UrlRefDeserializer.class)
|
||||
public class ClientUrlRef extends AbstractClientDynamicAnnotationExpression implements UrlRef {
|
||||
|
||||
private static final long serialVersionUID = -7693224811739000440L;
|
||||
|
||||
|
@ -45,18 +45,18 @@ public class UrlRefImpl extends AbstractDynamicAnnotationExpression implements U
|
|||
this.value = value;
|
||||
}
|
||||
|
||||
static class UrlRefDeserializer extends AbstractEdmDeserializer<UrlRefImpl> {
|
||||
static class UrlRefDeserializer extends AbstractClientEdmDeserializer<ClientUrlRef> {
|
||||
@Override
|
||||
protected UrlRefImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
protected ClientUrlRef doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
|
||||
throws IOException {
|
||||
final UrlRefImpl urlref = new UrlRefImpl();
|
||||
final ClientUrlRef urlref = new ClientUrlRef();
|
||||
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
||||
final JsonToken token = jp.getCurrentToken();
|
||||
if (token == JsonToken.FIELD_NAME) {
|
||||
if (isAnnotationConstExprConstruct(jp)) {
|
||||
urlref.setValue(parseAnnotationConstExprConstruct(jp));
|
||||
} else {
|
||||
urlref.setValue(jp.readValueAs(AbstractDynamicAnnotationExpression.class));
|
||||
urlref.setValue(jp.readValueAs(AbstractClientDynamicAnnotationExpression.class));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -28,8 +28,8 @@ import org.apache.olingo.client.api.edm.xml.XMLMetadata;
|
|||
import org.apache.olingo.client.api.serialization.ClientODataDeserializer;
|
||||
import org.apache.olingo.client.core.data.JSONServiceDocumentDeserializer;
|
||||
import org.apache.olingo.client.core.data.XMLServiceDocumentDeserializer;
|
||||
import org.apache.olingo.client.core.edm.xml.EdmxImpl;
|
||||
import org.apache.olingo.client.core.edm.xml.XMLMetadataImpl;
|
||||
import org.apache.olingo.client.core.edm.xml.ClientEdmx;
|
||||
import org.apache.olingo.client.core.edm.xml.ClientXMLMetadata;
|
||||
import org.apache.olingo.commons.api.data.Delta;
|
||||
import org.apache.olingo.commons.api.data.Entity;
|
||||
import org.apache.olingo.commons.api.data.EntityCollection;
|
||||
|
@ -114,7 +114,7 @@ public class ClientODataDeserializerImpl implements ClientODataDeserializer {
|
|||
@Override
|
||||
public XMLMetadata toMetadata(final InputStream input) {
|
||||
try {
|
||||
return new XMLMetadataImpl(getXmlMapper().readValue(input, EdmxImpl.class));
|
||||
return new ClientXMLMetadata(getXmlMapper().readValue(input, ClientEdmx.class));
|
||||
} catch (Exception e) {
|
||||
throw new IllegalArgumentException("Could not parse as Edmx document", e);
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ import java.util.Calendar;
|
|||
import java.util.Collections;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import org.apache.olingo.client.core.edm.xml.EnumTypeImpl;
|
||||
import org.apache.olingo.client.core.edm.xml.ClientEnumType;
|
||||
import org.apache.olingo.commons.api.Constants;
|
||||
import org.apache.olingo.commons.api.edm.EdmEnumType;
|
||||
import org.apache.olingo.commons.api.edm.FullQualifiedName;
|
||||
|
@ -51,7 +51,7 @@ public class URIEscapeTest {
|
|||
@Test
|
||||
public void _enum() throws UnsupportedEncodingException {
|
||||
final EdmEnumType pattern =
|
||||
new EdmEnumTypeImpl(null, new FullQualifiedName("Sales", "Pattern"), new EnumTypeImpl());
|
||||
new EdmEnumTypeImpl(null, new FullQualifiedName("Sales", "Pattern"), new ClientEnumType());
|
||||
|
||||
assertEquals("Sales.Pattern'Yellow'", URIUtils.escape( pattern.toUriLiteral("Yellow")));
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ import org.apache.olingo.client.api.uri.FilterArgFactory;
|
|||
import org.apache.olingo.client.api.uri.FilterFactory;
|
||||
import org.apache.olingo.client.api.uri.URIFilter;
|
||||
import org.apache.olingo.client.core.AbstractTest;
|
||||
import org.apache.olingo.client.core.edm.xml.EnumTypeImpl;
|
||||
import org.apache.olingo.client.core.edm.xml.ClientEnumType;
|
||||
import org.apache.olingo.commons.api.Constants;
|
||||
import org.apache.olingo.commons.api.edm.EdmEnumType;
|
||||
import org.apache.olingo.commons.api.edm.FullQualifiedName;
|
||||
|
@ -55,7 +55,7 @@ public class FilterFactoryTest extends AbstractTest {
|
|||
@Test
|
||||
public void has() {
|
||||
final EdmEnumType pattern =
|
||||
new EdmEnumTypeImpl(null, new FullQualifiedName("Sales", "Pattern"), new EnumTypeImpl());
|
||||
new EdmEnumTypeImpl(null, new FullQualifiedName("Sales", "Pattern"), new ClientEnumType());
|
||||
final URIFilter filter = getFilterFactory().has(getFilterArgFactory().property("style"), pattern, "Yellow");
|
||||
|
||||
assertEquals("(style has Sales.Pattern'Yellow')", filter.build());
|
||||
|
|
|
@ -29,8 +29,8 @@ import java.util.List;
|
|||
import org.apache.olingo.client.api.ODataClient;
|
||||
import org.apache.olingo.client.api.edm.xml.XMLMetadata;
|
||||
import org.apache.olingo.client.core.AbstractTest;
|
||||
import org.apache.olingo.client.core.edm.xml.annotation.ConstantAnnotationExpressionImpl;
|
||||
import org.apache.olingo.client.core.edm.xml.annotation.PathImpl;
|
||||
import org.apache.olingo.client.core.edm.xml.annotation.ClientConstantAnnotationExpression;
|
||||
import org.apache.olingo.client.core.edm.xml.annotation.ClientPath;
|
||||
import org.apache.olingo.commons.api.Constants;
|
||||
import org.apache.olingo.commons.api.edm.Edm;
|
||||
import org.apache.olingo.commons.api.edm.EdmAction;
|
||||
|
@ -297,16 +297,16 @@ public class MetadataTest extends AbstractTest {
|
|||
assertEquals(Constants.CANONICAL_FUNCTION_CONCAT, apply.getFunction());
|
||||
assertEquals(3, apply.getParameters().size());
|
||||
|
||||
final PathImpl firstArg = new PathImpl();
|
||||
final ClientPath firstArg = new ClientPath();
|
||||
firstArg.setValue("Name");
|
||||
assertEquals(firstArg, apply.getParameters().get(0));
|
||||
|
||||
final ConstantAnnotationExpression secondArg = new ConstantAnnotationExpressionImpl();
|
||||
final ConstantAnnotationExpression secondArg = new ClientConstantAnnotationExpression();
|
||||
secondArg.setType(ConstantAnnotationExpression.Type.String);
|
||||
secondArg.setValue(" in ");
|
||||
assertEquals(secondArg, apply.getParameters().get(1));
|
||||
|
||||
final PathImpl thirdArg = new PathImpl();
|
||||
final ClientPath thirdArg = new ClientPath();
|
||||
thirdArg.setValue("Address/CountryName");
|
||||
assertEquals(thirdArg, apply.getParameters().get(2));
|
||||
|
||||
|
|
Loading…
Reference in New Issue