[OLINGO-60] Deleted unnecessary EdmLiteral and moved EdmMapping
Moved EdmMapping since it is a helper and not mentioned inside the specification. EdmLiteral was a helper but is propably not needed in V4 anymore so I deleted it.
This commit is contained in:
parent
63b91d225a
commit
c0ec631cda
|
@ -1,63 +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.commons.api.edm;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>Representation of a simple-typed literal.</p>
|
|
||||||
* <p>The literal is in default representation. The URI representation differs
|
|
||||||
* from the default representation mainly in the additional presence of type
|
|
||||||
* indicator prefixes; since the type information is stored here separately,
|
|
||||||
* the default representation is more appropriate.
|
|
||||||
* Should the URI representation be needed, it can be re-created by calling {@link EdmPrimitiveType#toUriLiteral}.</p>
|
|
||||||
*/
|
|
||||||
public final class EdmLiteral {
|
|
||||||
private final EdmPrimitiveType type;
|
|
||||||
private final String literal;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an {@link EdmLiteral} object out of the simple type and the literal string.
|
|
||||||
* @param type {@link EdmPrimitiveType} simple type
|
|
||||||
* @param literal String literal in default (<em>not</em> URI) representation
|
|
||||||
*/
|
|
||||||
public EdmLiteral(final EdmPrimitiveType type, final String literal) {
|
|
||||||
this.type = type;
|
|
||||||
this.literal = literal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the simple type of the literal.
|
|
||||||
* @return {@link EdmPrimitiveType} object
|
|
||||||
*/
|
|
||||||
public EdmPrimitiveType getType() {
|
|
||||||
return type;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the literal String.
|
|
||||||
* @return {@link String} literal in default (<em>not</em> URI) representation
|
|
||||||
*/
|
|
||||||
public String getLiteral() {
|
|
||||||
return literal;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "type=" + type + ", literal=" + literal;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -18,6 +18,8 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package org.apache.olingo.commons.api.edm;
|
package org.apache.olingo.commons.api.edm;
|
||||||
|
|
||||||
|
import org.apache.olingo.commons.api.edm.helper.EdmMappable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A CSDL parameter element
|
* A CSDL parameter element
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package org.apache.olingo.commons.api.edm;
|
package org.apache.olingo.commons.api.edm;
|
||||||
|
|
||||||
|
import org.apache.olingo.commons.api.edm.helper.EdmMappable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A CSDL Property element
|
* A CSDL Property element
|
||||||
* <p>EdmProperty defines a simple type or a complex type.
|
* <p>EdmProperty defines a simple type or a complex type.
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package org.apache.olingo.commons.api.edm;
|
package org.apache.olingo.commons.api.edm.helper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* EdmMappable can be applied to CSDL elements to associate additional information.
|
* EdmMappable can be applied to CSDL elements to associate additional information.
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package org.apache.olingo.commons.api.edm;
|
package org.apache.olingo.commons.api.edm.helper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* EdmMapping holds custom mapping information which can be applied to a CSDL element.
|
* EdmMapping holds custom mapping information which can be applied to a CSDL element.
|
|
@ -18,9 +18,9 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package org.apache.olingo.commons.core.edm.provider;
|
package org.apache.olingo.commons.core.edm.provider;
|
||||||
|
|
||||||
import org.apache.olingo.commons.api.edm.EdmMapping;
|
|
||||||
import org.apache.olingo.commons.api.edm.EdmProperty;
|
import org.apache.olingo.commons.api.edm.EdmProperty;
|
||||||
import org.apache.olingo.commons.api.edm.EdmType;
|
import org.apache.olingo.commons.api.edm.EdmType;
|
||||||
|
import org.apache.olingo.commons.api.edm.helper.EdmMapping;
|
||||||
import org.apache.olingo.commons.api.edm.provider.Property;
|
import org.apache.olingo.commons.api.edm.provider.Property;
|
||||||
|
|
||||||
public class EdmPropertyImpl extends EdmElementImpl implements EdmProperty {
|
public class EdmPropertyImpl extends EdmElementImpl implements EdmProperty {
|
||||||
|
|
Loading…
Reference in New Issue