Java Code Examples for org.apache.olingo.commons.api.edm.provider.CsdlSchema#getAnnotationGroup()

The following examples show how to use org.apache.olingo.commons.api.edm.provider.CsdlSchema#getAnnotationGroup() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: EdmProviderImpl.java    From olingo-odata4 with Apache License 2.0 6 votes vote down vote up
@Override
protected EdmAnnotations createAnnotationGroup(final FullQualifiedName targetName, String qualifier) {
  try {
    CsdlAnnotations providerGroup = provider.getAnnotationsGroup(targetName, qualifier);
    if (null == providerGroup) {
      for(CsdlSchema schema : termSchemaDefinition) {
        providerGroup = schema.getAnnotationGroup(targetName.getFullQualifiedNameAsString(), qualifier);
        break;
      }
    }
    if (providerGroup != null) {
      return new EdmAnnotationsImpl(this, providerGroup);
    }
    return null;
  } catch (ODataException e) {
    throw new EdmException(e);
  }
}
 
Example 2
Source File: SchemaBasedEdmProvider.java    From olingo-odata4 with Apache License 2.0 5 votes vote down vote up
@Override
public CsdlAnnotations getAnnotationsGroup(FullQualifiedName targetName, String qualifier) throws ODataException {
  CsdlSchema schema = getSchema(targetName.getNamespace());
  if (schema != null) {
    return schema.getAnnotationGroup(targetName.getFullQualifiedNameAsString(), qualifier);
  }
  return null;
}
 
Example 3
Source File: ClientCsdlEdmProvider.java    From olingo-odata4 with Apache License 2.0 5 votes vote down vote up
@Override
public CsdlAnnotations getAnnotationsGroup(FullQualifiedName targetName, String qualifier) throws ODataException {
  CsdlSchema schema = xmlSchemas.get(targetName.getNamespace());
  if (schema != null) {
    return schema.getAnnotationGroup(targetName.getFullQualifiedNameAsString(), qualifier);
  }
  return null;
}