[OLINGO-143] All edm classes are documented with javadoc

Also deleted the EdmTargetPath again since it is not needed in V4
This commit is contained in:
Christian Amend 2014-04-04 17:37:31 +02:00
parent 9f6c06391f
commit e8b2873e82
10 changed files with 52 additions and 69 deletions

View File

@ -28,7 +28,7 @@ import java.util.List;
public interface Edm { public interface Edm {
/** /**
* This method DOES NOT support lazy loading. All schemas are loaded completely! * This method <b>DOES NOT</b> support lazy loading. All schemas are loaded completely!
* *
* @return all schemas defined for this EDM * @return all schemas defined for this EDM
*/ */

View File

@ -19,7 +19,7 @@
package org.apache.olingo.commons.api.edm; package org.apache.olingo.commons.api.edm;
/** /**
* An EdmActionImport. * An EdmActionImport element.
*/ */
public interface EdmActionImport extends EdmOperationImport { public interface EdmActionImport extends EdmOperationImport {

View File

@ -23,5 +23,5 @@ package org.apache.olingo.commons.api.edm;
* {@link EdmParameter}. * {@link EdmParameter}.
*/ */
public interface EdmElement extends EdmNamed, EdmTyped { public interface EdmElement extends EdmNamed, EdmTyped {
//Should we introduce an element kind?
} }

View File

@ -25,7 +25,6 @@ import java.net.URI;
*/ */
public interface EdmEntitySetInfo { public interface EdmEntitySetInfo {
// TODO: Either make this a class or alias info an interface!
/** /**
* @return the entity container name which contains this entity set. * @return the entity container name which contains this entity set.
*/ */

View File

@ -18,6 +18,9 @@
*/ */
package org.apache.olingo.commons.api.edm; package org.apache.olingo.commons.api.edm;
/**
* A key property reference element.
*/
public interface EdmKeyPropertyRef { public interface EdmKeyPropertyRef {
/** /**

View File

@ -18,11 +18,21 @@
*/ */
package org.apache.olingo.commons.api.edm; package org.apache.olingo.commons.api.edm;
//TODO: JavaDoc /**
* A navigation property binding which binds entity sets or singletons with each other.
*/
public interface EdmNavigationPropertyBinding { public interface EdmNavigationPropertyBinding {
/**
* A path contains the full qualified name of the type it is referring to as a first segment. If it is a type
* nested inside another type the path is separated by forward slashes.
* @return path which leads to the target.
*/
String getPath(); String getPath();
/**
* @return the entity set or singleton this binding refers to.
*/
String getTarget(); String getTarget();
} }

View File

@ -18,11 +18,19 @@
*/ */
package org.apache.olingo.commons.api.edm; package org.apache.olingo.commons.api.edm;
//TODO: Document /**
* A referential constraint of a navigation property.
*/
public interface EdmReferentialConstraint { public interface EdmReferentialConstraint {
/**
* @return property name of the property inside this entity type or complex type.
*/
String getPropertyName(); String getPropertyName();
/**
* @return property name of the referenced entity type or complex type.
*/
String getReferencedPropertyName(); String getReferencedPropertyName();
} }

View File

@ -83,6 +83,9 @@ public interface EdmSchema {
*/ */
EdmEntityContainer getEntityContainer(FullQualifiedName name); EdmEntityContainer getEntityContainer(FullQualifiedName name);
/**
* @return all {@link EdmTypeDefinition} for this schema.
*/
List<EdmTypeDefinition> getTypeDefinitions(); List<EdmTypeDefinition> getTypeDefinitions();
} }

View File

@ -1,23 +1,27 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the * to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance * "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at * with the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an * software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the * KIND, either express or implied. See the License for the
* 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;
/**
* An Edm target element. It contains a target as a String name as well as the {@link FullQualifiedName} of the entity
* container it is contained in.
*/
public class Target { public class Target {
private String targetName; private String targetName;
@ -34,14 +38,14 @@ public class Target {
instance = new Target(); instance = new Target();
if (bindingTargetParts.length == 1) { if (bindingTargetParts.length == 1) {
instance. instance.
setEntityContainer(new FullQualifiedName(defaultContainer.getNamespace(), defaultContainer.getName())). setEntityContainer(new FullQualifiedName(defaultContainer.getNamespace(), defaultContainer.getName())).
setTargetName(bindingTargetParts[0]); setTargetName(bindingTargetParts[0]);
} else { } else {
final int idx = bindingTargetParts[0].lastIndexOf('.'); final int idx = bindingTargetParts[0].lastIndexOf('.');
instance. instance.
setEntityContainer(new FullQualifiedName( setEntityContainer(new FullQualifiedName(
bindingTargetParts[0].substring(0, idx), bindingTargetParts[0].substring(idx))). bindingTargetParts[0].substring(0, idx), bindingTargetParts[0].substring(idx))).
setTargetName(bindingTargetParts[1]); setTargetName(bindingTargetParts[1]);
} }
} }
@ -50,6 +54,9 @@ public class Target {
} }
} }
/**
* @return name of the target as a String
*/
public String getTargetName() { public String getTargetName() {
return targetName; return targetName;
} }
@ -59,6 +66,9 @@ public class Target {
return this; return this;
} }
/**
* @return {@link FullQualifiedName} of the entity container this target is contained in.
*/
public FullQualifiedName getEntityContainer() { public FullQualifiedName getEntityContainer() {
return entityContainer; return entityContainer;
} }

View File

@ -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.commons.api.edm.constants;
/**
* EdmTargetPath specifies the possible default targets for an EDM property which is mapped to an atom element.
*/
public class EdmTargetPath {
public static final String SYNDICATION_AUTHORNAME = "SyndicationAuthorName";
public static final String SYNDICATION_AUTHOREMAIL = "SyndicationAuthorEmail";
public static final String SYNDICATION_AUTHORURI = "SyndicationAuthorUri";
public static final String SYNDICATION_PUBLISHED = "SyndicationPublished";
public static final String SYNDICATION_RIGHTS = "SyndicationRights";
public static final String SYNDICATION_TITLE = "SyndicationTitle";
public static final String SYNDICATION_UPDATED = "SyndicationUpdated";
public static final String SYNDICATION_CONTRIBUTORNAME = "SyndicationContributorName";
public static final String SYNDICATION_CONTRIBUTOREMAIL = "SyndicationContributorEmail";
public static final String SYNDICATION_CONTRIBUTORURI = "SyndicationContributorUri";
public static final String SYNDICATION_SOURCE = "SyndicationSource";
public static final String SYNDICATION_SUMMARY = "SyndicationSummary";
}