Java Code Examples for org.apache.olingo.commons.api.edm.provider.CsdlSchema#getAlias()
The following examples show how to use
org.apache.olingo.commons.api.edm.provider.CsdlSchema#getAlias() .
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 |
@Override protected EdmTerm createTerm(final FullQualifiedName termName) { try { CsdlTerm providerTerm = provider.getTerm(termName); if (providerTerm != null) { return new EdmTermImpl(this, termName.getNamespace(), providerTerm); } else { for (CsdlSchema schema : termSchemaDefinition) { if (schema.getNamespace().equalsIgnoreCase(termName.getNamespace()) || (null != schema.getAlias() && schema.getAlias().equalsIgnoreCase(termName.getNamespace()))) { List<CsdlTerm> terms = schema.getTerms(); for (CsdlTerm term : terms) { if (term.getName().equals(termName.getName())) { return new EdmTermImpl(this, termName.getNamespace(), term); } } } } } return null; } catch (ODataException e) { throw new EdmException(e); } }
Example 2
Source File: EdmSchemaImpl.java From olingo-odata4 with Apache License 2.0 | 6 votes |
public EdmSchemaImpl(final EdmProviderImpl edm, final CsdlEdmProvider provider, final CsdlSchema schema) { super(edm, schema); this.edm = edm; this.provider = provider; this.schema = schema; namespace = schema.getNamespace(); alias = schema.getAlias(); if (alias != null) { edm.cacheAliasNamespaceInfo(alias, namespace); } enumTypes = createEnumTypes(); typeDefinitions = createTypeDefinitions(); entityTypes = createEntityTypes(); complexTypes = createComplexTypes(); actions = createActions(); functions = createFunctions(); entityContainer = createEntityContainer(); annotationGroups = createAnnotationGroups(); annotations = createAnnotations(); terms = createTerms(); }
Example 3
Source File: ClientCsdlEdmProvider.java From olingo-odata4 with Apache License 2.0 | 5 votes |
@Override public List<CsdlAliasInfo> getAliasInfos() throws ODataException { ArrayList<CsdlAliasInfo> aliasInfo = new ArrayList<>(); for (CsdlSchema schema : xmlSchemas.values()) { if (schema.getAlias() != null) { aliasInfo.add(new CsdlAliasInfo().setNamespace(schema.getNamespace()).setAlias(schema.getAlias())); } } return aliasInfo; }