Various small fixes and improvements
This commit is contained in:
parent
365ea6f8b7
commit
ec30775b8c
|
@ -48,7 +48,7 @@ import org.apache.olingo.ext.proxy.api.OperationType;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.ext.proxy.utils.ClassUtils;
|
import org.apache.olingo.ext.proxy.utils.ClassUtils;
|
||||||
import org.apache.olingo.ext.proxy.utils.EngineUtils;
|
import org.apache.olingo.ext.proxy.utils.CoreUtils;
|
||||||
|
|
||||||
abstract class AbstractInvocationHandler<C extends CommonEdmEnabledODataClient<?>> implements InvocationHandler {
|
abstract class AbstractInvocationHandler<C extends CommonEdmEnabledODataClient<?>> implements InvocationHandler {
|
||||||
|
|
||||||
|
@ -171,7 +171,7 @@ abstract class AbstractInvocationHandler<C extends CommonEdmEnabledODataClient<?
|
||||||
|
|
||||||
final ODataValue paramValue = parameter.getValue() == null
|
final ODataValue paramValue = parameter.getValue() == null
|
||||||
? null
|
? null
|
||||||
: EngineUtils.getODataValue(client, type, parameter.getValue());
|
: CoreUtils.getODataValue(client, type, parameter.getValue());
|
||||||
|
|
||||||
parameterValues.put(parameter.getKey().name(), paramValue);
|
parameterValues.put(parameter.getKey().name(), paramValue);
|
||||||
}
|
}
|
||||||
|
@ -199,8 +199,7 @@ abstract class AbstractInvocationHandler<C extends CommonEdmEnabledODataClient<?
|
||||||
}
|
}
|
||||||
|
|
||||||
if (edmType.isPrimitiveType() || edmType.isComplexType()) {
|
if (edmType.isPrimitiveType() || edmType.isComplexType()) {
|
||||||
return EngineUtils.getValueFromProperty(
|
return CoreUtils.getValueFromProperty(client, (CommonODataProperty) result, method.getGenericReturnType());
|
||||||
client.getCachedEdm(), (CommonODataProperty) result, method.getGenericReturnType());
|
|
||||||
}
|
}
|
||||||
if (edmType.isEntityType()) {
|
if (edmType.isEntityType()) {
|
||||||
if (edmType.isCollection()) {
|
if (edmType.isCollection()) {
|
||||||
|
|
|
@ -67,6 +67,7 @@ public abstract class AbstractTypeInvocationHandler<C extends CommonEdmEnabledOD
|
||||||
final Class<?> typeRef,
|
final Class<?> typeRef,
|
||||||
final Object internal,
|
final Object internal,
|
||||||
final EntityContainerInvocationHandler<C> containerHandler) {
|
final EntityContainerInvocationHandler<C> containerHandler) {
|
||||||
|
|
||||||
super(client, containerHandler);
|
super(client, containerHandler);
|
||||||
this.internal = internal;
|
this.internal = internal;
|
||||||
this.typeRef = typeRef;
|
this.typeRef = typeRef;
|
||||||
|
@ -78,7 +79,8 @@ public abstract class AbstractTypeInvocationHandler<C extends CommonEdmEnabledOD
|
||||||
final Class<?> typeRef,
|
final Class<?> typeRef,
|
||||||
final Object internal,
|
final Object internal,
|
||||||
final EntityTypeInvocationHandler<C> targetHandler) {
|
final EntityTypeInvocationHandler<C> targetHandler) {
|
||||||
super(client, targetHandler.containerHandler);
|
|
||||||
|
super(client, targetHandler == null ? null : targetHandler.containerHandler);
|
||||||
this.internal = internal;
|
this.internal = internal;
|
||||||
this.typeRef = typeRef;
|
this.typeRef = typeRef;
|
||||||
this.targetHandler = targetHandler;
|
this.targetHandler = targetHandler;
|
||||||
|
|
|
@ -38,7 +38,7 @@ import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
||||||
import org.apache.olingo.ext.proxy.context.AttachedEntityStatus;
|
import org.apache.olingo.ext.proxy.context.AttachedEntityStatus;
|
||||||
import org.apache.olingo.ext.proxy.utils.ClassUtils;
|
import org.apache.olingo.ext.proxy.utils.ClassUtils;
|
||||||
import org.apache.olingo.ext.proxy.utils.EngineUtils;
|
import org.apache.olingo.ext.proxy.utils.CoreUtils;
|
||||||
|
|
||||||
public class ComplexTypeInvocationHandler<C extends CommonEdmEnabledODataClient<?>>
|
public class ComplexTypeInvocationHandler<C extends CommonEdmEnabledODataClient<?>>
|
||||||
extends AbstractTypeInvocationHandler<C> {
|
extends AbstractTypeInvocationHandler<C> {
|
||||||
|
@ -51,15 +51,16 @@ public class ComplexTypeInvocationHandler<C extends CommonEdmEnabledODataClient<
|
||||||
final Class<?> typeRef,
|
final Class<?> typeRef,
|
||||||
final EntityTypeInvocationHandler<?> handler) {
|
final EntityTypeInvocationHandler<?> handler) {
|
||||||
|
|
||||||
return new ComplexTypeInvocationHandler(complex, typeRef, handler);
|
return new ComplexTypeInvocationHandler(handler.targetHandler.getClient(), complex, typeRef, handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
private ComplexTypeInvocationHandler(
|
public ComplexTypeInvocationHandler(
|
||||||
|
final C client,
|
||||||
final ODataComplexValue<?> complex,
|
final ODataComplexValue<?> complex,
|
||||||
final Class<?> typeRef,
|
final Class<?> typeRef,
|
||||||
final EntityTypeInvocationHandler<C> handler) {
|
final EntityTypeInvocationHandler<C> handler) {
|
||||||
|
|
||||||
super(handler.containerHandler.getClient(), typeRef, complex, handler);
|
super(client, typeRef, complex, handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setComplex(final ODataComplexValue<?> complex) {
|
public void setComplex(final ODataComplexValue<?> complex) {
|
||||||
|
@ -84,13 +85,12 @@ public class ComplexTypeInvocationHandler<C extends CommonEdmEnabledODataClient<
|
||||||
final CommonODataProperty property = getComplex().get(name);
|
final CommonODataProperty property = getComplex().get(name);
|
||||||
|
|
||||||
if (property.hasComplexValue()) {
|
if (property.hasComplexValue()) {
|
||||||
|
|
||||||
res = Proxy.newProxyInstance(
|
res = Proxy.newProxyInstance(
|
||||||
Thread.currentThread().getContextClassLoader(),
|
Thread.currentThread().getContextClassLoader(),
|
||||||
new Class<?>[] {(Class<?>) type},
|
new Class<?>[] {(Class<?>) type},
|
||||||
newComplex(name, (Class<?>) type));
|
newComplex(name, (Class<?>) type));
|
||||||
|
|
||||||
EngineUtils.populate(
|
CoreUtils.populate(
|
||||||
client.getCachedEdm(),
|
client.getCachedEdm(),
|
||||||
res,
|
res,
|
||||||
(Class<?>) type,
|
(Class<?>) type,
|
||||||
|
@ -98,8 +98,8 @@ public class ComplexTypeInvocationHandler<C extends CommonEdmEnabledODataClient<
|
||||||
property.getValue().asComplex().iterator());
|
property.getValue().asComplex().iterator());
|
||||||
} else {
|
} else {
|
||||||
res = type == null
|
res = type == null
|
||||||
? EngineUtils.getValueFromProperty(client.getCachedEdm(), property)
|
? CoreUtils.getValueFromProperty(client, property)
|
||||||
: EngineUtils.getValueFromProperty(client.getCachedEdm(), property, type);
|
: CoreUtils.getValueFromProperty(client, property, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
@ -139,11 +139,11 @@ public class ComplexTypeInvocationHandler<C extends CommonEdmEnabledODataClient<
|
||||||
|
|
||||||
final EdmTypeInfo type = new EdmTypeInfo.Builder().
|
final EdmTypeInfo type = new EdmTypeInfo.Builder().
|
||||||
setEdm(client.getCachedEdm()).setTypeExpression(
|
setEdm(client.getCachedEdm()).setTypeExpression(
|
||||||
edmProperty.isCollection() ? "Collection(" + property.type() + ")" : property.type()).build();
|
edmProperty.isCollection() ? "Collection(" + property.type() + ")" : property.type()).build();
|
||||||
|
|
||||||
client.getBinder().add(getComplex(), EngineUtils.getODataProperty(client, property.name(), type, value));
|
client.getBinder().add(getComplex(), CoreUtils.getODataProperty(client, property.name(), type, value));
|
||||||
|
|
||||||
if (!entityContext.isAttached(targetHandler)) {
|
if (targetHandler != null && !entityContext.isAttached(targetHandler)) {
|
||||||
entityContext.attach(targetHandler, AttachedEntityStatus.CHANGED);
|
entityContext.attach(targetHandler, AttachedEntityStatus.CHANGED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -169,6 +169,6 @@ public class ComplexTypeInvocationHandler<C extends CommonEdmEnabledODataClient<
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isChanged() {
|
public boolean isChanged() {
|
||||||
return targetHandler.isChanged();
|
return targetHandler == null ? false : targetHandler.isChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.context.AttachedEntity;
|
import org.apache.olingo.ext.proxy.context.AttachedEntity;
|
||||||
import org.apache.olingo.ext.proxy.context.AttachedEntityStatus;
|
import org.apache.olingo.ext.proxy.context.AttachedEntityStatus;
|
||||||
import org.apache.olingo.ext.proxy.context.EntityLinkDesc;
|
import org.apache.olingo.ext.proxy.context.EntityLinkDesc;
|
||||||
import org.apache.olingo.ext.proxy.utils.EngineUtils;
|
import org.apache.olingo.ext.proxy.utils.CoreUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
@ -313,7 +313,7 @@ class ContainerImpl implements Container {
|
||||||
|
|
||||||
if (AttachedEntityStatus.DELETED != currentStatus) {
|
if (AttachedEntityStatus.DELETED != currentStatus) {
|
||||||
entity.getProperties().clear();
|
entity.getProperties().clear();
|
||||||
EngineUtils.addProperties(client, handler.getPropertyChanges(), entity);
|
CoreUtils.addProperties(client, handler.getPropertyChanges(), entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Map.Entry<NavigationProperty, Object> property : handler.getLinkChanges().entrySet()) {
|
for (Map.Entry<NavigationProperty, Object> property : handler.getLinkChanges().entrySet()) {
|
||||||
|
@ -409,7 +409,7 @@ class ContainerImpl implements Container {
|
||||||
final URI targetURI = currentStatus == AttachedEntityStatus.NEW
|
final URI targetURI = currentStatus == AttachedEntityStatus.NEW
|
||||||
? URI.create("$" + startingPos) : URIUtils.getURI(
|
? URI.create("$" + startingPos) : URIUtils.getURI(
|
||||||
factory.getServiceRoot(),
|
factory.getServiceRoot(),
|
||||||
EngineUtils.getEditMediaLink(streamedChanges.getKey(), entity).toASCIIString());
|
CoreUtils.getEditMediaLink(streamedChanges.getKey(), entity).toASCIIString());
|
||||||
|
|
||||||
batchUpdateMediaResource(handler, targetURI, streamedChanges.getValue(), changeset);
|
batchUpdateMediaResource(handler, targetURI, streamedChanges.getValue(), changeset);
|
||||||
|
|
||||||
|
|
|
@ -221,7 +221,7 @@ class EntitySetInvocationHandler<C extends CommonEdmEnabledODataClient<?>, T ext
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public T get(KEY key) throws IllegalArgumentException {
|
public T get(final KEY key) throws IllegalArgumentException {
|
||||||
return get(key, typeRef);
|
return get(key, typeRef);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,7 @@ import org.apache.olingo.client.core.uri.URIUtils;
|
||||||
import org.apache.olingo.commons.api.domain.CommonODataEntity;
|
import org.apache.olingo.commons.api.domain.CommonODataEntity;
|
||||||
import org.apache.olingo.commons.api.domain.CommonODataProperty;
|
import org.apache.olingo.commons.api.domain.CommonODataProperty;
|
||||||
import org.apache.olingo.commons.api.domain.ODataLinked;
|
import org.apache.olingo.commons.api.domain.ODataLinked;
|
||||||
|
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
|
||||||
import org.apache.olingo.commons.api.edm.FullQualifiedName;
|
import org.apache.olingo.commons.api.edm.FullQualifiedName;
|
||||||
import org.apache.olingo.commons.api.format.ODataMediaFormat;
|
import org.apache.olingo.commons.api.format.ODataMediaFormat;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
||||||
|
@ -45,7 +46,7 @@ import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
||||||
import org.apache.olingo.ext.proxy.context.AttachedEntityStatus;
|
import org.apache.olingo.ext.proxy.context.AttachedEntityStatus;
|
||||||
import org.apache.olingo.ext.proxy.context.EntityUUID;
|
import org.apache.olingo.ext.proxy.context.EntityUUID;
|
||||||
import org.apache.olingo.ext.proxy.utils.EngineUtils;
|
import org.apache.olingo.ext.proxy.utils.CoreUtils;
|
||||||
|
|
||||||
public class EntityTypeInvocationHandler<C extends CommonEdmEnabledODataClient<?>>
|
public class EntityTypeInvocationHandler<C extends CommonEdmEnabledODataClient<?>>
|
||||||
extends AbstractTypeInvocationHandler<C> {
|
extends AbstractTypeInvocationHandler<C> {
|
||||||
|
@ -106,7 +107,7 @@ public class EntityTypeInvocationHandler<C extends CommonEdmEnabledODataClient<?
|
||||||
containerHandler.getEntityContainerName(),
|
containerHandler.getEntityContainerName(),
|
||||||
entitySetName,
|
entitySetName,
|
||||||
entity.getTypeName(),
|
entity.getTypeName(),
|
||||||
EngineUtils.getKey(client.getCachedEdm(), typeRef, entity));
|
CoreUtils.getKey(client.getCachedEdm(), typeRef, entity));
|
||||||
|
|
||||||
this.stream = null;
|
this.stream = null;
|
||||||
}
|
}
|
||||||
|
@ -119,7 +120,7 @@ public class EntityTypeInvocationHandler<C extends CommonEdmEnabledODataClient<?
|
||||||
getUUID().getContainerName(),
|
getUUID().getContainerName(),
|
||||||
getUUID().getEntitySetName(),
|
getUUID().getEntitySetName(),
|
||||||
getUUID().getName(),
|
getUUID().getName(),
|
||||||
EngineUtils.getKey(client.getCachedEdm(), typeRef, entity));
|
CoreUtils.getKey(client.getCachedEdm(), typeRef, entity));
|
||||||
|
|
||||||
this.propertyChanges.clear();
|
this.propertyChanges.clear();
|
||||||
this.linkChanges.clear();
|
this.linkChanges.clear();
|
||||||
|
@ -208,17 +209,16 @@ public class EntityTypeInvocationHandler<C extends CommonEdmEnabledODataClient<?
|
||||||
new Class<?>[] {(Class<?>) type},
|
new Class<?>[] {(Class<?>) type},
|
||||||
newComplex(name, (Class<?>) type));
|
newComplex(name, (Class<?>) type));
|
||||||
|
|
||||||
EngineUtils.populate(
|
CoreUtils.populate(
|
||||||
client.getCachedEdm(),
|
client.getCachedEdm(),
|
||||||
res,
|
res,
|
||||||
(Class<?>) type,
|
(Class<?>) type,
|
||||||
Property.class,
|
Property.class,
|
||||||
property.getValue().asComplex().iterator());
|
property.getValue().asComplex().iterator());
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
res = type == null
|
res = type == null
|
||||||
? EngineUtils.getValueFromProperty(client.getCachedEdm(), property)
|
? CoreUtils.getValueFromProperty(client, property)
|
||||||
: EngineUtils.getValueFromProperty(client.getCachedEdm(), property, type);
|
: CoreUtils.getValueFromProperty(client, property, type);
|
||||||
|
|
||||||
if (res != null) {
|
if (res != null) {
|
||||||
addPropertyChanges(name, res, false);
|
addPropertyChanges(name, res, false);
|
||||||
|
@ -257,7 +257,7 @@ public class EntityTypeInvocationHandler<C extends CommonEdmEnabledODataClient<?
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void setPropertyValue(final Property property, final Object value) {
|
protected void setPropertyValue(final Property property, final Object value) {
|
||||||
if (property.type().equalsIgnoreCase("Edm.Stream")) {
|
if (property.type().equalsIgnoreCase(EdmPrimitiveTypeKind.Stream.toString())) {
|
||||||
setStreamedProperty(property, (InputStream) value);
|
setStreamedProperty(property, (InputStream) value);
|
||||||
} else {
|
} else {
|
||||||
addPropertyChanges(property.name(), value, false);
|
addPropertyChanges(property.name(), value, false);
|
||||||
|
@ -318,7 +318,7 @@ public class EntityTypeInvocationHandler<C extends CommonEdmEnabledODataClient<?
|
||||||
if (res == null) {
|
if (res == null) {
|
||||||
final URI link = URIUtils.getURI(
|
final URI link = URIUtils.getURI(
|
||||||
containerHandler.getFactory().getServiceRoot(),
|
containerHandler.getFactory().getServiceRoot(),
|
||||||
EngineUtils.getEditMediaLink(property.name(), this.entity).toASCIIString());
|
CoreUtils.getEditMediaLink(property.name(), this.entity).toASCIIString());
|
||||||
|
|
||||||
final ODataMediaRequest req = client.getRetrieveRequestFactory().getMediaRequest(link);
|
final ODataMediaRequest req = client.getRetrieveRequestFactory().getMediaRequest(link);
|
||||||
res = req.execute().getBody();
|
res = req.execute().getBody();
|
||||||
|
|
|
@ -22,6 +22,7 @@ import java.lang.annotation.Annotation;
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.lang.reflect.ParameterizedType;
|
import java.lang.reflect.ParameterizedType;
|
||||||
|
import java.lang.reflect.Proxy;
|
||||||
import java.lang.reflect.Type;
|
import java.lang.reflect.Type;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
|
@ -50,17 +51,18 @@ import org.apache.olingo.ext.proxy.api.annotations.ComplexType;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
|
import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
||||||
|
import org.apache.olingo.ext.proxy.commons.ComplexTypeInvocationHandler;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public final class EngineUtils {
|
public final class CoreUtils {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logger.
|
* Logger.
|
||||||
*/
|
*/
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(EngineUtils.class);
|
private static final Logger LOG = LoggerFactory.getLogger(CoreUtils.class);
|
||||||
|
|
||||||
private EngineUtils() {
|
private CoreUtils() {
|
||||||
// Empty private constructor for static utility classes
|
// Empty private constructor for static utility classes
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,13 +97,19 @@ public final class EngineUtils {
|
||||||
} else if (type.isComplexType()) {
|
} else if (type.isComplexType()) {
|
||||||
value = client.getObjectFactory().newComplexValue(type.getFullQualifiedName().toString());
|
value = client.getObjectFactory().newComplexValue(type.getFullQualifiedName().toString());
|
||||||
|
|
||||||
if (obj.getClass().isAnnotationPresent(ComplexType.class)) {
|
if (obj instanceof ComplexTypeInvocationHandler<?>) {
|
||||||
for (Method method : obj.getClass().getMethods()) {
|
final Class<?> typeRef = ((ComplexTypeInvocationHandler<?>)obj).getTypeRef();
|
||||||
|
final Object complex = Proxy.newProxyInstance(
|
||||||
|
Thread.currentThread().getContextClassLoader(),
|
||||||
|
new Class<?>[] {typeRef},
|
||||||
|
(ComplexTypeInvocationHandler<?>)obj);
|
||||||
|
|
||||||
|
for (Method method : typeRef.getMethods()) {
|
||||||
final Property complexPropertyAnn = method.getAnnotation(Property.class);
|
final Property complexPropertyAnn = method.getAnnotation(Property.class);
|
||||||
try {
|
try {
|
||||||
if (complexPropertyAnn != null) {
|
if (complexPropertyAnn != null) {
|
||||||
value.asComplex().add(getODataComplexProperty(
|
value.asComplex().add(getODataComplexProperty(
|
||||||
client, type.getFullQualifiedName(), complexPropertyAnn.name(), method.invoke(obj)));
|
client, type.getFullQualifiedName(), complexPropertyAnn.name(), method.invoke(complex)));
|
||||||
}
|
}
|
||||||
} catch (Exception ignore) {
|
} catch (Exception ignore) {
|
||||||
// ignore value
|
// ignore value
|
||||||
|
@ -329,7 +337,8 @@ public final class EngineUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public static Object getValueFromProperty(final Edm metadata, final CommonODataProperty property)
|
public static Object getValueFromProperty(
|
||||||
|
final CommonEdmEnabledODataClient<?> client, final CommonODataProperty property)
|
||||||
throws InstantiationException, IllegalAccessException {
|
throws InstantiationException, IllegalAccessException {
|
||||||
|
|
||||||
final Object value;
|
final Object value;
|
||||||
|
@ -347,15 +356,15 @@ public final class EngineUtils {
|
||||||
}
|
}
|
||||||
if (odataValue.isComplex()) {
|
if (odataValue.isComplex()) {
|
||||||
final Object collItem =
|
final Object collItem =
|
||||||
buildComplexInstance(metadata, property.getName(), odataValue.asComplex().iterator());
|
buildComplexInstance(client.getCachedEdm(), property.getName(), odataValue.asComplex().iterator());
|
||||||
((Collection) value).add(collItem);
|
((Collection) value).add(collItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (property.hasPrimitiveValue()) {
|
} else if (property.hasPrimitiveValue()) {
|
||||||
value = primitiveValueToObject(property.getPrimitiveValue());
|
value = primitiveValueToObject(property.getPrimitiveValue());
|
||||||
} else if (property.hasComplexValue()) {
|
} else if (property.hasComplexValue()) {
|
||||||
value = buildComplexInstance(
|
value = buildComplexInstance(client.getCachedEdm(), property.getValue().asComplex().getTypeName(),
|
||||||
metadata, property.getValue().asComplex().getTypeName(), property.getValue().asComplex().iterator());
|
property.getValue().asComplex().iterator());
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("Invalid property " + property);
|
throw new IllegalArgumentException("Invalid property " + property);
|
||||||
}
|
}
|
||||||
|
@ -381,7 +390,8 @@ public final class EngineUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||||
public static Object getValueFromProperty(final Edm metadata, final CommonODataProperty property, final Type type)
|
public static Object getValueFromProperty(
|
||||||
|
final CommonEdmEnabledODataClient<?> client, final CommonODataProperty property, final Type type)
|
||||||
throws InstantiationException, IllegalAccessException {
|
throws InstantiationException, IllegalAccessException {
|
||||||
|
|
||||||
final Object value;
|
final Object value;
|
||||||
|
@ -401,8 +411,11 @@ public final class EngineUtils {
|
||||||
((Collection) value).add(primitiveValueToObject(odataValue.asPrimitive()));
|
((Collection) value).add(primitiveValueToObject(odataValue.asPrimitive()));
|
||||||
}
|
}
|
||||||
if (odataValue.isComplex()) {
|
if (odataValue.isComplex()) {
|
||||||
final Object collItem = collItemClass.newInstance();
|
final Object collItem = Proxy.newProxyInstance(
|
||||||
populate(metadata, collItem, Property.class, odataValue.asComplex().iterator());
|
Thread.currentThread().getContextClassLoader(),
|
||||||
|
new Class<?>[] {collItemClass},
|
||||||
|
new ComplexTypeInvocationHandler(client, odataValue.asComplex(), collItemClass, null));
|
||||||
|
populate(client.getCachedEdm(), collItem, Property.class, odataValue.asComplex().iterator());
|
||||||
((Collection) value).add(collItem);
|
((Collection) value).add(collItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -105,7 +105,6 @@ public abstract class AbstractMetadataMojo extends AbstractMojo {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected VelocityContext newContext() {
|
protected VelocityContext newContext() {
|
||||||
|
|
||||||
final VelocityContext ctx = new VelocityContext();
|
final VelocityContext ctx = new VelocityContext();
|
||||||
|
|
||||||
ctx.put("utility", getUtility());
|
ctx.put("utility", getUtility());
|
||||||
|
|
|
@ -158,7 +158,6 @@ public abstract class AbstractUtility {
|
||||||
}
|
}
|
||||||
|
|
||||||
public EdmFunction getFunctionByName(final FullQualifiedName name) {
|
public EdmFunction getFunctionByName(final FullQualifiedName name) {
|
||||||
|
|
||||||
final EdmSchema targetSchema = metadata.getSchema(name.getNamespace());
|
final EdmSchema targetSchema = metadata.getSchema(name.getNamespace());
|
||||||
|
|
||||||
if (targetSchema != null) {
|
if (targetSchema != null) {
|
||||||
|
@ -173,7 +172,6 @@ public abstract class AbstractUtility {
|
||||||
}
|
}
|
||||||
|
|
||||||
public EdmAction getActionByName(final FullQualifiedName name) {
|
public EdmAction getActionByName(final FullQualifiedName name) {
|
||||||
|
|
||||||
final EdmSchema targetSchema = metadata.getSchema(name.getNamespace());
|
final EdmSchema targetSchema = metadata.getSchema(name.getNamespace());
|
||||||
|
|
||||||
if (targetSchema != null) {
|
if (targetSchema != null) {
|
||||||
|
@ -188,7 +186,6 @@ public abstract class AbstractUtility {
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<EdmFunction> getFunctionsBoundTo(final String typeExpression, final boolean collection) {
|
public List<EdmFunction> getFunctionsBoundTo(final String typeExpression, final boolean collection) {
|
||||||
|
|
||||||
final List<EdmFunction> result = new ArrayList<EdmFunction>();
|
final List<EdmFunction> result = new ArrayList<EdmFunction>();
|
||||||
|
|
||||||
for (EdmSchema sch : getMetadata().getSchemas()) {
|
for (EdmSchema sch : getMetadata().getSchemas()) {
|
||||||
|
@ -210,7 +207,6 @@ public abstract class AbstractUtility {
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<EdmAction> getActionsBoundTo(final String typeExpression, final boolean collection) {
|
public List<EdmAction> getActionsBoundTo(final String typeExpression, final boolean collection) {
|
||||||
|
|
||||||
final List<EdmAction> result = new ArrayList<EdmAction>();
|
final List<EdmAction> result = new ArrayList<EdmAction>();
|
||||||
|
|
||||||
for (EdmSchema sch : getMetadata().getSchemas()) {
|
for (EdmSchema sch : getMetadata().getSchemas()) {
|
||||||
|
|
|
@ -47,139 +47,138 @@ import org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader;
|
||||||
@Mojo(name = "pojosV3", defaultPhase = LifecyclePhase.PROCESS_SOURCES)
|
@Mojo(name = "pojosV3", defaultPhase = LifecyclePhase.PROCESS_SOURCES)
|
||||||
public class V3MetadataMojo extends AbstractMetadataMojo {
|
public class V3MetadataMojo extends AbstractMetadataMojo {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected V3Utility getUtility() {
|
protected V3Utility getUtility() {
|
||||||
return (V3Utility) utility;
|
return (V3Utility) utility;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getVersion() {
|
||||||
|
return ODataServiceVersion.V30.name().toLowerCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute() throws MojoExecutionException {
|
||||||
|
if (new File(outputDirectory + File.separator + TOOL_DIR).exists()) {
|
||||||
|
getLog().info("Nothing to do because " + TOOL_DIR + " directory already exists. Clean to update.");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
try {
|
||||||
protected String getVersion() {
|
Velocity.addProperty(Velocity.RESOURCE_LOADER, "class");
|
||||||
return ODataServiceVersion.V30.name().toLowerCase();
|
Velocity.addProperty("class.resource.loader.class", ClasspathResourceLoader.class.getName());
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
final Edm metadata = ODataClientFactory.getV3().getRetrieveRequestFactory().
|
||||||
public void execute() throws MojoExecutionException {
|
getMetadataRequest(serviceRootURL).execute().getBody();
|
||||||
if (new File(outputDirectory + File.separator + TOOL_DIR).exists()) {
|
|
||||||
getLog().info("Nothing to do because " + TOOL_DIR + " directory already exists. Clean to update.");
|
if (metadata == null) {
|
||||||
return;
|
throw new IllegalStateException("Metadata not found");
|
||||||
|
}
|
||||||
|
|
||||||
|
for (EdmSchema schema : metadata.getSchemas()) {
|
||||||
|
namespaces.add(schema.getNamespace().toLowerCase());
|
||||||
|
}
|
||||||
|
|
||||||
|
final Set<String> complexTypeNames = new HashSet<String>();
|
||||||
|
final File services = mkdir("META-INF/services");
|
||||||
|
|
||||||
|
for (EdmSchema schema : metadata.getSchemas()) {
|
||||||
|
utility = new V3Utility(metadata, schema, basePackage);
|
||||||
|
|
||||||
|
// write package-info for the base package
|
||||||
|
final String schemaPath = utility.getNamespace().toLowerCase().replace('.', File.separatorChar);
|
||||||
|
final File base = mkPkgDir(schemaPath);
|
||||||
|
final String pkg = basePackage + "." + utility.getNamespace().toLowerCase();
|
||||||
|
parseObj(base, pkg, "package-info", "package-info.java");
|
||||||
|
|
||||||
|
// write package-info for types package
|
||||||
|
final File typesBaseDir = mkPkgDir(schemaPath + "/types");
|
||||||
|
final String typesPkg = pkg + ".types";
|
||||||
|
parseObj(typesBaseDir, typesPkg, "package-info", "package-info.java");
|
||||||
|
|
||||||
|
final Map<String, Object> objs = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
// write types into types package
|
||||||
|
for (EdmEnumType enumType : schema.getEnumTypes()) {
|
||||||
|
final String className = utility.capitalize(enumType.getName());
|
||||||
|
objs.clear();
|
||||||
|
objs.put("enumType", enumType);
|
||||||
|
parseObj(typesBaseDir, typesPkg, "enumType", className + ".java", objs);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
for (EdmComplexType complex : schema.getComplexTypes()) {
|
||||||
Velocity.addProperty(Velocity.RESOURCE_LOADER, "class");
|
final String className = utility.capitalize(complex.getName());
|
||||||
Velocity.addProperty("class.resource.loader.class", ClasspathResourceLoader.class.getName());
|
complexTypeNames.add(typesPkg + "." + className);
|
||||||
|
objs.clear();
|
||||||
final Edm metadata =
|
objs.put("complexType", complex);
|
||||||
ODataClientFactory.getV3().getRetrieveRequestFactory().getMetadataRequest(serviceRootURL).execute().
|
parseObj(typesBaseDir, typesPkg, "complexType", className + ".java", objs);
|
||||||
getBody();
|
|
||||||
|
|
||||||
if (metadata == null) {
|
|
||||||
throw new IllegalStateException("Metadata not found");
|
|
||||||
}
|
|
||||||
|
|
||||||
for (EdmSchema schema : metadata.getSchemas()) {
|
|
||||||
namespaces.add(schema.getNamespace().toLowerCase());
|
|
||||||
}
|
|
||||||
|
|
||||||
final Set<String> complexTypeNames = new HashSet<String>();
|
|
||||||
final File services = mkdir("META-INF/services");
|
|
||||||
|
|
||||||
for (EdmSchema schema : metadata.getSchemas()) {
|
|
||||||
utility = new V3Utility(metadata, schema, basePackage);
|
|
||||||
|
|
||||||
// write package-info for the base package
|
|
||||||
final String schemaPath = utility.getNamespace().toLowerCase().replace('.', File.separatorChar);
|
|
||||||
final File base = mkPkgDir(schemaPath);
|
|
||||||
final String pkg = basePackage + "." + utility.getNamespace().toLowerCase();
|
|
||||||
parseObj(base, pkg, "package-info", "package-info.java");
|
|
||||||
|
|
||||||
// write package-info for types package
|
|
||||||
final File typesBaseDir = mkPkgDir(schemaPath + "/types");
|
|
||||||
final String typesPkg = pkg + ".types";
|
|
||||||
parseObj(typesBaseDir, typesPkg, "package-info", "package-info.java");
|
|
||||||
|
|
||||||
final Map<String, Object> objs = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
// write types into types package
|
|
||||||
for (EdmEnumType enumType : schema.getEnumTypes()) {
|
|
||||||
final String className = utility.capitalize(enumType.getName());
|
|
||||||
objs.clear();
|
|
||||||
objs.put("enumType", enumType);
|
|
||||||
parseObj(typesBaseDir, typesPkg, "enumType", className + ".java", objs);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (EdmComplexType complex : schema.getComplexTypes()) {
|
|
||||||
final String className = utility.capitalize(complex.getName());
|
|
||||||
complexTypeNames.add(typesPkg + "." + className);
|
|
||||||
objs.clear();
|
|
||||||
objs.put("complexType", complex);
|
|
||||||
parseObj(typesBaseDir, typesPkg, "complexType", className + ".java", objs);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (EdmEntityType entity : schema.getEntityTypes()) {
|
|
||||||
objs.clear();
|
|
||||||
objs.put("entityType", entity);
|
|
||||||
|
|
||||||
final Map<String, String> keys;
|
|
||||||
|
|
||||||
EdmEntityType baseType = null;
|
|
||||||
if (entity.getBaseType() == null) {
|
|
||||||
keys = getUtility().getEntityKeyType(entity);
|
|
||||||
} else {
|
|
||||||
baseType = entity.getBaseType();
|
|
||||||
objs.put("baseType", getUtility().getJavaType(baseType.getFullQualifiedName().toString()));
|
|
||||||
while (baseType.getBaseType() != null) {
|
|
||||||
baseType = baseType.getBaseType();
|
|
||||||
}
|
|
||||||
keys = getUtility().getEntityKeyType(baseType);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (keys.size() > 1) {
|
|
||||||
// create compound key class
|
|
||||||
final String keyClassName = utility.capitalize(baseType == null
|
|
||||||
? entity.getName()
|
|
||||||
: baseType.getName()) + "Key";
|
|
||||||
objs.put("keyRef", keyClassName);
|
|
||||||
|
|
||||||
if (entity.getBaseType() == null) {
|
|
||||||
objs.put("keys", keys);
|
|
||||||
parseObj(typesBaseDir, typesPkg, "entityTypeKey", keyClassName + ".java", objs);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
parseObj(typesBaseDir, typesPkg, "entityType",
|
|
||||||
utility.capitalize(entity.getName()) + ".java", objs);
|
|
||||||
parseObj(typesBaseDir, typesPkg, "entityCollection",
|
|
||||||
utility.capitalize(entity.getName()) + "Collection.java", objs);
|
|
||||||
}
|
|
||||||
|
|
||||||
// write container and top entity sets into the base package
|
|
||||||
for (EdmEntityContainer container : schema.getEntityContainers()) {
|
|
||||||
objs.clear();
|
|
||||||
objs.put("container", container);
|
|
||||||
objs.put("namespace", schema.getNamespace());
|
|
||||||
parseObj(base, pkg, "container",
|
|
||||||
utility.capitalize(container.getName()) + ".java", objs);
|
|
||||||
|
|
||||||
for (EdmEntitySet entitySet : container.getEntitySets()) {
|
|
||||||
objs.clear();
|
|
||||||
objs.put("entitySet", entitySet);
|
|
||||||
parseObj(base, pkg, "entitySet",
|
|
||||||
utility.capitalize(entitySet.getName()) + ".java", objs);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
parseObj(services, true, null, "services", "org.apache.olingo.ext.proxy.api.AbstractComplexType",
|
|
||||||
Collections.singletonMap("services", (Object) complexTypeNames));
|
|
||||||
}
|
|
||||||
} catch (Exception t) {
|
|
||||||
final StringWriter stringWriter = new StringWriter();
|
|
||||||
final PrintWriter printWriter = new PrintWriter(stringWriter);
|
|
||||||
t.printStackTrace(printWriter);
|
|
||||||
getLog().error(stringWriter.toString());
|
|
||||||
|
|
||||||
throw (t instanceof MojoExecutionException)
|
|
||||||
? (MojoExecutionException) t
|
|
||||||
: new MojoExecutionException("While executin mojo", t);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (EdmEntityType entity : schema.getEntityTypes()) {
|
||||||
|
objs.clear();
|
||||||
|
objs.put("entityType", entity);
|
||||||
|
|
||||||
|
final Map<String, String> keys;
|
||||||
|
|
||||||
|
EdmEntityType baseType = null;
|
||||||
|
if (entity.getBaseType() == null) {
|
||||||
|
keys = getUtility().getEntityKeyType(entity);
|
||||||
|
} else {
|
||||||
|
baseType = entity.getBaseType();
|
||||||
|
objs.put("baseType", getUtility().getJavaType(baseType.getFullQualifiedName().toString()));
|
||||||
|
while (baseType.getBaseType() != null) {
|
||||||
|
baseType = baseType.getBaseType();
|
||||||
|
}
|
||||||
|
keys = getUtility().getEntityKeyType(baseType);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (keys.size() > 1) {
|
||||||
|
// create compound key class
|
||||||
|
final String keyClassName = utility.capitalize(baseType == null
|
||||||
|
? entity.getName()
|
||||||
|
: baseType.getName()) + "Key";
|
||||||
|
objs.put("keyRef", keyClassName);
|
||||||
|
|
||||||
|
if (entity.getBaseType() == null) {
|
||||||
|
objs.put("keys", keys);
|
||||||
|
parseObj(typesBaseDir, typesPkg, "entityTypeKey", keyClassName + ".java", objs);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
parseObj(typesBaseDir, typesPkg, "entityType",
|
||||||
|
utility.capitalize(entity.getName()) + ".java", objs);
|
||||||
|
parseObj(typesBaseDir, typesPkg, "entityCollection",
|
||||||
|
utility.capitalize(entity.getName()) + "Collection.java", objs);
|
||||||
|
}
|
||||||
|
|
||||||
|
// write container and top entity sets into the base package
|
||||||
|
for (EdmEntityContainer container : schema.getEntityContainers()) {
|
||||||
|
objs.clear();
|
||||||
|
objs.put("container", container);
|
||||||
|
objs.put("namespace", schema.getNamespace());
|
||||||
|
parseObj(base, pkg, "container",
|
||||||
|
utility.capitalize(container.getName()) + ".java", objs);
|
||||||
|
|
||||||
|
for (EdmEntitySet entitySet : container.getEntitySets()) {
|
||||||
|
objs.clear();
|
||||||
|
objs.put("entitySet", entitySet);
|
||||||
|
parseObj(base, pkg, "entitySet",
|
||||||
|
utility.capitalize(entitySet.getName()) + ".java", objs);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
parseObj(services, true, null, "services", "org.apache.olingo.ext.proxy.api.AbstractComplexType",
|
||||||
|
Collections.singletonMap("services", (Object) complexTypeNames));
|
||||||
|
}
|
||||||
|
} catch (Exception t) {
|
||||||
|
final StringWriter stringWriter = new StringWriter();
|
||||||
|
final PrintWriter printWriter = new PrintWriter(stringWriter);
|
||||||
|
t.printStackTrace(printWriter);
|
||||||
|
getLog().error(stringWriter.toString());
|
||||||
|
|
||||||
|
throw (t instanceof MojoExecutionException)
|
||||||
|
? (MojoExecutionException) t
|
||||||
|
: new MojoExecutionException("While executing mojo", t);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,6 @@ import ${basePackage}.${ns}.*;
|
||||||
import ${basePackage}.${ns}.types.*;
|
import ${basePackage}.${ns}.types.*;
|
||||||
#end
|
#end
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -31,7 +31,6 @@ import ${basePackage}.${ns}.*;
|
||||||
import ${basePackage}.${ns}.types.*;
|
import ${basePackage}.${ns}.types.*;
|
||||||
#end
|
#end
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -28,7 +28,6 @@ import ${basePackage}.${ns}.*;
|
||||||
import ${basePackage}.${ns}.types.*;
|
import ${basePackage}.${ns}.types.*;
|
||||||
#end
|
#end
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
@ -46,8 +45,8 @@ import java.util.Calendar;
|
||||||
import javax.xml.datatype.Duration;
|
import javax.xml.datatype.Duration;
|
||||||
|
|
||||||
public interface $utility.capitalize($entityType.Name)Collection extends AbstractEntityCollection<$utility.capitalize($entityType.Name)> {
|
public interface $utility.capitalize($entityType.Name)Collection extends AbstractEntityCollection<$utility.capitalize($entityType.Name)> {
|
||||||
#set( $functions = $utility.getFunctionsBoundTo($entityType.Name, false) )
|
#set( $functions = $utility.getFunctionsBoundTo($entityType.Name, true) )
|
||||||
#set( $actions = $utility.getActionsBoundTo($entityType.Name, false) )
|
#set( $actions = $utility.getActionsBoundTo($entityType.Name, true) )
|
||||||
#if( $functions.size() > 0 || $actions.size() > 0 )
|
#if( $functions.size() > 0 || $actions.size() > 0 )
|
||||||
Operations operations();
|
Operations operations();
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,6 @@ import ${basePackage}.${ns}.*;
|
||||||
import ${basePackage}.${ns}.types.*;
|
import ${basePackage}.${ns}.types.*;
|
||||||
#end
|
#end
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -37,7 +37,6 @@ import ${basePackage}.${ns}.*;
|
||||||
import ${basePackage}.${ns}.types.*;
|
import ${basePackage}.${ns}.types.*;
|
||||||
#end
|
#end
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -32,7 +32,6 @@ import ${basePackage}.${ns}.*;
|
||||||
import ${basePackage}.${ns}.types.*;
|
import ${basePackage}.${ns}.types.*;
|
||||||
#end
|
#end
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -28,7 +28,6 @@ import ${basePackage}.${ns}.*;
|
||||||
import ${basePackage}.${ns}.types.*;
|
import ${basePackage}.${ns}.types.*;
|
||||||
#end
|
#end
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -121,6 +121,8 @@ public abstract class AbstractServices {
|
||||||
|
|
||||||
protected final ODataServiceVersion version;
|
protected final ODataServiceVersion version;
|
||||||
|
|
||||||
|
protected final Metadata metadata;
|
||||||
|
|
||||||
protected final FITAtomDeserializer atomDeserializer;
|
protected final FITAtomDeserializer atomDeserializer;
|
||||||
|
|
||||||
protected final AtomSerializer atomSerializer;
|
protected final AtomSerializer atomSerializer;
|
||||||
|
@ -133,24 +135,16 @@ public abstract class AbstractServices {
|
||||||
|
|
||||||
protected final JSONUtilities json;
|
protected final JSONUtilities json;
|
||||||
|
|
||||||
protected Metadata metadata;
|
public AbstractServices(final ODataServiceVersion version, final Metadata metadata) throws Exception {
|
||||||
|
|
||||||
public AbstractServices(final ODataServiceVersion version) throws Exception {
|
|
||||||
this.version = version;
|
this.version = version;
|
||||||
|
this.metadata = metadata;
|
||||||
this.atomDeserializer = Commons.getAtomDeserializer(version);
|
this.atomDeserializer = Commons.getAtomDeserializer(version);
|
||||||
this.atomSerializer = Commons.getAtomSerializer(version);
|
this.atomSerializer = Commons.getAtomSerializer(version);
|
||||||
this.mapper = Commons.getJSONMapper(version);
|
this.mapper = Commons.getJSONMapper(version);
|
||||||
this.dataBinder = new DataBinder(version);
|
this.dataBinder = new DataBinder(version, metadata);
|
||||||
|
|
||||||
this.xml = new XMLUtilities(version);
|
this.xml = new XMLUtilities(version, metadata);
|
||||||
this.json = new JSONUtilities(version);
|
this.json = new JSONUtilities(version, metadata);
|
||||||
}
|
|
||||||
|
|
||||||
protected Metadata getMetadataObj() {
|
|
||||||
if (metadata == null) {
|
|
||||||
metadata = Commons.getMetadata(version);
|
|
||||||
}
|
|
||||||
return metadata;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -447,7 +441,7 @@ public abstract class AbstractServices {
|
||||||
|
|
||||||
final String path = Commons.getEntityBasePath(entitySetName, entityId);
|
final String path = Commons.getEntityBasePath(entitySetName, entityId);
|
||||||
FSManager.instance(version).putInMemory(
|
FSManager.instance(version).putInMemory(
|
||||||
cres, path + File.separatorChar + Constants.get(version, ConstantKey.ENTITY));
|
cres, path + File.separatorChar + Constants.get(version, ConstantKey.ENTITY), dataBinder);
|
||||||
|
|
||||||
final Response response;
|
final Response response;
|
||||||
if ("return-content".equalsIgnoreCase(prefer)) {
|
if ("return-content".equalsIgnoreCase(prefer)) {
|
||||||
|
@ -510,7 +504,7 @@ public abstract class AbstractServices {
|
||||||
|
|
||||||
final String path = Commons.getEntityBasePath(entitySetName, entityId);
|
final String path = Commons.getEntityBasePath(entitySetName, entityId);
|
||||||
FSManager.instance(version).putInMemory(
|
FSManager.instance(version).putInMemory(
|
||||||
cres, path + File.separatorChar + Constants.get(version, ConstantKey.ENTITY));
|
cres, path + File.separatorChar + Constants.get(version, ConstantKey.ENTITY), dataBinder);
|
||||||
|
|
||||||
final Response response;
|
final Response response;
|
||||||
if ("return-content".equalsIgnoreCase(prefer)) {
|
if ("return-content".equalsIgnoreCase(prefer)) {
|
||||||
|
@ -560,7 +554,7 @@ public abstract class AbstractServices {
|
||||||
|
|
||||||
final ResWrap<AtomEntityImpl> container;
|
final ResWrap<AtomEntityImpl> container;
|
||||||
|
|
||||||
final org.apache.olingo.fit.metadata.EntitySet entitySet = getMetadataObj().getEntitySet(entitySetName);
|
final org.apache.olingo.fit.metadata.EntitySet entitySet = metadata.getEntitySet(entitySetName);
|
||||||
|
|
||||||
final AtomEntityImpl entry;
|
final AtomEntityImpl entry;
|
||||||
final String entityKey;
|
final String entityKey;
|
||||||
|
@ -632,7 +626,7 @@ public abstract class AbstractServices {
|
||||||
|
|
||||||
final String path = Commons.getEntityBasePath(entitySetName, entityKey);
|
final String path = Commons.getEntityBasePath(entitySetName, entityKey);
|
||||||
FSManager.instance(version).putInMemory(
|
FSManager.instance(version).putInMemory(
|
||||||
result, path + File.separatorChar + Constants.get(version, ConstantKey.ENTITY));
|
result, path + File.separatorChar + Constants.get(version, ConstantKey.ENTITY), dataBinder);
|
||||||
|
|
||||||
final String location = uriInfo.getRequestUri().toASCIIString() + "(" + entityKey + ")";
|
final String location = uriInfo.getRequestUri().toASCIIString() + "(" + entityKey + ")";
|
||||||
|
|
||||||
|
@ -729,7 +723,7 @@ public abstract class AbstractServices {
|
||||||
append(File.separatorChar).append(type).
|
append(File.separatorChar).append(type).
|
||||||
append(File.separatorChar);
|
append(File.separatorChar);
|
||||||
|
|
||||||
path.append(getMetadataObj().getEntitySet(name).isSingleton()
|
path.append(metadata.getEntitySet(name).isSingleton()
|
||||||
? Constants.get(version, ConstantKey.ENTITY)
|
? Constants.get(version, ConstantKey.ENTITY)
|
||||||
: Constants.get(version, ConstantKey.FEED));
|
: Constants.get(version, ConstantKey.FEED));
|
||||||
|
|
||||||
|
@ -788,7 +782,7 @@ public abstract class AbstractServices {
|
||||||
append(File.separatorChar).append(type).
|
append(File.separatorChar).append(type).
|
||||||
append(File.separatorChar);
|
append(File.separatorChar);
|
||||||
|
|
||||||
path.append(getMetadataObj().getEntitySet(name).isSingleton()
|
path.append(metadata.getEntitySet(name).isSingleton()
|
||||||
? Constants.get(version, ConstantKey.ENTITY)
|
? Constants.get(version, ConstantKey.ENTITY)
|
||||||
: Constants.get(version, ConstantKey.FEED));
|
: Constants.get(version, ConstantKey.FEED));
|
||||||
|
|
||||||
|
@ -861,7 +855,7 @@ public abstract class AbstractServices {
|
||||||
builder.append(Constants.get(version, ConstantKey.SKIP_TOKEN)).append(File.separatorChar).
|
builder.append(Constants.get(version, ConstantKey.SKIP_TOKEN)).append(File.separatorChar).
|
||||||
append(skiptoken);
|
append(skiptoken);
|
||||||
} else {
|
} else {
|
||||||
builder.append(getMetadataObj().getEntitySet(name).isSingleton()
|
builder.append(metadata.getEntitySet(name).isSingleton()
|
||||||
? Constants.get(version, ConstantKey.ENTITY)
|
? Constants.get(version, ConstantKey.ENTITY)
|
||||||
: Constants.get(version, ConstantKey.FEED));
|
: Constants.get(version, ConstantKey.FEED));
|
||||||
}
|
}
|
||||||
|
@ -1577,7 +1571,7 @@ public abstract class AbstractServices {
|
||||||
writer,
|
writer,
|
||||||
new JSONEntryContainer(container.getContextURL(),
|
new JSONEntryContainer(container.getContextURL(),
|
||||||
container.getMetadataETag(),
|
container.getMetadataETag(),
|
||||||
dataBinder.toJSONEntityType((AtomEntityImpl) container.getPayload())));
|
dataBinder.toJSONEntity((AtomEntityImpl) container.getPayload())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1722,8 +1716,8 @@ public abstract class AbstractServices {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void normalizeAtomEntry(final AtomEntityImpl entry, final String entitySetName, final String entityKey) {
|
protected void normalizeAtomEntry(final AtomEntityImpl entry, final String entitySetName, final String entityKey) {
|
||||||
final org.apache.olingo.fit.metadata.EntitySet entitySet = getMetadataObj().getEntitySet(entitySetName);
|
final org.apache.olingo.fit.metadata.EntitySet entitySet = metadata.getEntitySet(entitySetName);
|
||||||
final EntityType entityType = getMetadataObj().getEntityType(entitySet.getType());
|
final EntityType entityType = metadata.getEntityOrComplexType(entitySet.getType());
|
||||||
for (Map.Entry<String, org.apache.olingo.fit.metadata.Property> property
|
for (Map.Entry<String, org.apache.olingo.fit.metadata.Property> property
|
||||||
: entityType.getPropertyMap().entrySet()) {
|
: entityType.getPropertyMap().entrySet()) {
|
||||||
if (entry.getProperty(property.getKey()) == null && property.getValue().isNullable()) {
|
if (entry.getProperty(property.getKey()) == null && property.getValue().isNullable()) {
|
||||||
|
|
|
@ -56,7 +56,7 @@ import org.springframework.stereotype.Service;
|
||||||
public class V3ActionOverloading extends AbstractServices {
|
public class V3ActionOverloading extends AbstractServices {
|
||||||
|
|
||||||
public V3ActionOverloading() throws Exception {
|
public V3ActionOverloading() throws Exception {
|
||||||
super(ODataServiceVersion.V30);
|
super(ODataServiceVersion.V30, Commons.getMetadata(ODataServiceVersion.V30));
|
||||||
}
|
}
|
||||||
|
|
||||||
private Response replaceServiceName(final Response response) {
|
private Response replaceServiceName(final Response response) {
|
||||||
|
|
|
@ -61,12 +61,7 @@ public class V3OpenType {
|
||||||
this.openMetadata = new Metadata(FSManager.instance(ODataServiceVersion.V30).
|
this.openMetadata = new Metadata(FSManager.instance(ODataServiceVersion.V30).
|
||||||
readFile("openType" + StringUtils.capitalize(Constants.get(ODataServiceVersion.V30, ConstantKey.METADATA)),
|
readFile("openType" + StringUtils.capitalize(Constants.get(ODataServiceVersion.V30, ConstantKey.METADATA)),
|
||||||
Accept.XML), ODataServiceVersion.V30);
|
Accept.XML), ODataServiceVersion.V30);
|
||||||
this.services = new V3Services() {
|
this.services = new V3Services(this.openMetadata);
|
||||||
@Override
|
|
||||||
protected Metadata getMetadataObj() {
|
|
||||||
return openMetadata;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Response replaceServiceName(final Response response) {
|
private Response replaceServiceName(final Response response) {
|
||||||
|
|
|
@ -47,6 +47,7 @@ import org.apache.cxf.interceptor.InInterceptors;
|
||||||
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
|
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
|
||||||
import org.apache.olingo.commons.api.data.EntitySet;
|
import org.apache.olingo.commons.api.data.EntitySet;
|
||||||
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
|
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
|
||||||
|
import org.apache.olingo.fit.metadata.Metadata;
|
||||||
import org.apache.olingo.fit.methods.MERGE;
|
import org.apache.olingo.fit.methods.MERGE;
|
||||||
import org.apache.olingo.fit.methods.PATCH;
|
import org.apache.olingo.fit.methods.PATCH;
|
||||||
import org.apache.olingo.fit.utils.AbstractUtilities;
|
import org.apache.olingo.fit.utils.AbstractUtilities;
|
||||||
|
@ -64,7 +65,11 @@ import org.springframework.stereotype.Service;
|
||||||
public class V3Services extends AbstractServices {
|
public class V3Services extends AbstractServices {
|
||||||
|
|
||||||
public V3Services() throws Exception {
|
public V3Services() throws Exception {
|
||||||
super(ODataServiceVersion.V30);
|
super(ODataServiceVersion.V30, Commons.getMetadata(ODataServiceVersion.V30));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected V3Services(final Metadata metadata) throws Exception {
|
||||||
|
super(ODataServiceVersion.V30, metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
|
|
|
@ -58,12 +58,7 @@ public class V4Demo {
|
||||||
this.demoMetadata = new Metadata(FSManager.instance(ODataServiceVersion.V40).
|
this.demoMetadata = new Metadata(FSManager.instance(ODataServiceVersion.V40).
|
||||||
readFile("demo" + StringUtils.capitalize(Constants.get(ODataServiceVersion.V40, ConstantKey.METADATA)),
|
readFile("demo" + StringUtils.capitalize(Constants.get(ODataServiceVersion.V40, ConstantKey.METADATA)),
|
||||||
Accept.XML), ODataServiceVersion.V40);
|
Accept.XML), ODataServiceVersion.V40);
|
||||||
this.services = new V4Services() {
|
this.services = new V4Services(this.demoMetadata);
|
||||||
@Override
|
|
||||||
protected Metadata getMetadataObj() {
|
|
||||||
return demoMetadata;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Response replaceServiceName(final Response response) {
|
private Response replaceServiceName(final Response response) {
|
||||||
|
|
|
@ -56,13 +56,8 @@ public class V4OpenType {
|
||||||
public V4OpenType() throws Exception {
|
public V4OpenType() throws Exception {
|
||||||
this.openMetadata = new Metadata(FSManager.instance(ODataServiceVersion.V40).
|
this.openMetadata = new Metadata(FSManager.instance(ODataServiceVersion.V40).
|
||||||
readFile("openType" + StringUtils.capitalize(Constants.get(ODataServiceVersion.V40, ConstantKey.METADATA)),
|
readFile("openType" + StringUtils.capitalize(Constants.get(ODataServiceVersion.V40, ConstantKey.METADATA)),
|
||||||
Accept.XML), ODataServiceVersion.V40);
|
Accept.XML), ODataServiceVersion.V40);
|
||||||
this.services = new V4Services() {
|
this.services = new V4Services(openMetadata);
|
||||||
@Override
|
|
||||||
protected Metadata getMetadataObj() {
|
|
||||||
return openMetadata;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Response replaceServiceName(final Response response) {
|
private Response replaceServiceName(final Response response) {
|
||||||
|
|
|
@ -74,9 +74,11 @@ import org.apache.olingo.commons.core.data.JSONEntityImpl;
|
||||||
import org.apache.olingo.commons.core.data.JSONPropertyImpl;
|
import org.apache.olingo.commons.core.data.JSONPropertyImpl;
|
||||||
import org.apache.olingo.commons.core.data.PrimitiveValueImpl;
|
import org.apache.olingo.commons.core.data.PrimitiveValueImpl;
|
||||||
import org.apache.olingo.commons.core.edm.EdmTypeInfo;
|
import org.apache.olingo.commons.core.edm.EdmTypeInfo;
|
||||||
|
import org.apache.olingo.fit.metadata.Metadata;
|
||||||
import org.apache.olingo.fit.methods.PATCH;
|
import org.apache.olingo.fit.methods.PATCH;
|
||||||
import org.apache.olingo.fit.utils.AbstractUtilities;
|
import org.apache.olingo.fit.utils.AbstractUtilities;
|
||||||
import org.apache.olingo.fit.utils.Accept;
|
import org.apache.olingo.fit.utils.Accept;
|
||||||
|
import org.apache.olingo.fit.utils.Commons;
|
||||||
import org.apache.olingo.fit.utils.ConstantKey;
|
import org.apache.olingo.fit.utils.ConstantKey;
|
||||||
import org.apache.olingo.fit.utils.Constants;
|
import org.apache.olingo.fit.utils.Constants;
|
||||||
import org.apache.olingo.fit.utils.FSManager;
|
import org.apache.olingo.fit.utils.FSManager;
|
||||||
|
@ -103,7 +105,11 @@ public class V4Services extends AbstractServices {
|
||||||
private Map<String, String> providedAsync = new HashMap<String, String>();
|
private Map<String, String> providedAsync = new HashMap<String, String>();
|
||||||
|
|
||||||
public V4Services() throws Exception {
|
public V4Services() throws Exception {
|
||||||
super(ODataServiceVersion.V40);
|
super(ODataServiceVersion.V40, Commons.getMetadata(ODataServiceVersion.V40));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected V4Services(final Metadata metadata) throws Exception {
|
||||||
|
super(ODataServiceVersion.V40, metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
|
@ -224,7 +230,7 @@ public class V4Services extends AbstractServices {
|
||||||
final String basePath = name + File.separatorChar;
|
final String basePath = name + File.separatorChar;
|
||||||
final StringBuilder path = new StringBuilder(basePath);
|
final StringBuilder path = new StringBuilder(basePath);
|
||||||
|
|
||||||
path.append(getMetadataObj().getEntitySet(name).isSingleton()
|
path.append(metadata.getEntitySet(name).isSingleton()
|
||||||
? Constants.get(version, ConstantKey.ENTITY)
|
? Constants.get(version, ConstantKey.ENTITY)
|
||||||
: Constants.get(version, ConstantKey.FEED));
|
: Constants.get(version, ConstantKey.FEED));
|
||||||
|
|
||||||
|
@ -821,7 +827,7 @@ public class V4Services extends AbstractServices {
|
||||||
entry);
|
entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
final EdmTypeInfo contained = new EdmTypeInfo.Builder().setTypeExpression(getMetadataObj().
|
final EdmTypeInfo contained = new EdmTypeInfo.Builder().setTypeExpression(metadata.
|
||||||
getNavigationProperties("Accounts").get(containedEntitySetName).getType()).build();
|
getNavigationProperties("Accounts").get(containedEntitySetName).getType()).build();
|
||||||
final String entityKey = getUtilities(contentTypeValue).
|
final String entityKey = getUtilities(contentTypeValue).
|
||||||
getDefaultEntryKey(contained.getFullQualifiedName().getName(), entry);
|
getDefaultEntryKey(contained.getFullQualifiedName().getName(), entry);
|
||||||
|
@ -902,8 +908,8 @@ public class V4Services extends AbstractServices {
|
||||||
container = atomDeserializer.read(IOUtils.toInputStream(changes, Constants.ENCODING), AtomEntityImpl.class);
|
container = atomDeserializer.read(IOUtils.toInputStream(changes, Constants.ENCODING), AtomEntityImpl.class);
|
||||||
entryChanges = container.getPayload();
|
entryChanges = container.getPayload();
|
||||||
} else {
|
} else {
|
||||||
final String entityType = getMetadataObj().getEntitySet(entitySetName).getType();
|
final String entityType = metadata.getEntitySet(entitySetName).getType();
|
||||||
final String containedType = getMetadataObj().getEntityType(entityType).
|
final String containedType = metadata.getEntityOrComplexType(entityType).
|
||||||
getNavigationProperty(containedEntitySetName).getType();
|
getNavigationProperty(containedEntitySetName).getType();
|
||||||
final EdmTypeInfo typeInfo = new EdmTypeInfo.Builder().setTypeExpression(containedType).build();
|
final EdmTypeInfo typeInfo = new EdmTypeInfo.Builder().setTypeExpression(containedType).build();
|
||||||
|
|
||||||
|
@ -923,7 +929,8 @@ public class V4Services extends AbstractServices {
|
||||||
}
|
}
|
||||||
|
|
||||||
FSManager.instance(version).putInMemory(new ResWrap<AtomEntityImpl>((URI) null, null, original),
|
FSManager.instance(version).putInMemory(new ResWrap<AtomEntityImpl>((URI) null, null, original),
|
||||||
xml.getLinksBasePath(entitySetName, entityId) + containedEntitySetName + "(" + containedEntityId + ")");
|
xml.getLinksBasePath(entitySetName, entityId) + containedEntitySetName + "(" + containedEntityId + ")",
|
||||||
|
dataBinder);
|
||||||
|
|
||||||
return xml.createResponse(null, null, acceptType, Response.Status.NO_CONTENT);
|
return xml.createResponse(null, null, acceptType, Response.Status.NO_CONTENT);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
|
@ -25,6 +25,7 @@ import javax.ws.rs.Produces;
|
||||||
import javax.ws.rs.core.MediaType;
|
import javax.ws.rs.core.MediaType;
|
||||||
import javax.ws.rs.core.Response;
|
import javax.ws.rs.core.Response;
|
||||||
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
|
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
|
||||||
|
import org.apache.olingo.fit.metadata.Metadata;
|
||||||
import org.apache.olingo.fit.utils.Accept;
|
import org.apache.olingo.fit.utils.Accept;
|
||||||
import org.apache.olingo.fit.utils.ConstantKey;
|
import org.apache.olingo.fit.utils.ConstantKey;
|
||||||
import org.apache.olingo.fit.utils.Constants;
|
import org.apache.olingo.fit.utils.Constants;
|
||||||
|
@ -36,10 +37,15 @@ import org.springframework.stereotype.Service;
|
||||||
@Path("/V40/Vocabularies.svc")
|
@Path("/V40/Vocabularies.svc")
|
||||||
public class V4Vocabularies {
|
public class V4Vocabularies {
|
||||||
|
|
||||||
|
private final Metadata metadata;
|
||||||
|
|
||||||
private final XMLUtilities xml;
|
private final XMLUtilities xml;
|
||||||
|
|
||||||
public V4Vocabularies() throws Exception {
|
public V4Vocabularies() throws Exception {
|
||||||
this.xml = new XMLUtilities(ODataServiceVersion.V40);
|
this.metadata = new Metadata(FSManager.instance(ODataServiceVersion.V40).readFile(
|
||||||
|
"vocabularies-" + Constants.get(ODataServiceVersion.V40, ConstantKey.METADATA), Accept.XML),
|
||||||
|
ODataServiceVersion.V40);
|
||||||
|
this.xml = new XMLUtilities(ODataServiceVersion.V40, metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
|
|
|
@ -29,6 +29,8 @@ public class EntityType extends AbstractMetadataElement {
|
||||||
|
|
||||||
private String baseType;
|
private String baseType;
|
||||||
|
|
||||||
|
private boolean openType = false;
|
||||||
|
|
||||||
private final Map<String, Property> properties;
|
private final Map<String, Property> properties;
|
||||||
|
|
||||||
private final Map<String, NavigationProperty> navigationProperties;
|
private final Map<String, NavigationProperty> navigationProperties;
|
||||||
|
@ -51,6 +53,14 @@ public class EntityType extends AbstractMetadataElement {
|
||||||
this.baseType = baseType;
|
this.baseType = baseType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isOpenType() {
|
||||||
|
return openType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOpenType(final boolean openType) {
|
||||||
|
this.openType = openType;
|
||||||
|
}
|
||||||
|
|
||||||
public Collection<NavigationProperty> getNavigationProperties() {
|
public Collection<NavigationProperty> getNavigationProperties() {
|
||||||
return new HashSet<NavigationProperty>(navigationProperties.values());
|
return new HashSet<NavigationProperty>(navigationProperties.values());
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,7 @@ import javax.xml.stream.events.Attribute;
|
||||||
import javax.xml.stream.events.StartElement;
|
import javax.xml.stream.events.StartElement;
|
||||||
import javax.xml.stream.events.XMLEvent;
|
import javax.xml.stream.events.XMLEvent;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
|
import org.apache.commons.lang3.BooleanUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
|
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
|
||||||
import org.apache.olingo.fit.utils.ConstantKey;
|
import org.apache.olingo.fit.utils.ConstantKey;
|
||||||
|
@ -134,7 +135,7 @@ public class Metadata extends AbstractMetadataElement {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public EntityType getEntityType(final String fqn) {
|
public EntityType getEntityOrComplexType(final String fqn) {
|
||||||
EntityType result = null;
|
EntityType result = null;
|
||||||
|
|
||||||
final String ns = StringUtils.substringBeforeLast(fqn, ".");
|
final String ns = StringUtils.substringBeforeLast(fqn, ".");
|
||||||
|
@ -302,6 +303,10 @@ public class Metadata extends AbstractMetadataElement {
|
||||||
if (baseType != null) {
|
if (baseType != null) {
|
||||||
entityType.setBaseType(baseType.getValue());
|
entityType.setBaseType(baseType.getValue());
|
||||||
}
|
}
|
||||||
|
final Attribute openType = start.getAttributeByName(new QName("OpenType"));
|
||||||
|
if (openType != null) {
|
||||||
|
entityType.setOpenType(BooleanUtils.toBoolean(openType.getValue()));
|
||||||
|
}
|
||||||
|
|
||||||
boolean completed = false;
|
boolean completed = false;
|
||||||
|
|
||||||
|
|
|
@ -91,6 +91,8 @@ public abstract class AbstractUtilities {
|
||||||
|
|
||||||
protected final ODataServiceVersion version;
|
protected final ODataServiceVersion version;
|
||||||
|
|
||||||
|
protected final Metadata metadata;
|
||||||
|
|
||||||
protected final FSManager fsManager;
|
protected final FSManager fsManager;
|
||||||
|
|
||||||
protected final DataBinder dataBinder;
|
protected final DataBinder dataBinder;
|
||||||
|
@ -101,10 +103,11 @@ public abstract class AbstractUtilities {
|
||||||
|
|
||||||
protected final ObjectMapper mapper;
|
protected final ObjectMapper mapper;
|
||||||
|
|
||||||
public AbstractUtilities(final ODataServiceVersion version) throws Exception {
|
public AbstractUtilities(final ODataServiceVersion version, final Metadata metadata) throws Exception {
|
||||||
this.version = version;
|
this.version = version;
|
||||||
|
this.metadata = metadata;
|
||||||
this.fsManager = FSManager.instance(version);
|
this.fsManager = FSManager.instance(version);
|
||||||
this.dataBinder = new DataBinder(version);
|
this.dataBinder = new DataBinder(version, metadata);
|
||||||
this.atomDeserializer = Commons.getAtomDeserializer(version);
|
this.atomDeserializer = Commons.getAtomDeserializer(version);
|
||||||
this.atomSerializer = Commons.getAtomSerializer(version);
|
this.atomSerializer = Commons.getAtomSerializer(version);
|
||||||
this.mapper = Commons.getJSONMapper(version);
|
this.mapper = Commons.getJSONMapper(version);
|
||||||
|
@ -217,8 +220,7 @@ public abstract class AbstractUtilities {
|
||||||
IOUtils.copy(is, bos);
|
IOUtils.copy(is, bos);
|
||||||
IOUtils.closeQuietly(is);
|
IOUtils.closeQuietly(is);
|
||||||
|
|
||||||
final Map<String, NavigationProperty> navigationProperties =
|
final Map<String, NavigationProperty> navigationProperties = metadata.getNavigationProperties(entitySetName);
|
||||||
Commons.getMetadata(version).getNavigationProperties(entitySetName);
|
|
||||||
|
|
||||||
// -----------------------------------------
|
// -----------------------------------------
|
||||||
// 0. Retrieve navigation links to be kept
|
// 0. Retrieve navigation links to be kept
|
||||||
|
@ -363,7 +365,6 @@ public abstract class AbstractUtilities {
|
||||||
|
|
||||||
final HashSet<String> uris = new HashSet<String>();
|
final HashSet<String> uris = new HashSet<String>();
|
||||||
|
|
||||||
final Metadata metadata = Commons.getMetadata(version);
|
|
||||||
final Map<String, NavigationProperty> navigationProperties = metadata.getNavigationProperties(entitySetName);
|
final Map<String, NavigationProperty> navigationProperties = metadata.getNavigationProperties(entitySetName);
|
||||||
|
|
||||||
if (navigationProperties.get(linkName).isEntitySet()) {
|
if (navigationProperties.get(linkName).isEntitySet()) {
|
||||||
|
@ -610,7 +611,7 @@ public abstract class AbstractUtilities {
|
||||||
} else {
|
} else {
|
||||||
mapper.writeValue(
|
mapper.writeValue(
|
||||||
writer, new JSONEntryContainer(container.getContextURL(), container.getMetadataETag(),
|
writer, new JSONEntryContainer(container.getContextURL(), container.getMetadataETag(),
|
||||||
dataBinder.toJSONEntityType(container.getPayload())));
|
dataBinder.toJSONEntity(container.getPayload())));
|
||||||
}
|
}
|
||||||
|
|
||||||
return IOUtils.toInputStream(writer.toString(), Constants.ENCODING);
|
return IOUtils.toInputStream(writer.toString(), Constants.ENCODING);
|
||||||
|
@ -702,6 +703,8 @@ public abstract class AbstractUtilities {
|
||||||
Commons.SEQUENCE.put(entitySetName, messageId);
|
Commons.SEQUENCE.put(entitySetName, messageId);
|
||||||
} else if ("Order".equals(entitySetName)) {
|
} else if ("Order".equals(entitySetName)) {
|
||||||
res = getDefaultEntryKey(entitySetName, entity, "OrderId");
|
res = getDefaultEntryKey(entitySetName, entity, "OrderId");
|
||||||
|
} else if ("Product".equals(entitySetName)) {
|
||||||
|
res = getDefaultEntryKey(entitySetName, entity, "ProductId");
|
||||||
} else if ("Orders".equals(entitySetName)) {
|
} else if ("Orders".equals(entitySetName)) {
|
||||||
res = getDefaultEntryKey(entitySetName, entity, "OrderID");
|
res = getDefaultEntryKey(entitySetName, entity, "OrderID");
|
||||||
} else if ("Customer".equals(entitySetName)) {
|
} else if ("Customer".equals(entitySetName)) {
|
||||||
|
@ -778,7 +781,6 @@ public abstract class AbstractUtilities {
|
||||||
|
|
||||||
final LinkInfo linkInfo = new LinkInfo(fsManager.readFile(basePath + linkName, accept));
|
final LinkInfo linkInfo = new LinkInfo(fsManager.readFile(basePath + linkName, accept));
|
||||||
linkInfo.setEtag(Commons.getETag(basePath, version));
|
linkInfo.setEtag(Commons.getETag(basePath, version));
|
||||||
final Metadata metadata = Commons.getMetadata(version);
|
|
||||||
final Map<String, NavigationProperty> navigationProperties = metadata.getNavigationProperties(entitySetName);
|
final Map<String, NavigationProperty> navigationProperties = metadata.getNavigationProperties(entitySetName);
|
||||||
|
|
||||||
linkInfo.setFeed(navigationProperties.get(linkName.replaceAll("\\(.*\\)", "")).isEntitySet());
|
linkInfo.setFeed(navigationProperties.get(linkName.replaceAll("\\(.*\\)", "")).isEntitySet());
|
||||||
|
@ -840,7 +842,6 @@ public abstract class AbstractUtilities {
|
||||||
// --------------------------------
|
// --------------------------------
|
||||||
// 1. Retrieve expanded object (entry or feed)
|
// 1. Retrieve expanded object (entry or feed)
|
||||||
// --------------------------------
|
// --------------------------------
|
||||||
final Metadata metadata = Commons.getMetadata(version);
|
|
||||||
final Map<String, NavigationProperty> navigationProperties = metadata.getNavigationProperties(entitySetName);
|
final Map<String, NavigationProperty> navigationProperties = metadata.getNavigationProperties(entitySetName);
|
||||||
|
|
||||||
return readEntities(
|
return readEntities(
|
||||||
|
|
|
@ -87,6 +87,7 @@ public abstract class Commons {
|
||||||
SEQUENCE.put("Car", 1000);
|
SEQUENCE.put("Car", 1000);
|
||||||
SEQUENCE.put("Message", 1000);
|
SEQUENCE.put("Message", 1000);
|
||||||
SEQUENCE.put("Order", 1000);
|
SEQUENCE.put("Order", 1000);
|
||||||
|
SEQUENCE.put("Product", 1000);
|
||||||
SEQUENCE.put("ComputerDetail", 1000);
|
SEQUENCE.put("ComputerDetail", 1000);
|
||||||
SEQUENCE.put("AllGeoTypesSet", 1000);
|
SEQUENCE.put("AllGeoTypesSet", 1000);
|
||||||
SEQUENCE.put("Orders", 1000);
|
SEQUENCE.put("Orders", 1000);
|
||||||
|
|
|
@ -50,6 +50,7 @@ public class Constants {
|
||||||
v4constants.put(ConstantKey.JSON_ID_NAME, "@odata.id");
|
v4constants.put(ConstantKey.JSON_ID_NAME, "@odata.id");
|
||||||
v4constants.put(ConstantKey.JSON_TYPE_NAME, "@odata.type");
|
v4constants.put(ConstantKey.JSON_TYPE_NAME, "@odata.type");
|
||||||
v4constants.put(ConstantKey.JSON_NAVIGATION_SUFFIX, "@odata.navigationLink");
|
v4constants.put(ConstantKey.JSON_NAVIGATION_SUFFIX, "@odata.navigationLink");
|
||||||
|
v4constants.put(ConstantKey.JSON_EDITLINK_NAME, "@odata.editLink");
|
||||||
v4constants.put(ConstantKey.DATASERVICES_NS, "http://docs.oasis-open.org/odata/ns/dataservices");
|
v4constants.put(ConstantKey.DATASERVICES_NS, "http://docs.oasis-open.org/odata/ns/dataservices");
|
||||||
v4constants.put(ConstantKey.METADATA_NS, "http://docs.oasis-open.org/odata/ns/metadata");
|
v4constants.put(ConstantKey.METADATA_NS, "http://docs.oasis-open.org/odata/ns/metadata");
|
||||||
v4constants.put(ConstantKey.GEORSS_NS, "http://www.georss.org/georss");
|
v4constants.put(ConstantKey.GEORSS_NS, "http://www.georss.org/georss");
|
||||||
|
|
|
@ -28,6 +28,7 @@ import org.apache.olingo.commons.api.data.EntitySet;
|
||||||
import org.apache.olingo.commons.api.data.Link;
|
import org.apache.olingo.commons.api.data.Link;
|
||||||
import org.apache.olingo.commons.api.data.Property;
|
import org.apache.olingo.commons.api.data.Property;
|
||||||
import org.apache.olingo.commons.api.data.Value;
|
import org.apache.olingo.commons.api.data.Value;
|
||||||
|
import org.apache.olingo.commons.api.edm.EdmPrimitiveType;
|
||||||
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
|
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
|
||||||
import org.apache.olingo.commons.core.data.AtomEntityImpl;
|
import org.apache.olingo.commons.core.data.AtomEntityImpl;
|
||||||
import org.apache.olingo.commons.core.data.AtomEntitySetImpl;
|
import org.apache.olingo.commons.core.data.AtomEntitySetImpl;
|
||||||
|
@ -47,8 +48,11 @@ public class DataBinder {
|
||||||
|
|
||||||
private final ODataServiceVersion version;
|
private final ODataServiceVersion version;
|
||||||
|
|
||||||
public DataBinder(final ODataServiceVersion version) {
|
private final Metadata metadata;
|
||||||
|
|
||||||
|
public DataBinder(final ODataServiceVersion version, final Metadata metadata) {
|
||||||
this.version = version;
|
this.version = version;
|
||||||
|
this.metadata = metadata;
|
||||||
}
|
}
|
||||||
|
|
||||||
public JSONEntitySetImpl toJSONEntitySet(final AtomEntitySetImpl atomEntitySet) {
|
public JSONEntitySetImpl toJSONEntitySet(final AtomEntitySetImpl atomEntitySet) {
|
||||||
|
@ -61,7 +65,7 @@ public class DataBinder {
|
||||||
|
|
||||||
final Collection<Entity> entries = jsonEntitySet.getEntities();
|
final Collection<Entity> entries = jsonEntitySet.getEntities();
|
||||||
for (Entity entity : atomEntitySet.getEntities()) {
|
for (Entity entity : atomEntitySet.getEntities()) {
|
||||||
entries.add(toJSONEntityType((AtomEntityImpl) entity));
|
entries.add(toJSONEntity((AtomEntityImpl) entity));
|
||||||
}
|
}
|
||||||
|
|
||||||
return jsonEntitySet;
|
return jsonEntitySet;
|
||||||
|
@ -83,10 +87,14 @@ public class DataBinder {
|
||||||
return atomEntitySet;
|
return atomEntitySet;
|
||||||
}
|
}
|
||||||
|
|
||||||
public JSONEntityImpl toJSONEntityType(final AtomEntityImpl atomEntity) {
|
public JSONEntityImpl toJSONEntity(final AtomEntityImpl atomEntity) {
|
||||||
final JSONEntityImpl jsonEntity = new JSONEntityImpl();
|
final JSONEntityImpl jsonEntity = new JSONEntityImpl();
|
||||||
|
|
||||||
BeanUtils.copyProperties(atomEntity, jsonEntity, "baseURI", "properties", "links");
|
BeanUtils.copyProperties(atomEntity, jsonEntity, "baseURI", "properties", "links");
|
||||||
|
// This shouldn't ever happen, but...
|
||||||
|
if (atomEntity.getType() != null && atomEntity.getType().startsWith("Collection(")) {
|
||||||
|
jsonEntity.setType(atomEntity.getType().replaceAll("^Collection\\(", "").replaceAll("\\)$", ""));
|
||||||
|
}
|
||||||
jsonEntity.setBaseURI(atomEntity.getBaseURI() == null ? null : atomEntity.getBaseURI().toASCIIString());
|
jsonEntity.setBaseURI(atomEntity.getBaseURI() == null ? null : atomEntity.getBaseURI().toASCIIString());
|
||||||
jsonEntity.getOperations().addAll(atomEntity.getOperations());
|
jsonEntity.getOperations().addAll(atomEntity.getOperations());
|
||||||
|
|
||||||
|
@ -100,7 +108,7 @@ public class DataBinder {
|
||||||
if (link.getInlineEntity() instanceof AtomEntityImpl) {
|
if (link.getInlineEntity() instanceof AtomEntityImpl) {
|
||||||
final Entity inlineEntity = link.getInlineEntity();
|
final Entity inlineEntity = link.getInlineEntity();
|
||||||
if (inlineEntity instanceof AtomEntityImpl) {
|
if (inlineEntity instanceof AtomEntityImpl) {
|
||||||
jlink.setInlineEntity(toJSONEntityType((AtomEntityImpl) link.getInlineEntity()));
|
jlink.setInlineEntity(toJSONEntity((AtomEntityImpl) link.getInlineEntity()));
|
||||||
}
|
}
|
||||||
} else if (link.getInlineEntitySet() instanceof AtomEntitySetImpl) {
|
} else if (link.getInlineEntitySet() instanceof AtomEntitySetImpl) {
|
||||||
final EntitySet inlineEntitySet = link.getInlineEntitySet();
|
final EntitySet inlineEntitySet = link.getInlineEntitySet();
|
||||||
|
@ -123,8 +131,6 @@ public class DataBinder {
|
||||||
public AtomEntityImpl toAtomEntity(final JSONEntityImpl jsonEntity) {
|
public AtomEntityImpl toAtomEntity(final JSONEntityImpl jsonEntity) {
|
||||||
final AtomEntityImpl atomEntity = new AtomEntityImpl();
|
final AtomEntityImpl atomEntity = new AtomEntityImpl();
|
||||||
|
|
||||||
final Metadata metadata = Commons.getMetadata(version);
|
|
||||||
|
|
||||||
BeanUtils.copyProperties(jsonEntity, atomEntity, "baseURI", "properties", "links");
|
BeanUtils.copyProperties(jsonEntity, atomEntity, "baseURI", "properties", "links");
|
||||||
atomEntity.setBaseURI(jsonEntity.getBaseURI() == null ? null : jsonEntity.getBaseURI().toASCIIString());
|
atomEntity.setBaseURI(jsonEntity.getBaseURI() == null ? null : jsonEntity.getBaseURI().toASCIIString());
|
||||||
|
|
||||||
|
@ -134,7 +140,7 @@ public class DataBinder {
|
||||||
alink.setTitle(link.getTitle());
|
alink.setTitle(link.getTitle());
|
||||||
|
|
||||||
final NavigationProperty navPropDetails =
|
final NavigationProperty navPropDetails =
|
||||||
metadata.getEntityType(jsonEntity.getType()).getNavigationProperty(link.getTitle());
|
metadata.getEntityOrComplexType(jsonEntity.getType()).getNavigationProperty(link.getTitle());
|
||||||
|
|
||||||
alink.setType(navPropDetails != null && navPropDetails.isEntitySet()
|
alink.setType(navPropDetails != null && navPropDetails.isEntitySet()
|
||||||
? Constants.get(ConstantKey.ATOM_LINK_FEED) : Constants.get(ConstantKey.ATOM_LINK_ENTRY));
|
? Constants.get(ConstantKey.ATOM_LINK_FEED) : Constants.get(ConstantKey.ATOM_LINK_ENTRY));
|
||||||
|
@ -156,7 +162,7 @@ public class DataBinder {
|
||||||
}
|
}
|
||||||
|
|
||||||
final EntityType entityType = StringUtils.isBlank(jsonEntity.getType())
|
final EntityType entityType = StringUtils.isBlank(jsonEntity.getType())
|
||||||
? null : metadata.getEntityType(jsonEntity.getType());
|
? null : metadata.getEntityOrComplexType(jsonEntity.getType());
|
||||||
final Map<String, NavigationProperty> navProperties = entityType == null
|
final Map<String, NavigationProperty> navProperties = entityType == null
|
||||||
? Collections.<String, NavigationProperty>emptyMap() : entityType.getNavigationPropertyMap();
|
? Collections.<String, NavigationProperty>emptyMap() : entityType.getNavigationPropertyMap();
|
||||||
|
|
||||||
|
@ -238,49 +244,50 @@ public class DataBinder {
|
||||||
return jsonproperty;
|
return jsonproperty;
|
||||||
}
|
}
|
||||||
|
|
||||||
public AtomPropertyImpl toAtomProperty(final JSONPropertyImpl jsonproperty, final String entryType) {
|
public AtomPropertyImpl toAtomProperty(final JSONPropertyImpl jsonProperty, final String entryType) {
|
||||||
final AtomPropertyImpl atomproperty = new AtomPropertyImpl();
|
final AtomPropertyImpl atomproperty = new AtomPropertyImpl();
|
||||||
atomproperty.setName(jsonproperty.getName());
|
atomproperty.setName(jsonProperty.getName());
|
||||||
|
|
||||||
if (StringUtils.isNotBlank(jsonproperty.getType())) {
|
final EntityType entityType = entryType == null
|
||||||
atomproperty.setType(jsonproperty.getType());
|
? null
|
||||||
} else {
|
: metadata.getEntityOrComplexType(entryType.replaceAll("^Collection\\(", "").replaceAll("\\)$", ""));
|
||||||
final EntityType entityType = entryType == null ? null : Commons.getMetadata(version).getEntityType(entryType);
|
|
||||||
if (entityType != null) {
|
// For non-primitive types, alwasy trust what was sent - if available; otherwise, search metadata
|
||||||
System.out.println("ZZZZZZZZZZZZZ " + entityType + " " + jsonproperty.getName() + " "
|
if (StringUtils.isNotBlank(jsonProperty.getType())
|
||||||
+ entityType.getProperty(jsonproperty.getName()));
|
&& ((entityType != null && entityType.isOpenType())
|
||||||
atomproperty.setType(entityType.getProperty(jsonproperty.getName()).getType());
|
|| jsonProperty.getName() == null
|
||||||
}
|
|| !jsonProperty.getType().startsWith(EdmPrimitiveType.EDM_NAMESPACE))) {
|
||||||
|
|
||||||
|
atomproperty.setType(jsonProperty.getType());
|
||||||
|
} else if (entityType != null) {
|
||||||
|
atomproperty.setType(entityType.getProperty(jsonProperty.getName()).getType());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (jsonproperty.getValue().isComplex()) {
|
if (jsonProperty.getValue().isComplex()) {
|
||||||
final ComplexValueImpl complex = new ComplexValueImpl();
|
final ComplexValueImpl complex = new ComplexValueImpl();
|
||||||
atomproperty.setValue(complex);
|
atomproperty.setValue(complex);
|
||||||
|
|
||||||
for (Property field : jsonproperty.getValue().asComplex().get()) {
|
for (Property field : jsonProperty.getValue().asComplex().get()) {
|
||||||
complex.get().add(toAtomProperty((JSONPropertyImpl) field, atomproperty.getType()));
|
complex.get().add(toAtomProperty((JSONPropertyImpl) field, atomproperty.getType()));
|
||||||
}
|
}
|
||||||
} else if (jsonproperty.getValue().isCollection()) {
|
} else if (jsonProperty.getValue().isCollection()) {
|
||||||
final CollectionValueImpl collection = new CollectionValueImpl();
|
final CollectionValueImpl collection = new CollectionValueImpl();
|
||||||
atomproperty.setValue(collection);
|
atomproperty.setValue(collection);
|
||||||
|
|
||||||
for (Value element : jsonproperty.getValue().asCollection().get()) {
|
for (Value element : jsonProperty.getValue().asCollection().get()) {
|
||||||
if (element instanceof ComplexValueImpl) {
|
if (element instanceof ComplexValueImpl) {
|
||||||
final ComplexValueImpl complex = new ComplexValueImpl();
|
final ComplexValueImpl complex = new ComplexValueImpl();
|
||||||
collection.get().add(complex);
|
collection.get().add(complex);
|
||||||
|
|
||||||
for (Property field : element.asComplex().get()) {
|
for (Property field : element.asComplex().get()) {
|
||||||
complex.get().add(toAtomProperty((JSONPropertyImpl) field,
|
complex.get().add(toAtomProperty((JSONPropertyImpl) field, atomproperty.getType()));
|
||||||
atomproperty.getType() == null
|
|
||||||
? null
|
|
||||||
: atomproperty.getType().replaceAll("^Collection\\(", "").replaceAll("\\)$", "")));
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
collection.get().add(element);
|
collection.get().add(element);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
atomproperty.setValue(jsonproperty.getValue());
|
atomproperty.setValue(jsonProperty.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
return atomproperty;
|
return atomproperty;
|
||||||
|
|
|
@ -98,8 +98,8 @@ public class FSManager {
|
||||||
return memObject;
|
return memObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void putInMemory(final ResWrap<AtomEntityImpl> container, final String relativePath)
|
public void putInMemory(final ResWrap<AtomEntityImpl> container, final String relativePath,
|
||||||
throws IOException {
|
final DataBinder dataBinder) throws IOException {
|
||||||
try {
|
try {
|
||||||
final AtomSerializer atomSerializer = Commons.getAtomSerializer(version);
|
final AtomSerializer atomSerializer = Commons.getAtomSerializer(version);
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ public class FSManager {
|
||||||
writer, new JSONEntryContainer(
|
writer, new JSONEntryContainer(
|
||||||
container.getContextURL(),
|
container.getContextURL(),
|
||||||
container.getMetadataETag(),
|
container.getMetadataETag(),
|
||||||
new DataBinder(version).toJSONEntityType(container.getPayload())));
|
dataBinder.toJSONEntity(container.getPayload())));
|
||||||
|
|
||||||
putInMemory(new ByteArrayInputStream(content.toByteArray()), getAbsolutePath(relativePath, Accept.JSON_FULLMETA));
|
putInMemory(new ByteArrayInputStream(content.toByteArray()), getAbsolutePath(relativePath, Accept.JSON_FULLMETA));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
|
@ -42,8 +42,8 @@ import org.apache.olingo.fit.metadata.NavigationProperty;
|
||||||
|
|
||||||
public class JSONUtilities extends AbstractUtilities {
|
public class JSONUtilities extends AbstractUtilities {
|
||||||
|
|
||||||
public JSONUtilities(final ODataServiceVersion version) throws Exception {
|
public JSONUtilities(final ODataServiceVersion version, final Metadata metadata) throws Exception {
|
||||||
super(version);
|
super(version, metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -105,7 +105,6 @@ public class JSONUtilities extends AbstractUtilities {
|
||||||
|
|
||||||
final Iterator<Map.Entry<String, JsonNode>> fieldIter = srcNode.fields();
|
final Iterator<Map.Entry<String, JsonNode>> fieldIter = srcNode.fields();
|
||||||
|
|
||||||
final Metadata metadata = Commons.getMetadata(version);
|
|
||||||
final Map<String, NavigationProperty> navigationProperties = metadata.getNavigationProperties(entitySetName);
|
final Map<String, NavigationProperty> navigationProperties = metadata.getNavigationProperties(entitySetName);
|
||||||
|
|
||||||
while (fieldIter.hasNext()) {
|
while (fieldIter.hasNext()) {
|
||||||
|
|
|
@ -63,8 +63,8 @@ public class XMLUtilities extends AbstractUtilities {
|
||||||
|
|
||||||
protected static XMLOutputFactory ofactory = null;
|
protected static XMLOutputFactory ofactory = null;
|
||||||
|
|
||||||
public XMLUtilities(final ODataServiceVersion version) throws Exception {
|
public XMLUtilities(final ODataServiceVersion version, final Metadata metadata) throws Exception {
|
||||||
super(version);
|
super(version, metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -148,7 +148,6 @@ public class XMLUtilities extends AbstractUtilities {
|
||||||
|
|
||||||
writer.add(entry.getValue().getStart());
|
writer.add(entry.getValue().getStart());
|
||||||
|
|
||||||
final Metadata metadata = Commons.getMetadata(version);
|
|
||||||
final Map<String, NavigationProperty> navigationProperties = metadata.getNavigationProperties(entitySetName);
|
final Map<String, NavigationProperty> navigationProperties = metadata.getNavigationProperties(entitySetName);
|
||||||
|
|
||||||
// add for links
|
// add for links
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
-->
|
-->
|
||||||
<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
|
<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
|
||||||
<edmx:DataServices>
|
<edmx:DataServices>
|
||||||
<Schema Namespace="Microsoft.Test.OData.Services.ODataWCFService" xmlns="http://docs.oasis-open.org/odata/ns/edm">
|
<Schema Namespace="Microsoft.Test.OData.Services.OpenTypesService" xmlns="http://docs.oasis-open.org/odata/ns/edm">
|
||||||
<EnumType Name="Color">
|
<EnumType Name="Color">
|
||||||
<Member Name="Red" Value="1"/>
|
<Member Name="Red" Value="1"/>
|
||||||
<Member Name="Green" Value="2"/>
|
<Member Name="Green" Value="2"/>
|
||||||
|
@ -47,19 +47,19 @@
|
||||||
</Key>
|
</Key>
|
||||||
<Property Name="Id" Type="Edm.Guid" Nullable="false"/>
|
<Property Name="Id" Type="Edm.Guid" Nullable="false"/>
|
||||||
</EntityType>
|
</EntityType>
|
||||||
<EntityType Name="IndexedRow" BaseType="Microsoft.Test.OData.Services.ODataWCFService.Row" OpenType="true"/>
|
<EntityType Name="IndexedRow" BaseType="Microsoft.Test.OData.Services.OpenTypesService.Row" OpenType="true"/>
|
||||||
<EntityType Name="RowIndex" OpenType="true">
|
<EntityType Name="RowIndex" OpenType="true">
|
||||||
<Key>
|
<Key>
|
||||||
<PropertyRef Name="Id"/>
|
<PropertyRef Name="Id"/>
|
||||||
</Key>
|
</Key>
|
||||||
<Property Name="Id" Type="Edm.Int32" Nullable="false"/>
|
<Property Name="Id" Type="Edm.Int32" Nullable="false"/>
|
||||||
<NavigationProperty Name="Rows" Type="Microsoft.Test.OData.Services.ODataWCFService.Row" Nullable="false"/>
|
<NavigationProperty Name="Rows" Type="Microsoft.Test.OData.Services.OpenTypesService.Row" Nullable="false"/>
|
||||||
</EntityType>
|
</EntityType>
|
||||||
<EntityContainer Name="DefaultContainer">
|
<EntityContainer Name="DefaultContainer">
|
||||||
<EntitySet Name="Row" EntityType="Microsoft.Test.OData.Services.ODataWCFService.Row">
|
<EntitySet Name="Row" EntityType="Microsoft.Test.OData.Services.OpenTypesService.Row">
|
||||||
<NavigationPropertyBinding Path="Rows" Target="Row"/>
|
<NavigationPropertyBinding Path="Rows" Target="Row"/>
|
||||||
</EntitySet>
|
</EntitySet>
|
||||||
<EntitySet Name="RowIndex" EntityType="Microsoft.Test.OData.Services.ODataWCFService.RowIndex"/>
|
<EntitySet Name="RowIndex" EntityType="Microsoft.Test.OData.Services.OpenTypesService.RowIndex"/>
|
||||||
</EntityContainer>
|
</EntityContainer>
|
||||||
</Schema>
|
</Schema>
|
||||||
</edmx:DataServices>
|
</edmx:DataServices>
|
||||||
|
|
|
@ -26,7 +26,6 @@ import static org.junit.Assert.assertNotNull;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Locale;
|
|
||||||
import org.apache.olingo.ext.proxy.EntityContainerFactory;
|
import org.apache.olingo.ext.proxy.EntityContainerFactory;
|
||||||
import org.apache.olingo.ext.proxy.context.EntityContext;
|
import org.apache.olingo.ext.proxy.context.EntityContext;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.
|
||||||
|
@ -68,14 +67,6 @@ public abstract class AbstractTest {
|
||||||
|
|
||||||
protected static DefaultContainer container;
|
protected static DefaultContainer container;
|
||||||
|
|
||||||
/**
|
|
||||||
* This is needed for correct number handling (Double, for example).
|
|
||||||
*/
|
|
||||||
@BeforeClass
|
|
||||||
public static void setEnglishLocale() {
|
|
||||||
Locale.setDefault(Locale.ENGLISH);
|
|
||||||
}
|
|
||||||
|
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
public static void setUpODataServiceRoot() throws IOException {
|
public static void setUpODataServiceRoot() throws IOException {
|
||||||
testStaticServiceRootURL = "http://localhost:9080/stub/StaticService/V30/Static.svc";
|
testStaticServiceRootURL = "http://localhost:9080/stub/StaticService/V30/Static.svc";
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class AuthEntityRetrieveTestITCase extends EntityRetrieveTestITCase {
|
||||||
|
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
public static void setupContaner() {
|
public static void setupContaner() {
|
||||||
containerFactory = EntityContainerFactory.getV3Instance(testAuthServiceRootURL);
|
containerFactory = EntityContainerFactory.getV3(testAuthServiceRootURL);
|
||||||
container = containerFactory.getEntityContainer(DefaultContainer.class);
|
container = containerFactory.getEntityContainer(DefaultContainer.class);
|
||||||
assertNotNull(container);
|
assertNotNull(container);
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,6 @@ import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -25,7 +25,6 @@ import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -25,7 +25,6 @@ import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -25,7 +25,6 @@ import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -25,7 +25,6 @@ import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -25,7 +25,6 @@ import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -25,7 +25,6 @@ import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -28,7 +28,6 @@ import org.apache.olingo.ext.proxy.api.OperationType;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -25,7 +25,6 @@ import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -25,7 +25,6 @@ import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -25,7 +25,6 @@ import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -25,7 +25,6 @@ import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -25,7 +25,6 @@ import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -25,7 +25,6 @@ import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -25,7 +25,6 @@ import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -25,7 +25,6 @@ import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -25,7 +25,6 @@ import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -25,7 +25,6 @@ import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -25,7 +25,6 @@ import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -25,7 +25,6 @@ import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -25,7 +25,6 @@ import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -25,7 +25,6 @@ import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -25,7 +25,6 @@ import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -25,7 +25,6 @@ import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -25,7 +25,6 @@ import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -25,7 +25,6 @@ import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
@ -48,10 +47,12 @@ import javax.xml.datatype.Duration;
|
||||||
public interface Aliases extends Serializable {
|
public interface Aliases extends Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Property(name = "AlternativeNames", type = "Edm.String", nullable = false)
|
@Property(name = "AlternativeNames", type = "Edm.String", nullable = false)
|
||||||
Collection<String> getAlternativeNames();
|
Collection<String> getAlternativeNames();
|
||||||
|
|
||||||
void setAlternativeNames(final Collection<String> _alternativeNames);
|
void setAlternativeNames(final Collection<String> _alternativeNames);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,6 @@ import org.apache.olingo.client.api.edm.ConcurrencyMode;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
@ -61,6 +60,7 @@ public interface AllSpatialCollectionTypes
|
||||||
extends Serializable {
|
extends Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Key
|
@Key
|
||||||
@Property(name = "Id",
|
@Property(name = "Id",
|
||||||
type = "Edm.Int32",
|
type = "Edm.Int32",
|
||||||
|
@ -87,4 +87,6 @@ public interface AllSpatialCollectionTypes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,6 @@ import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -34,7 +34,6 @@ import org.apache.olingo.client.api.edm.ConcurrencyMode;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
@ -62,6 +61,7 @@ public interface AllSpatialCollectionTypes_Simple
|
||||||
extends org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.AllSpatialCollectionTypes {
|
extends org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.AllSpatialCollectionTypes {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Key
|
@Key
|
||||||
@Property(name = "Id",
|
@Property(name = "Id",
|
||||||
type = "Edm.Int32",
|
type = "Edm.Int32",
|
||||||
|
@ -226,4 +226,6 @@ public interface AllSpatialCollectionTypes_Simple
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,6 @@ import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -34,7 +34,6 @@ import org.apache.olingo.client.api.edm.ConcurrencyMode;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
@ -61,6 +60,7 @@ public interface AllSpatialTypes
|
||||||
extends Serializable {
|
extends Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Key
|
@Key
|
||||||
@Property(name = "Id",
|
@Property(name = "Id",
|
||||||
type = "Edm.Int32",
|
type = "Edm.Int32",
|
||||||
|
@ -455,4 +455,6 @@ public interface AllSpatialTypes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,6 @@ import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -25,7 +25,6 @@ import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
@ -48,6 +47,7 @@ import javax.xml.datatype.Duration;
|
||||||
public interface AuditInfo extends Serializable {
|
public interface AuditInfo extends Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Property(name = "ModifiedDate", type = "Edm.DateTime", nullable = false)
|
@Property(name = "ModifiedDate", type = "Edm.DateTime", nullable = false)
|
||||||
Calendar getModifiedDate();
|
Calendar getModifiedDate();
|
||||||
|
|
||||||
|
@ -69,4 +69,6 @@ public interface AuditInfo extends Serializable {
|
||||||
|
|
||||||
org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.ConcurrencyInfo newConcurrency();
|
org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.ConcurrencyInfo newConcurrency();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,6 @@ import org.apache.olingo.client.api.edm.ConcurrencyMode;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
@ -63,6 +62,7 @@ public interface BackOrderLine
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Property(name = "OrderLineStream",
|
@Property(name = "OrderLineStream",
|
||||||
type = "Edm.Stream",
|
type = "Edm.Stream",
|
||||||
nullable = false,
|
nullable = false,
|
||||||
|
@ -200,4 +200,6 @@ public interface BackOrderLine
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,6 @@ import org.apache.olingo.client.api.edm.ConcurrencyMode;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
@ -63,6 +62,7 @@ public interface BackOrderLine2
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Property(name = "OrderLineStream",
|
@Property(name = "OrderLineStream",
|
||||||
type = "Edm.Stream",
|
type = "Edm.Stream",
|
||||||
nullable = false,
|
nullable = false,
|
||||||
|
@ -200,4 +200,6 @@ public interface BackOrderLine2
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,6 @@ import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -26,7 +26,6 @@ import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -34,7 +34,6 @@ import org.apache.olingo.client.api.edm.ConcurrencyMode;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
@ -62,6 +61,7 @@ public interface Car
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Property(name = "Photo",
|
@Property(name = "Photo",
|
||||||
type = "Edm.Stream",
|
type = "Edm.Stream",
|
||||||
nullable = false,
|
nullable = false,
|
||||||
|
@ -159,4 +159,6 @@ public interface Car
|
||||||
|
|
||||||
java.io.InputStream getStream();
|
java.io.InputStream getStream();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,6 @@ import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -25,7 +25,6 @@ import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
@ -48,6 +47,7 @@ import javax.xml.datatype.Duration;
|
||||||
public interface ComplexToCategory extends Serializable {
|
public interface ComplexToCategory extends Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Property(name = "Term", type = "Edm.String", nullable = true)
|
@Property(name = "Term", type = "Edm.String", nullable = true)
|
||||||
String getTerm();
|
String getTerm();
|
||||||
|
|
||||||
|
@ -68,4 +68,5 @@ public interface ComplexToCategory extends Serializable {
|
||||||
void setLabel(final String _label);
|
void setLabel(final String _label);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,6 @@ import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
@ -48,6 +47,7 @@ import javax.xml.datatype.Duration;
|
||||||
public interface ComplexWithAllPrimitiveTypes extends Serializable {
|
public interface ComplexWithAllPrimitiveTypes extends Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Property(name = "Binary", type = "Edm.Binary", nullable = true)
|
@Property(name = "Binary", type = "Edm.Binary", nullable = true)
|
||||||
byte[] getBinary();
|
byte[] getBinary();
|
||||||
|
|
||||||
|
@ -145,4 +145,5 @@ public interface ComplexWithAllPrimitiveTypes extends Serializable {
|
||||||
void setGeometryPoint(final Point _geometryPoint);
|
void setGeometryPoint(final Point _geometryPoint);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,6 @@ import org.apache.olingo.client.api.edm.ConcurrencyMode;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
@ -61,6 +60,7 @@ public interface Computer
|
||||||
extends Serializable {
|
extends Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Key
|
@Key
|
||||||
@Property(name = "ComputerId",
|
@Property(name = "ComputerId",
|
||||||
type = "Edm.Int32",
|
type = "Edm.Int32",
|
||||||
|
@ -123,13 +123,14 @@ public interface Computer
|
||||||
Operations operations();
|
Operations operations();
|
||||||
|
|
||||||
public interface Operations {
|
public interface Operations {
|
||||||
|
|
||||||
@Operation(name = "GetComputer",
|
@Operation(name = "GetComputer",
|
||||||
type = OperationType.FUNCTION,
|
type = OperationType.ACTION,
|
||||||
isComposable = false,
|
|
||||||
returnType = "Microsoft.Test.OData.Services.AstoriaDefaultService.Computer")
|
returnType = "Microsoft.Test.OData.Services.AstoriaDefaultService.Computer")
|
||||||
org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Computer getComputer(
|
org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Computer getComputer(
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,6 @@ import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
@ -44,17 +43,4 @@ import java.util.Calendar;
|
||||||
import javax.xml.datatype.Duration;
|
import javax.xml.datatype.Duration;
|
||||||
|
|
||||||
public interface ComputerCollection extends AbstractEntityCollection<Computer> {
|
public interface ComputerCollection extends AbstractEntityCollection<Computer> {
|
||||||
Operations operations();
|
|
||||||
|
|
||||||
public interface Operations {
|
|
||||||
|
|
||||||
@Operation(name = "GetComputer",
|
|
||||||
type = OperationType.FUNCTION,
|
|
||||||
isComposable = false,
|
|
||||||
returnType = "Microsoft.Test.OData.Services.AstoriaDefaultService.Computer")
|
|
||||||
org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Computer getComputer(
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,6 @@ import org.apache.olingo.client.api.edm.ConcurrencyMode;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
@ -61,6 +60,7 @@ public interface ComputerDetail
|
||||||
extends Serializable {
|
extends Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Key
|
@Key
|
||||||
@Property(name = "ComputerDetailId",
|
@Property(name = "ComputerDetailId",
|
||||||
type = "Edm.Int32",
|
type = "Edm.Int32",
|
||||||
|
@ -225,6 +225,7 @@ public interface ComputerDetail
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@NavigationProperty(name = "Computer",
|
@NavigationProperty(name = "Computer",
|
||||||
type = "Microsoft.Test.OData.Services.AstoriaDefaultService.Computer",
|
type = "Microsoft.Test.OData.Services.AstoriaDefaultService.Computer",
|
||||||
targetSchema = "Microsoft.Test.OData.Services.AstoriaDefaultService",
|
targetSchema = "Microsoft.Test.OData.Services.AstoriaDefaultService",
|
||||||
|
@ -239,14 +240,15 @@ public interface ComputerDetail
|
||||||
Operations operations();
|
Operations operations();
|
||||||
|
|
||||||
public interface Operations {
|
public interface Operations {
|
||||||
|
|
||||||
@Operation(name = "ResetComputerDetailsSpecifications",
|
@Operation(name = "ResetComputerDetailsSpecifications",
|
||||||
type = OperationType.FUNCTION,
|
type = OperationType.ACTION)
|
||||||
isComposable = false)
|
|
||||||
void resetComputerDetailsSpecifications(
|
void resetComputerDetailsSpecifications(
|
||||||
@Parameter(name = "specifications", type = "Collection(Edm.String)", nullable = false) Collection<String> specifications,
|
@Parameter(name = "specifications", type = "Collection(Edm.String)", nullable = false) Collection<String> specifications,
|
||||||
@Parameter(name = "purchaseTime", type = "Edm.DateTime", nullable = false) Calendar purchaseTime
|
@Parameter(name = "purchaseTime", type = "Edm.DateTime", nullable = false) Calendar purchaseTime
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,6 @@ import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
@ -44,18 +43,4 @@ import java.util.Calendar;
|
||||||
import javax.xml.datatype.Duration;
|
import javax.xml.datatype.Duration;
|
||||||
|
|
||||||
public interface ComputerDetailCollection extends AbstractEntityCollection<ComputerDetail> {
|
public interface ComputerDetailCollection extends AbstractEntityCollection<ComputerDetail> {
|
||||||
Operations operations();
|
|
||||||
|
|
||||||
public interface Operations {
|
|
||||||
|
|
||||||
@Operation(name = "ResetComputerDetailsSpecifications",
|
|
||||||
type = OperationType.FUNCTION,
|
|
||||||
isComposable = false)
|
|
||||||
void resetComputerDetailsSpecifications(
|
|
||||||
@Parameter(name = "specifications", type = "Collection(Edm.String)", nullable = false) Collection<String> specifications,
|
|
||||||
@Parameter(name = "purchaseTime", type = "Edm.DateTime", nullable = false) Calendar purchaseTime
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,6 @@ import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
@ -48,6 +47,7 @@ import javax.xml.datatype.Duration;
|
||||||
public interface ConcurrencyInfo extends Serializable {
|
public interface ConcurrencyInfo extends Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Property(name = "Token", type = "Edm.String", nullable = true)
|
@Property(name = "Token", type = "Edm.String", nullable = true)
|
||||||
String getToken();
|
String getToken();
|
||||||
|
|
||||||
|
@ -61,4 +61,5 @@ public interface ConcurrencyInfo extends Serializable {
|
||||||
void setQueriedDateTime(final Calendar _queriedDateTime);
|
void setQueriedDateTime(final Calendar _queriedDateTime);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,6 @@ import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
@ -48,6 +47,7 @@ import javax.xml.datatype.Duration;
|
||||||
public interface ContactDetails extends Serializable {
|
public interface ContactDetails extends Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Property(name = "EmailBag", type = "Edm.String", nullable = false)
|
@Property(name = "EmailBag", type = "Edm.String", nullable = false)
|
||||||
Collection<String> getEmailBag();
|
Collection<String> getEmailBag();
|
||||||
|
|
||||||
|
@ -70,6 +70,7 @@ public interface ContactDetails extends Serializable {
|
||||||
org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Aliases newContactAlias();
|
org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Aliases newContactAlias();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Property(name = "HomePhone", type = "Microsoft.Test.OData.Services.AstoriaDefaultService.Phone", nullable = true)
|
@Property(name = "HomePhone", type = "Microsoft.Test.OData.Services.AstoriaDefaultService.Phone", nullable = true)
|
||||||
org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Phone getHomePhone();
|
org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Phone getHomePhone();
|
||||||
|
|
||||||
|
@ -78,6 +79,7 @@ public interface ContactDetails extends Serializable {
|
||||||
org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Phone newHomePhone();
|
org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Phone newHomePhone();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Property(name = "WorkPhone", type = "Microsoft.Test.OData.Services.AstoriaDefaultService.Phone", nullable = true)
|
@Property(name = "WorkPhone", type = "Microsoft.Test.OData.Services.AstoriaDefaultService.Phone", nullable = true)
|
||||||
org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Phone getWorkPhone();
|
org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Phone getWorkPhone();
|
||||||
|
|
||||||
|
@ -86,6 +88,7 @@ public interface ContactDetails extends Serializable {
|
||||||
org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Phone newWorkPhone();
|
org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Phone newWorkPhone();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Property(name = "MobilePhoneBag", type = "Microsoft.Test.OData.Services.AstoriaDefaultService.Phone", nullable = false)
|
@Property(name = "MobilePhoneBag", type = "Microsoft.Test.OData.Services.AstoriaDefaultService.Phone", nullable = false)
|
||||||
Collection<org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Phone> getMobilePhoneBag();
|
Collection<org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Phone> getMobilePhoneBag();
|
||||||
|
|
||||||
|
@ -93,4 +96,6 @@ public interface ContactDetails extends Serializable {
|
||||||
|
|
||||||
org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Phone newMobilePhoneBag();
|
org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Phone newMobilePhoneBag();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,6 @@ import org.apache.olingo.client.api.edm.ConcurrencyMode;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
@ -62,6 +61,7 @@ public interface Contractor
|
||||||
extends org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Person {
|
extends org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Person {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Key
|
@Key
|
||||||
@Property(name = "PersonId",
|
@Property(name = "PersonId",
|
||||||
type = "Edm.Int32",
|
type = "Edm.Int32",
|
||||||
|
@ -213,4 +213,6 @@ public interface Contractor
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,6 @@ import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -34,7 +34,6 @@ import org.apache.olingo.client.api.edm.ConcurrencyMode;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
@ -62,6 +61,7 @@ public interface Customer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Property(name = "Thumbnail",
|
@Property(name = "Thumbnail",
|
||||||
type = "Edm.Stream",
|
type = "Edm.Stream",
|
||||||
nullable = false,
|
nullable = false,
|
||||||
|
@ -178,6 +178,7 @@ public interface Customer
|
||||||
org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.ContactDetails newPrimaryContactInfo();
|
org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.ContactDetails newPrimaryContactInfo();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Property(name = "BackupContactInfo",
|
@Property(name = "BackupContactInfo",
|
||||||
type = "Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails",
|
type = "Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails",
|
||||||
nullable = false,
|
nullable = false,
|
||||||
|
@ -202,6 +203,7 @@ public interface Customer
|
||||||
org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.ContactDetails newBackupContactInfo();
|
org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.ContactDetails newBackupContactInfo();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Property(name = "Auditing",
|
@Property(name = "Auditing",
|
||||||
type = "Microsoft.Test.OData.Services.AstoriaDefaultService.AuditInfo",
|
type = "Microsoft.Test.OData.Services.AstoriaDefaultService.AuditInfo",
|
||||||
nullable = true,
|
nullable = true,
|
||||||
|
@ -227,6 +229,7 @@ public interface Customer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@NavigationProperty(name = "Orders",
|
@NavigationProperty(name = "Orders",
|
||||||
type = "Microsoft.Test.OData.Services.AstoriaDefaultService.Order",
|
type = "Microsoft.Test.OData.Services.AstoriaDefaultService.Order",
|
||||||
targetSchema = "Microsoft.Test.OData.Services.AstoriaDefaultService",
|
targetSchema = "Microsoft.Test.OData.Services.AstoriaDefaultService",
|
||||||
|
@ -278,4 +281,6 @@ public interface Customer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,6 @@ import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -34,7 +34,6 @@ import org.apache.olingo.client.api.edm.ConcurrencyMode;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
@ -61,6 +60,7 @@ public interface CustomerInfo
|
||||||
extends Serializable {
|
extends Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Key
|
@Key
|
||||||
@Property(name = "CustomerInfoId",
|
@Property(name = "CustomerInfoId",
|
||||||
type = "Edm.Int32",
|
type = "Edm.Int32",
|
||||||
|
@ -113,4 +113,6 @@ public interface CustomerInfo
|
||||||
|
|
||||||
java.io.InputStream getStream();
|
java.io.InputStream getStream();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,6 @@ import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -25,7 +25,6 @@ import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
@ -48,6 +47,7 @@ import javax.xml.datatype.Duration;
|
||||||
public interface Dimensions extends Serializable {
|
public interface Dimensions extends Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Property(name = "Width", type = "Edm.Decimal", nullable = false)
|
@Property(name = "Width", type = "Edm.Decimal", nullable = false)
|
||||||
BigDecimal getWidth();
|
BigDecimal getWidth();
|
||||||
|
|
||||||
|
@ -68,4 +68,5 @@ public interface Dimensions extends Serializable {
|
||||||
void setDepth(final BigDecimal _depth);
|
void setDepth(final BigDecimal _depth);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,6 @@ import org.apache.olingo.client.api.edm.ConcurrencyMode;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
@ -63,6 +62,7 @@ public interface DiscontinuedProduct
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Property(name = "Picture",
|
@Property(name = "Picture",
|
||||||
type = "Edm.Stream",
|
type = "Edm.Stream",
|
||||||
nullable = false,
|
nullable = false,
|
||||||
|
@ -156,6 +156,7 @@ public interface DiscontinuedProduct
|
||||||
org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Dimensions newDimensions();
|
org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Dimensions newDimensions();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Property(name = "BaseConcurrency",
|
@Property(name = "BaseConcurrency",
|
||||||
type = "Edm.String",
|
type = "Edm.String",
|
||||||
nullable = true,
|
nullable = true,
|
||||||
|
@ -203,6 +204,7 @@ public interface DiscontinuedProduct
|
||||||
org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.ConcurrencyInfo newComplexConcurrency();
|
org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.ConcurrencyInfo newComplexConcurrency();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Property(name = "NestedComplexConcurrency",
|
@Property(name = "NestedComplexConcurrency",
|
||||||
type = "Microsoft.Test.OData.Services.AstoriaDefaultService.AuditInfo",
|
type = "Microsoft.Test.OData.Services.AstoriaDefaultService.AuditInfo",
|
||||||
nullable = true,
|
nullable = true,
|
||||||
|
@ -227,6 +229,7 @@ public interface DiscontinuedProduct
|
||||||
org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.AuditInfo newNestedComplexConcurrency();
|
org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.AuditInfo newNestedComplexConcurrency();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Property(name = "Discontinued",
|
@Property(name = "Discontinued",
|
||||||
type = "Edm.DateTime",
|
type = "Edm.DateTime",
|
||||||
nullable = false,
|
nullable = false,
|
||||||
|
@ -297,6 +300,7 @@ public interface DiscontinuedProduct
|
||||||
org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Phone newDiscontinuedPhone();
|
org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Phone newDiscontinuedPhone();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Property(name = "ChildConcurrencyToken",
|
@Property(name = "ChildConcurrencyToken",
|
||||||
type = "Edm.String",
|
type = "Edm.String",
|
||||||
nullable = true,
|
nullable = true,
|
||||||
|
@ -362,4 +366,6 @@ public interface DiscontinuedProduct
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,6 @@ import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -34,7 +34,6 @@ import org.apache.olingo.client.api.edm.ConcurrencyMode;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
@ -61,6 +60,7 @@ public interface Driver
|
||||||
extends Serializable {
|
extends Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Key
|
@Key
|
||||||
@Property(name = "Name",
|
@Property(name = "Name",
|
||||||
type = "Edm.String",
|
type = "Edm.String",
|
||||||
|
@ -120,4 +120,6 @@ public interface Driver
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,6 @@ import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -34,7 +34,6 @@ import org.apache.olingo.client.api.edm.ConcurrencyMode;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
@ -62,6 +61,7 @@ public interface Employee
|
||||||
extends org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Person {
|
extends org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Person {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Key
|
@Key
|
||||||
@Property(name = "PersonId",
|
@Property(name = "PersonId",
|
||||||
type = "Edm.Int32",
|
type = "Edm.Int32",
|
||||||
|
@ -203,12 +203,13 @@ public interface Employee
|
||||||
Operations operations();
|
Operations operations();
|
||||||
|
|
||||||
public interface Operations {
|
public interface Operations {
|
||||||
|
|
||||||
@Operation(name = "Sack",
|
@Operation(name = "Sack",
|
||||||
type = OperationType.FUNCTION,
|
type = OperationType.ACTION)
|
||||||
isComposable = false)
|
|
||||||
void sack(
|
void sack(
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,6 @@ import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
@ -48,12 +47,12 @@ public interface EmployeeCollection extends AbstractEntityCollection<Employee> {
|
||||||
|
|
||||||
public interface Operations {
|
public interface Operations {
|
||||||
|
|
||||||
@Operation(name = "Sack",
|
|
||||||
type = OperationType.FUNCTION,
|
|
||||||
isComposable = false)
|
|
||||||
void sack(
|
|
||||||
);
|
|
||||||
|
|
||||||
|
@Operation(name = "IncreaseSalaries",
|
||||||
|
type = OperationType.ACTION)
|
||||||
|
void increaseSalaries(
|
||||||
|
@Parameter(name = "n", type = "Edm.Int32", nullable = false) Integer n
|
||||||
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,6 @@ import org.apache.olingo.client.api.edm.ConcurrencyMode;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
@ -61,6 +60,7 @@ public interface LastLogin
|
||||||
extends Serializable {
|
extends Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Key
|
@Key
|
||||||
@Property(name = "Username",
|
@Property(name = "Username",
|
||||||
type = "Edm.String",
|
type = "Edm.String",
|
||||||
|
@ -166,4 +166,6 @@ public interface LastLogin
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,6 @@ import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
|
|
@ -34,7 +34,6 @@ import org.apache.olingo.client.api.edm.ConcurrencyMode;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
|
||||||
|
|
||||||
// EdmSimpleType property imports
|
|
||||||
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
import org.apache.olingo.commons.api.edm.geo.LineString;
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
@ -61,6 +60,7 @@ public interface License
|
||||||
extends Serializable {
|
extends Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Key
|
@Key
|
||||||
@Property(name = "Name",
|
@Property(name = "Name",
|
||||||
type = "Edm.String",
|
type = "Edm.String",
|
||||||
|
@ -189,4 +189,6 @@ public interface License
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue