http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriParserException.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriParserException.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriParserException.java deleted file mode 100644 index 31804a4..0000000 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriParserException.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.olingo.server.core.uri.parser; - -import org.apache.olingo.server.api.ODataTranslatedException; - -abstract public class UriParserException extends ODataTranslatedException { - - private static final long serialVersionUID = -6438700016830955949L; - - public UriParserException(String developmentMessage, MessageKey messageKey, String... parameters) { - super(developmentMessage, messageKey, parameters); - } - - public UriParserException(String developmentMessage, Throwable cause, MessageKey messageKey, - String... parameters) { - super(developmentMessage, cause, messageKey, parameters); - } - - @Override - protected String getBundleName() { - return DEFAULT_SERVER_BUNDLE_NAME; - } -}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriParserSemanticException.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriParserSemanticException.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriParserSemanticException.java deleted file mode 100644 index 77f975b..0000000 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriParserSemanticException.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.olingo.server.core.uri.parser; - -/** Exception thrown during URI parsing in cases where an URI part is invalid according to the Entity Data Model. */ -public class UriParserSemanticException extends UriParserException { - - private static final long serialVersionUID = 3850285860949809622L; - - public static enum MessageKeys implements MessageKey { - /** parameters: function-import name, function parameters */ FUNCTION_NOT_FOUND, - /** parameter: resource part */ RESOURCE_PART_ONLY_FOR_TYPED_PARTS, - /** parameter: resource part */ RESOURCE_PART_MUST_BE_PRECEDED_BY_STRUCTURAL_TYPE, - /** parameter: property name */ PROPERTY_AFTER_COLLECTION, - /** parameters: type name, property name */ PROPERTY_NOT_IN_TYPE, - /** parameters: type name, property name */ EXPRESSION_PROPERTY_NOT_IN_TYPE, - /** parameter: property name */ UNKNOWN_PROPERTY_TYPE, - /** parameter: type filter */ INCOMPATIBLE_TYPE_FILTER, - /** parameters: previous type filter, last type filter */ TYPE_FILTER_NOT_CHAINABLE, - /** parameter: type filter */ PREVIOUS_PART_NOT_TYPED, - /** parameter: type */ FUNCTION_PARAMETERS_EXPECTED, - /** parameter: resource part */ UNKNOWN_PART, - /** parameter: expression */ ONLY_FOR_TYPED_PARTS, - /** parameter: entity type name */ UNKNOWN_ENTITY_TYPE, - /** parameter: expression */ ONLY_FOR_COLLECTIONS, - /** parameter: expression */ ONLY_FOR_ENTITY_TYPES, - /** parameter: expression */ ONLY_FOR_STRUCTURAL_TYPES, - /** parameter: expression */ ONLY_FOR_TYPED_PROPERTIES, - /** parameter: value */ INVALID_KEY_VALUE, - PARAMETERS_LIST_ONLY_FOR_TYPED_PARTS, - /** parameters: expected number, actual number */ WRONG_NUMBER_OF_KEY_PROPERTIES, - NOT_ENOUGH_REFERENTIAL_CONSTRAINTS, - KEY_NOT_ALLOWED, - RESOURCE_PATH_NOT_TYPED, - ONLY_SIMPLE_AND_COMPLEX_PROPERTIES_IN_SELECT, - COMPLEX_PROPERTY_OF_ENTITY_TYPE_EXPECTED, - NOT_FOR_ENTITY_TYPE, - PREVIOUS_PART_TYPED, - /** parameter: resource_name */ RESOURCE_NOT_FOUND; - - @Override - public String getKey() { - return name(); - } - } - - public UriParserSemanticException(String developmentMessage, MessageKey messageKey, String... parameters) { - super(developmentMessage, messageKey, parameters); - } - - public UriParserSemanticException(String developmentMessage, Throwable cause, MessageKey messageKey, - String... parameters) { - super(developmentMessage, cause, messageKey, parameters); - } -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriParserSyntaxException.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriParserSyntaxException.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriParserSyntaxException.java deleted file mode 100644 index 1d4ce0a..0000000 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriParserSyntaxException.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.olingo.server.core.uri.parser; - -/** Exception thrown during URI parsing in cases where the URI violates the URI construction rules. */ -public class UriParserSyntaxException extends UriParserException { - - private static final long serialVersionUID = 5887744747812478226L; - - public static enum MessageKeys implements MessageKey { - /** parameter: segment */ MUST_BE_LAST_SEGMENT, - /** parameter: query-option name */ UNKNOWN_SYSTEM_QUERY_OPTION, - /** parameter: query-option name */ DOUBLE_SYSTEM_QUERY_OPTION, - /** parameters: query-option name, query-option value */ WRONG_VALUE_FOR_SYSTEM_QUERY_OPTION, - /** parameter: $format option value */ WRONG_VALUE_FOR_SYSTEM_QUERY_OPTION_FORMAT, - SYSTEM_QUERY_OPTION_LEVELS_NOT_ALLOWED_HERE, - SYNTAX; - - @Override - public String getKey() { - return name(); - } - } - - public UriParserSyntaxException(String developmentMessage, MessageKey messageKey, String... parameters) { - super(developmentMessage, messageKey, parameters); - } - - public UriParserSyntaxException(String developmentMessage, Throwable cause, MessageKey messageKey, - String... parameters) { - super(developmentMessage, cause, messageKey, parameters); - } -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/AliasQueryOptionImpl.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/AliasQueryOptionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/AliasQueryOptionImpl.java deleted file mode 100644 index fd971a2..0000000 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/AliasQueryOptionImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.olingo.server.core.uri.queryoption; - -import org.apache.olingo.server.api.uri.queryoption.AliasQueryOption; -import org.apache.olingo.server.core.uri.queryoption.expression.ExpressionImpl; - -public class AliasQueryOptionImpl extends QueryOptionImpl implements AliasQueryOption { - - private ExpressionImpl aliasValue; - - @Override - public ExpressionImpl getValue() { - return aliasValue; - } - - public AliasQueryOptionImpl setAliasValue(final ExpressionImpl aliasValue) { - this.aliasValue = aliasValue; - return this; - } - -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/CountOptionImpl.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/CountOptionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/CountOptionImpl.java deleted file mode 100644 index fa35d2e..0000000 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/CountOptionImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.olingo.server.core.uri.queryoption; - -import org.apache.olingo.server.api.uri.queryoption.CountOption; -import org.apache.olingo.server.api.uri.queryoption.SystemQueryOptionKind; - -public class CountOptionImpl extends SystemQueryOptionImpl implements CountOption { - - private boolean count; - - public CountOptionImpl() { - setKind(SystemQueryOptionKind.COUNT); - } - - @Override - public boolean getValue() { - return count; - } - - public CountOptionImpl setValue(final boolean count) { - this.count = count; - return this; - } - -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/CustomQueryOptionImpl.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/CustomQueryOptionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/CustomQueryOptionImpl.java deleted file mode 100644 index f5ae251..0000000 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/CustomQueryOptionImpl.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.olingo.server.core.uri.queryoption; - -import org.apache.olingo.server.api.uri.queryoption.CustomQueryOption; - -public class CustomQueryOptionImpl extends QueryOptionImpl implements CustomQueryOption { - -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/ExpandItemImpl.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/ExpandItemImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/ExpandItemImpl.java deleted file mode 100644 index f5b10e3..0000000 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/ExpandItemImpl.java +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.olingo.server.core.uri.queryoption; - -import org.apache.olingo.commons.api.edm.EdmType; -import org.apache.olingo.server.api.uri.UriInfoResource; -import org.apache.olingo.server.api.uri.queryoption.CountOption; -import org.apache.olingo.server.api.uri.queryoption.ExpandItem; -import org.apache.olingo.server.api.uri.queryoption.ExpandOption; -import org.apache.olingo.server.api.uri.queryoption.FilterOption; -import org.apache.olingo.server.api.uri.queryoption.LevelsExpandOption; -import org.apache.olingo.server.api.uri.queryoption.OrderByOption; -import org.apache.olingo.server.api.uri.queryoption.SearchOption; -import org.apache.olingo.server.api.uri.queryoption.SelectOption; -import org.apache.olingo.server.api.uri.queryoption.SkipOption; -import org.apache.olingo.server.api.uri.queryoption.SystemQueryOptionKind; -import org.apache.olingo.server.api.uri.queryoption.TopOption; - -import java.util.List; - -public class ExpandItemImpl implements ExpandItem { - private LevelsExpandOption levelsExpandOption; - private FilterOption filterOption; - private SearchOption searchOption; - private OrderByOption orderByOption; - private SkipOption skipOption; - private TopOption topOption; - private CountOption inlineCountOption; - private SelectOption selectOption; - private ExpandOption expandOption; - - private UriInfoResource resourceInfo; - - private boolean isStar; - - private boolean isRef; - private EdmType startTypeFilter; - - public ExpandItemImpl setSystemQueryOption(final SystemQueryOptionImpl sysItem) { - - if (sysItem.getKind() == SystemQueryOptionKind.EXPAND) { - expandOption = (ExpandOptionImpl) sysItem; - } else if (sysItem.getKind() == SystemQueryOptionKind.FILTER) { - filterOption = (FilterOptionImpl) sysItem; - } else if (sysItem.getKind() == SystemQueryOptionKind.COUNT) { - inlineCountOption = (CountOptionImpl) sysItem; - } else if (sysItem.getKind() == SystemQueryOptionKind.ORDERBY) { - orderByOption = (OrderByOptionImpl) sysItem; - } else if (sysItem.getKind() == SystemQueryOptionKind.SEARCH) { - searchOption = (SearchOptionImpl) sysItem; - } else if (sysItem.getKind() == SystemQueryOptionKind.SELECT) { - selectOption = (SelectOptionImpl) sysItem; - } else if (sysItem.getKind() == SystemQueryOptionKind.SKIP) { - skipOption = (SkipOptionImpl) sysItem; - } else if (sysItem.getKind() == SystemQueryOptionKind.TOP) { - topOption = (TopOptionImpl) sysItem; - } else if (sysItem.getKind() == SystemQueryOptionKind.LEVELS) { - levelsExpandOption = (LevelsExpandOption) sysItem; - } - return this; - } - - public ExpandItemImpl setSystemQueryOptions(final List<SystemQueryOptionImpl> list) { - - for (SystemQueryOptionImpl item : list) { - setSystemQueryOption(item); - } - return this; - } - - @Override - public LevelsExpandOption getLevelsOption() { - return levelsExpandOption; - } - - @Override - public FilterOption getFilterOption() { - return filterOption; - } - - @Override - public SearchOption getSearchOption() { - return searchOption; - } - - @Override - public OrderByOption getOrderByOption() { - return orderByOption; - } - - @Override - public SkipOption getSkipOption() { - return skipOption; - } - - @Override - public TopOption getTopOption() { - return topOption; - } - - @Override - public CountOption getCountOption() { - return inlineCountOption; - } - - @Override - public SelectOption getSelectOption() { - - return selectOption; - } - - @Override - public ExpandOption getExpandOption() { - return expandOption; - } - - public ExpandItemImpl setResourcePath(final UriInfoResource resourceInfo) { - this.resourceInfo = resourceInfo; - return this; - } - - @Override - public UriInfoResource getResourcePath() { - - return resourceInfo; - } - - @Override - public boolean isStar() { - return isStar; - } - - public ExpandItemImpl setIsStar(final boolean isStar) { - this.isStar = isStar; - return this; - } - - @Override - public boolean isRef() { - return isRef; - } - - public ExpandItemImpl setIsRef(final boolean isRef) { - this.isRef = isRef; - return this; - } - - @Override - public EdmType getStartTypeFilter() { - return startTypeFilter; - } - - public ExpandItemImpl setTypeFilter(final EdmType startTypeFilter) { - this.startTypeFilter = startTypeFilter; - return this; - } -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/ExpandOptionImpl.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/ExpandOptionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/ExpandOptionImpl.java deleted file mode 100644 index 33dbef5..0000000 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/ExpandOptionImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.olingo.server.core.uri.queryoption; - -import org.apache.olingo.server.api.uri.queryoption.ExpandItem; -import org.apache.olingo.server.api.uri.queryoption.ExpandOption; -import org.apache.olingo.server.api.uri.queryoption.SystemQueryOptionKind; - -import java.util.ArrayList; -import java.util.List; - -public class ExpandOptionImpl extends SystemQueryOptionImpl implements ExpandOption { - - List<ExpandItemImpl> expandItems = new ArrayList<ExpandItemImpl>(); - - public ExpandOptionImpl() { - setKind(SystemQueryOptionKind.EXPAND); - } - - public void addExpandItem(final ExpandItemImpl expandItem) { - expandItems.add(expandItem); - } - - @Override - public List<ExpandItem> getExpandItems() { - List<ExpandItem> retList = new ArrayList<ExpandItem>(); - for (ExpandItemImpl item : expandItems) { - retList.add(item); - } - return retList; - } - -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/FilterOptionImpl.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/FilterOptionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/FilterOptionImpl.java deleted file mode 100644 index 8f0b0be..0000000 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/FilterOptionImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.olingo.server.core.uri.queryoption; - -import org.apache.olingo.server.api.uri.queryoption.FilterOption; -import org.apache.olingo.server.api.uri.queryoption.SystemQueryOptionKind; -import org.apache.olingo.server.core.uri.queryoption.expression.ExpressionImpl; - -public class FilterOptionImpl extends SystemQueryOptionImpl implements FilterOption { - - private ExpressionImpl expression; - - public FilterOptionImpl() { - setKind(SystemQueryOptionKind.FILTER); - } - - public FilterOptionImpl setExpression(final ExpressionImpl expression) { - this.expression = expression; - return this; - } - - @Override - public ExpressionImpl getExpression() { - return expression; - } - -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/FormatOptionImpl.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/FormatOptionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/FormatOptionImpl.java deleted file mode 100644 index a0baad7..0000000 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/FormatOptionImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.olingo.server.core.uri.queryoption; - -import org.apache.olingo.server.api.uri.queryoption.FormatOption; -import org.apache.olingo.server.api.uri.queryoption.SystemQueryOptionKind; - -public class FormatOptionImpl extends SystemQueryOptionImpl implements FormatOption { - private String value; - - public FormatOptionImpl() { - setKind(SystemQueryOptionKind.FORMAT); - } - - public FormatOptionImpl setFormat(final String value) { - this.value = value; - return this; - } - - @Override - public String getFormat() { - return value; - } - -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/IdOptionImpl.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/IdOptionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/IdOptionImpl.java deleted file mode 100644 index f7df825..0000000 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/IdOptionImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.olingo.server.core.uri.queryoption; - -import org.apache.olingo.server.api.uri.queryoption.IdOption; -import org.apache.olingo.server.api.uri.queryoption.SystemQueryOptionKind; - -public class IdOptionImpl extends SystemQueryOptionImpl implements IdOption { - private String value; - - public IdOptionImpl() { - setKind(SystemQueryOptionKind.ID); - } - - public IdOptionImpl setValue(final String value) { - this.value = value; - return this; - } - - @Override - public String getValue() { - return value; - } -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/LevelsOptionImpl.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/LevelsOptionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/LevelsOptionImpl.java deleted file mode 100644 index dc17fdc..0000000 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/LevelsOptionImpl.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.olingo.server.core.uri.queryoption; - -import org.apache.olingo.server.api.uri.queryoption.LevelsExpandOption; -import org.apache.olingo.server.api.uri.queryoption.SystemQueryOptionKind; - -public class LevelsOptionImpl extends SystemQueryOptionImpl implements LevelsExpandOption { - private boolean isMax; - private int value; - - public LevelsOptionImpl() { - setKind(SystemQueryOptionKind.LEVELS); - } - - public LevelsOptionImpl setValue(final int value) { - this.value = value; - return this; - } - - @Override - public boolean isMax() { - return isMax; - } - - public LevelsOptionImpl setMax() { - isMax = true; - return this; - - } - - @Override - public int getValue() { - return value; - } - -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/OrderByItemImpl.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/OrderByItemImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/OrderByItemImpl.java deleted file mode 100644 index aac33f0..0000000 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/OrderByItemImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.olingo.server.core.uri.queryoption; - -import org.apache.olingo.server.api.uri.queryoption.OrderByItem; -import org.apache.olingo.server.core.uri.queryoption.expression.ExpressionImpl; - -public class OrderByItemImpl implements OrderByItem { - - private ExpressionImpl expression; - private boolean descending = false; // default sort order is ascending - - @Override - public boolean isDescending() { - return descending; - } - - public OrderByItem setDescending(final boolean descending) { - this.descending = descending; - return this; - } - - @Override - public ExpressionImpl getExpression() { - return expression; - } - - public OrderByItem setExpression(final ExpressionImpl expression) { - this.expression = expression; - return this; - } - -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/OrderByOptionImpl.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/OrderByOptionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/OrderByOptionImpl.java deleted file mode 100644 index c7f5c9f..0000000 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/OrderByOptionImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.olingo.server.core.uri.queryoption; - -import org.apache.olingo.server.api.uri.queryoption.OrderByItem; -import org.apache.olingo.server.api.uri.queryoption.OrderByOption; -import org.apache.olingo.server.api.uri.queryoption.SystemQueryOptionKind; - -import java.util.ArrayList; -import java.util.List; - -public class OrderByOptionImpl extends SystemQueryOptionImpl implements OrderByOption { - - private List<OrderByItemImpl> orders = new ArrayList<OrderByItemImpl>(); - - public OrderByOptionImpl() { - setKind(SystemQueryOptionKind.ORDERBY); - } - - @Override - public List<OrderByItem> getOrders() { - List<OrderByItem> retList = new ArrayList<OrderByItem>(); - for (OrderByItemImpl item : orders) { - retList.add(item); - } - return retList; - } - - public OrderByOptionImpl addOrder(final OrderByItemImpl order) { - orders.add(order); - return this; - } - -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/QueryOptionImpl.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/QueryOptionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/QueryOptionImpl.java deleted file mode 100644 index 1239cc6..0000000 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/QueryOptionImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.olingo.server.core.uri.queryoption; - -import org.apache.olingo.server.api.uri.queryoption.QueryOption; - -public class QueryOptionImpl implements QueryOption { - private String name; - private String text; - - @Override - public String getName() { - return name; - } - - public QueryOptionImpl setName(final String name) { - this.name = name; - return this; - } - - @Override - public String getText() { - return text; - } - - public QueryOptionImpl setText(final String value) { - text = value; - return this; - } - -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SearchOptionImpl.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SearchOptionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SearchOptionImpl.java deleted file mode 100644 index 130ef27..0000000 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SearchOptionImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.olingo.server.core.uri.queryoption; - -import org.apache.olingo.server.api.uri.queryoption.SearchOption; -import org.apache.olingo.server.api.uri.queryoption.SystemQueryOptionKind; -import org.apache.olingo.server.api.uri.queryoption.search.SearchExpression; - -// TODO planned: support $search -public class SearchOptionImpl extends SystemQueryOptionImpl implements SearchOption { - - public SearchOptionImpl() { - setKind(SystemQueryOptionKind.SEARCH); - } - - @Override - public SearchExpression getSearchExpression() { - return null; - } - -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SelectItemImpl.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SelectItemImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SelectItemImpl.java deleted file mode 100644 index 13d6436..0000000 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SelectItemImpl.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.olingo.server.core.uri.queryoption; - -import org.apache.olingo.commons.api.edm.EdmType; -import org.apache.olingo.commons.api.edm.FullQualifiedName; -import org.apache.olingo.server.api.uri.UriInfoResource; -import org.apache.olingo.server.api.uri.queryoption.SelectItem; - -public class SelectItemImpl implements SelectItem { - - private UriInfoResource path; - - private boolean isStar; - private FullQualifiedName addOperationsInSchemaNameSpace; - - private EdmType startTypeFilter; - - @Override - public UriInfoResource getResourcePath() { - - return path; - } - - public SelectItemImpl setResourcePath(final UriInfoResource path) { - this.path = path; - return this; - } - - @Override - public boolean isStar() { - return isStar; - } - - public SelectItemImpl setStar(final boolean isStar) { - this.isStar = isStar; - return this; - } - - @Override - public boolean isAllOperationsInSchema() { - if (addOperationsInSchemaNameSpace == null) { - return false; - } else { - return true; - } - } - - @Override - public FullQualifiedName getAllOperationsInSchemaNameSpace() { - return addOperationsInSchemaNameSpace; - } - - public void addAllOperationsInSchema(final FullQualifiedName addOperationsInSchemaNameSpace) { - this.addOperationsInSchemaNameSpace = addOperationsInSchemaNameSpace; - } - - @Override - public EdmType getStartTypeFilter() { - return startTypeFilter; - } - - public SelectItemImpl setTypeFilter(final EdmType startTypeFilter) { - this.startTypeFilter = startTypeFilter; - return this; - } - -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SelectOptionImpl.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SelectOptionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SelectOptionImpl.java deleted file mode 100644 index 393322f..0000000 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SelectOptionImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.olingo.server.core.uri.queryoption; - -import org.apache.olingo.server.api.uri.queryoption.SelectItem; -import org.apache.olingo.server.api.uri.queryoption.SelectOption; -import org.apache.olingo.server.api.uri.queryoption.SystemQueryOptionKind; - -import java.util.ArrayList; -import java.util.List; - -public class SelectOptionImpl extends SystemQueryOptionImpl implements SelectOption { - - private List<SelectItemImpl> selectItems; - - public SelectOptionImpl() { - setKind(SystemQueryOptionKind.SELECT); - } - - public SelectOptionImpl setSelectItems(final List<SelectItemImpl> selectItems) { - this.selectItems = selectItems; - return this; - } - - @Override - public List<SelectItem> getSelectItems() { - List<SelectItem> retList = new ArrayList<SelectItem>(); - for (SelectItemImpl item : selectItems) { - retList.add(item); - } - return retList; - } - -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SkipOptionImpl.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SkipOptionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SkipOptionImpl.java deleted file mode 100644 index 84549e4..0000000 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SkipOptionImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.olingo.server.core.uri.queryoption; - -import org.apache.olingo.server.api.uri.queryoption.SkipOption; -import org.apache.olingo.server.api.uri.queryoption.SystemQueryOptionKind; - -public class SkipOptionImpl extends SystemQueryOptionImpl implements SkipOption { - private int value; - - public SkipOptionImpl() { - setKind(SystemQueryOptionKind.SKIP); - } - - @Override - public int getValue() { - return value; - } - - public SkipOptionImpl setValue(final int value) { - this.value = value; - return this; - } - -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SkipTokenOptionImpl.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SkipTokenOptionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SkipTokenOptionImpl.java deleted file mode 100644 index f65115c..0000000 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SkipTokenOptionImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.olingo.server.core.uri.queryoption; - -import org.apache.olingo.server.api.uri.queryoption.SkipTokenOption; -import org.apache.olingo.server.api.uri.queryoption.SystemQueryOptionKind; - -public class SkipTokenOptionImpl extends SystemQueryOptionImpl implements SkipTokenOption { - private String skipTokenValue; - - public SkipTokenOptionImpl() { - setKind(SystemQueryOptionKind.SKIPTOKEN); - } - - @Override - public String getValue() { - return skipTokenValue; - } - - public SkipTokenOptionImpl setValue(final String skipTokenValue) { - this.skipTokenValue = skipTokenValue; - return this; - } - -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SystemQueryOptionImpl.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SystemQueryOptionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SystemQueryOptionImpl.java deleted file mode 100644 index 99d94fd..0000000 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SystemQueryOptionImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.olingo.server.core.uri.queryoption; - -import org.apache.olingo.server.api.uri.queryoption.SystemQueryOption; -import org.apache.olingo.server.api.uri.queryoption.SystemQueryOptionKind; - -public class SystemQueryOptionImpl extends QueryOptionImpl implements SystemQueryOption { - - private SystemQueryOptionKind kind; - - @Override - public SystemQueryOptionKind getKind() { - return kind; - } - - void setKind(final SystemQueryOptionKind kind) { - this.kind = kind; - } - - @Override - public String getName() { - return kind.toString(); - } - -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/TopOptionImpl.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/TopOptionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/TopOptionImpl.java deleted file mode 100644 index aa33120..0000000 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/TopOptionImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.olingo.server.core.uri.queryoption; - -import org.apache.olingo.server.api.uri.queryoption.SystemQueryOptionKind; -import org.apache.olingo.server.api.uri.queryoption.TopOption; - -public class TopOptionImpl extends SystemQueryOptionImpl implements TopOption { - private int value; - - public TopOptionImpl() { - setKind(SystemQueryOptionKind.TOP); - } - - @Override - public int getValue() { - return value; - } - - public TopOptionImpl setValue(final int value) { - this.value = value; - return this; - } - -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/AliasImpl.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/AliasImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/AliasImpl.java deleted file mode 100644 index 09af93f..0000000 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/AliasImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.olingo.server.core.uri.queryoption.expression; - -import org.apache.olingo.server.api.ODataApplicationException; -import org.apache.olingo.server.api.uri.queryoption.expression.Alias; -import org.apache.olingo.server.api.uri.queryoption.expression.ExpressionVisitException; -import org.apache.olingo.server.api.uri.queryoption.expression.ExpressionVisitor; - -public class AliasImpl extends ExpressionImpl implements Alias { - - private String parameterName; - - @Override - public String getParameterName() { - return parameterName; - } - - public void setParameter(final String ParameterName) { - parameterName = ParameterName; - } - - @Override - public <T> T accept(final ExpressionVisitor<T> visitor) throws ExpressionVisitException, ODataApplicationException { - return visitor.visitAlias(parameterName); - } - -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/BinaryImpl.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/BinaryImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/BinaryImpl.java deleted file mode 100644 index a28f92c..0000000 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/BinaryImpl.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.olingo.server.core.uri.queryoption.expression; - -import org.apache.olingo.server.api.ODataApplicationException; -import org.apache.olingo.server.api.uri.queryoption.expression.Binary; -import org.apache.olingo.server.api.uri.queryoption.expression.BinaryOperatorKind; -import org.apache.olingo.server.api.uri.queryoption.expression.Expression; -import org.apache.olingo.server.api.uri.queryoption.expression.ExpressionVisitException; -import org.apache.olingo.server.api.uri.queryoption.expression.ExpressionVisitor; - -public class BinaryImpl extends ExpressionImpl implements Binary { - - private BinaryOperatorKind operator; - private ExpressionImpl left; - private ExpressionImpl right; - - @Override - public BinaryOperatorKind getOperator() { - return operator; - } - - public Binary setOperator(final BinaryOperatorKind operator) { - this.operator = operator; - return this; - } - - @Override - public Expression getLeftOperand() { - return left; - } - - public void setLeftOperand(final ExpressionImpl operand) { - left = operand; - } - - @Override - public Expression getRightOperand() { - return right; - } - - public void setRightOperand(final ExpressionImpl operand) { - right = operand; - - } - - @Override - public <T> T accept(final ExpressionVisitor<T> visitor) throws ExpressionVisitException, ODataApplicationException { - T left = this.left.accept(visitor); - T right = this.right.accept(visitor); - return visitor.visitBinaryOperator(operator, left, right); - } - -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/EnumerationImpl.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/EnumerationImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/EnumerationImpl.java deleted file mode 100644 index 5c6250a..0000000 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/EnumerationImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.olingo.server.core.uri.queryoption.expression; - -import org.apache.olingo.commons.api.edm.EdmEnumType; -import org.apache.olingo.server.api.ODataApplicationException; -import org.apache.olingo.server.api.uri.queryoption.expression.Enumeration; -import org.apache.olingo.server.api.uri.queryoption.expression.ExpressionVisitException; -import org.apache.olingo.server.api.uri.queryoption.expression.ExpressionVisitor; - -import java.util.ArrayList; -import java.util.List; - -public class EnumerationImpl extends ExpressionImpl implements Enumeration { - - private EdmEnumType type; - private List<String> values = new ArrayList<String>(); - - @Override - public List<String> getValues() { - return values; - } - - public EnumerationImpl addValue(final String enumValue) { - values.add(enumValue); - return this; - } - - @Override - public EdmEnumType getType() { - return type; - } - - public EnumerationImpl setType(final EdmEnumType type) { - this.type = type; - return this; - } - - @Override - public <T> T accept(final ExpressionVisitor<T> visitor) throws ExpressionVisitException, ODataApplicationException { - return visitor.visitEnum(type, values); - } - -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/ExpressionImpl.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/ExpressionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/ExpressionImpl.java deleted file mode 100644 index f1d3e9e..0000000 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/ExpressionImpl.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.olingo.server.core.uri.queryoption.expression; - -import org.apache.olingo.server.api.uri.queryoption.expression.Expression; - -public abstract class ExpressionImpl implements Expression { - -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/LambdaRefImpl.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/LambdaRefImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/LambdaRefImpl.java deleted file mode 100644 index 8198204..0000000 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/LambdaRefImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.olingo.server.core.uri.queryoption.expression; - -import org.apache.olingo.server.api.ODataApplicationException; -import org.apache.olingo.server.api.uri.queryoption.expression.ExpressionVisitException; -import org.apache.olingo.server.api.uri.queryoption.expression.ExpressionVisitor; -import org.apache.olingo.server.api.uri.queryoption.expression.LambdaRef; - -public class LambdaRefImpl extends ExpressionImpl implements LambdaRef { - - private String variableText; - - @Override - public String getVariableName() { - return variableText; - } - - public LambdaRefImpl setVariableText(final String text) { - variableText = text; - return this; - } - - @Override - public <T> T accept(final ExpressionVisitor<T> visitor) throws ExpressionVisitException, ODataApplicationException { - return visitor.visitLambdaReference(variableText); - } - -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/LiteralImpl.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/LiteralImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/LiteralImpl.java deleted file mode 100644 index d9db0d4..0000000 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/LiteralImpl.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.olingo.server.core.uri.queryoption.expression; - -import org.apache.olingo.commons.api.edm.EdmType; -import org.apache.olingo.server.api.ODataApplicationException; -import org.apache.olingo.server.api.uri.queryoption.expression.ExpressionVisitException; -import org.apache.olingo.server.api.uri.queryoption.expression.ExpressionVisitor; -import org.apache.olingo.server.api.uri.queryoption.expression.Literal; - -public class LiteralImpl extends ExpressionImpl implements Literal { - - private String text; - private EdmType type; - - @Override - public String getText() { - return text; - } - - public LiteralImpl setText(final String text) { - this.text = text; - return this; - } - - @Override - public EdmType getType() { - return type; - } - - public LiteralImpl setType(final EdmType type) { - this.type = type; - return this; - } - - @Override - public <T> T accept(final ExpressionVisitor<T> visitor) throws ExpressionVisitException, ODataApplicationException { - return visitor.visitLiteral(text); - } - -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/MemberImpl.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/MemberImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/MemberImpl.java deleted file mode 100644 index 8940bcf..0000000 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/MemberImpl.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.olingo.server.core.uri.queryoption.expression; - -import org.apache.olingo.commons.api.edm.EdmType; -import org.apache.olingo.server.api.ODataApplicationException; -import org.apache.olingo.server.api.uri.UriInfoResource; -import org.apache.olingo.server.api.uri.queryoption.expression.ExpressionVisitException; -import org.apache.olingo.server.api.uri.queryoption.expression.ExpressionVisitor; -import org.apache.olingo.server.api.uri.queryoption.expression.Member; -import org.apache.olingo.server.core.uri.UriInfoImpl; -import org.apache.olingo.server.core.uri.UriResourceImpl; -import org.apache.olingo.server.core.uri.UriResourceTypedImpl; -import org.apache.olingo.server.core.uri.UriResourceWithKeysImpl; - -public class MemberImpl extends ExpressionImpl implements Member { - - private UriInfoResource path; - private EdmType startTypeFilter; - - @Override - public UriInfoResource getResourcePath() { - return path; - } - - public Member setResourcePath(final UriInfoResource pathSegments) { - path = pathSegments; - return this; - } - - @Override - public <T> T accept(final ExpressionVisitor<T> visitor) throws ExpressionVisitException, ODataApplicationException { - return visitor.visitMember(path); - } - - @Override - public EdmType getType() { - UriInfoImpl uriInfo = (UriInfoImpl) path; - UriResourceImpl lastResourcePart = (UriResourceImpl) uriInfo.getLastResourcePart(); - - if (lastResourcePart instanceof UriResourceWithKeysImpl) { - UriResourceWithKeysImpl lastKeyPred = (UriResourceWithKeysImpl) lastResourcePart; - if (lastKeyPred.getTypeFilterOnEntry() != null) { - return lastKeyPred.getTypeFilterOnEntry(); - } else if (lastKeyPred.getTypeFilterOnCollection() != null) { - return lastKeyPred.getTypeFilterOnCollection(); - } - return lastKeyPred.getType(); - } else if (lastResourcePart instanceof UriResourceTypedImpl) { - UriResourceTypedImpl lastTyped = (UriResourceTypedImpl) lastResourcePart; - EdmType type = lastTyped.getTypeFilter(); - if (type != null) { - return type; - } - return lastTyped.getType(); - } else { - return null; - } - } - - @Override - public boolean isCollection() { - UriInfoImpl uriInfo = (UriInfoImpl) path; - UriResourceImpl lastResourcePart = (UriResourceImpl) uriInfo.getLastResourcePart(); - if (lastResourcePart instanceof UriResourceTypedImpl) { - UriResourceTypedImpl lastTyped = (UriResourceTypedImpl) lastResourcePart; - return lastTyped.isCollection(); - } - return false; - } - - @Override - public EdmType getStartTypeFilter() { - return startTypeFilter; - } - - public MemberImpl setTypeFilter(final EdmType startTypeFilter) { - this.startTypeFilter = startTypeFilter; - return this; - } - -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/MethodImpl.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/MethodImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/MethodImpl.java deleted file mode 100644 index cd00904..0000000 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/MethodImpl.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.olingo.server.core.uri.queryoption.expression; - -import org.apache.olingo.server.api.ODataApplicationException; -import org.apache.olingo.server.api.uri.queryoption.expression.Expression; -import org.apache.olingo.server.api.uri.queryoption.expression.ExpressionVisitException; -import org.apache.olingo.server.api.uri.queryoption.expression.ExpressionVisitor; -import org.apache.olingo.server.api.uri.queryoption.expression.Method; -import org.apache.olingo.server.api.uri.queryoption.expression.MethodKind; - -import java.util.ArrayList; -import java.util.List; - -public class MethodImpl extends ExpressionImpl implements Method { - - private MethodKind method; - private List<ExpressionImpl> parameters = new ArrayList<ExpressionImpl>(); - - @Override - public MethodKind getMethod() { - return method; - } - - public MethodImpl setMethod(final MethodKind methodCalls) { - method = methodCalls; - return this; - } - - @Override - public List<Expression> getParameters() { - List<Expression> list = new ArrayList<Expression>(); - for (ExpressionImpl item : parameters) { - list.add(item); - } - return list; - } - - public MethodImpl addParameter(final ExpressionImpl readCommonExpression) { - parameters.add(readCommonExpression); - return this; - } - - @Override - public <T> T accept(final ExpressionVisitor<T> visitor) throws ExpressionVisitException, ODataApplicationException { - List<T> userParameters = new ArrayList<T>(); - for (ExpressionImpl parameter : parameters) { - userParameters.add(parameter.accept(visitor)); - } - return visitor.visitMethodCall(method, userParameters); - } - -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/TypeLiteralImpl.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/TypeLiteralImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/TypeLiteralImpl.java deleted file mode 100644 index f5f6f06..0000000 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/TypeLiteralImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.olingo.server.core.uri.queryoption.expression; - -import org.apache.olingo.commons.api.edm.EdmType; -import org.apache.olingo.server.api.ODataApplicationException; -import org.apache.olingo.server.api.uri.queryoption.expression.ExpressionVisitException; -import org.apache.olingo.server.api.uri.queryoption.expression.ExpressionVisitor; -import org.apache.olingo.server.api.uri.queryoption.expression.TypeLiteral; - -public class TypeLiteralImpl extends ExpressionImpl implements TypeLiteral { - - private EdmType type; - - @Override - public EdmType getType() { - return type; - } - - public TypeLiteralImpl setType(final EdmType type) { - this.type = type; - return this; - } - - @Override - public <T> T accept(final ExpressionVisitor<T> visitor) throws ExpressionVisitException, ODataApplicationException { - return visitor.visitTypeLiteral(type); - } - -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/UnaryImpl.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/UnaryImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/UnaryImpl.java deleted file mode 100644 index 796191f..0000000 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/UnaryImpl.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.olingo.server.core.uri.queryoption.expression; - -import org.apache.olingo.server.api.ODataApplicationException; -import org.apache.olingo.server.api.uri.queryoption.expression.Expression; -import org.apache.olingo.server.api.uri.queryoption.expression.ExpressionVisitException; -import org.apache.olingo.server.api.uri.queryoption.expression.ExpressionVisitor; -import org.apache.olingo.server.api.uri.queryoption.expression.Unary; -import org.apache.olingo.server.api.uri.queryoption.expression.UnaryOperatorKind; - -public class UnaryImpl extends ExpressionImpl implements Unary { - - private UnaryOperatorKind operator; - private ExpressionImpl expression; - - @Override - public UnaryOperatorKind getOperator() { - return operator; - } - - public void setOperator(final UnaryOperatorKind operator) { - this.operator = operator; - } - - @Override - public Expression getOperand() { - return expression; - } - - public void setOperand(final ExpressionImpl expression) { - this.expression = expression; - } - - @Override - public <T> T accept(final ExpressionVisitor<T> visitor) throws ExpressionVisitException, ODataApplicationException { - T operand = expression.accept(visitor); - return visitor.visitUnaryOperator(operator, operand); - } - -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/validator/UriValidationException.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/validator/UriValidationException.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/validator/UriValidationException.java deleted file mode 100644 index 9bba0c5..0000000 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/validator/UriValidationException.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.olingo.server.core.uri.validator; - -import org.apache.olingo.server.api.ODataTranslatedException; - -public class UriValidationException extends ODataTranslatedException { - - private static final long serialVersionUID = -3179078078053564742L; - - public static enum MessageKeys implements MessageKey { - /** parameter: unsupported query option */ - UNSUPPORTED_QUERY_OPTION, - /** parameter: unsupported uri kind */ - UNSUPPORTED_URI_KIND, - /** parameter: unsupported uri resource kind */ - UNSUPPORTED_URI_RESOURCE_KIND, - /** parameter: unsupported function return type */ - UNSUPPORTED_FUNCTION_RETURN_TYPE, - /** parameter: unsupported action return type */ - UNSUPPORTED_ACTION_RETURN_TYPE, - /** parameter: unsupported http method */ - UNSUPPORTED_HTTP_METHOD, - /** parameter: system query option */ - SYSTEM_QUERY_OPTION_NOT_ALLOWED, - /** parameters: system query option, http method */ - SYSTEM_QUERY_OPTION_NOT_ALLOWED_FOR_HTTP_METHOD, - /** parameter: invalid key property */ - INVALID_KEY_PROPERTY, - /** parameter: key property */ - DOUBLE_KEY_PROPERTY, - /** parameter: untyped segment name */ - LAST_SEGMENT_NOT_TYPED, - /** parameter: untyped segment name */ - SECOND_LAST_SEGMENT_NOT_TYPED, - /** parameter: unallowed kind before $value */ - UNALLOWED_KIND_BEFORE_VALUE, - /** parameter: unallowed kind before $count */ - UNALLOWED_KIND_BEFORE_COUNT; - - @Override - public String getKey() { - return name(); - } - } - - public UriValidationException(String developmentMessage, MessageKey messageKey, String... parameters) { - super(developmentMessage, messageKey, parameters); - } - - public UriValidationException(String developmentMessage, Throwable cause, MessageKey messageKey, - String... parameters) { - super(developmentMessage, cause, messageKey, parameters); - } - - @Override - protected String getBundleName() { - return DEFAULT_SERVER_BUNDLE_NAME; - } -}
