/** * Sets base type. * * @param baseType the base type * @return the base type */ public CsdlStructuralType setBaseType(final String baseType) { this.baseType = new FullQualifiedName(baseType); return this; }
/** * Gets type fQN. * * @return the type fQN */ public FullQualifiedName getTypeFQN() { return new FullQualifiedName(type); }
/** * Sets underlying type. * * @param underlyingType the underlying type * @return the underlying type */ public CsdlTypeDefinition setUnderlyingType(final String underlyingType) { this.underlyingType = new FullQualifiedName(underlyingType); return this; }
/** * Sets type. * * @param type the type * @return the type */ public CsdlNavigationProperty setType(final String type) { this.type = new FullQualifiedName(type); return this; }
/** * Gets type fQN. * * @return the type fQN */ public FullQualifiedName getTypeFQN() { return new FullQualifiedName(type); }
/** * Sets function. * * @param function the function * @return the function */ public CsdlFunctionImport setFunction(final String function) { this.function = new FullQualifiedName(function); return this; }
/** * Sets extends container. * * @param extendsContainer the extends container * @return the extends container */ public CsdlEntityContainer setExtendsContainer(final String extendsContainer) { this.extendsContainer = new FullQualifiedName(extendsContainer); return this; }
/** * Gets type as fQN object. * * @return the type as fQN object */ public FullQualifiedName getTypeAsFQNObject() { return new FullQualifiedName(type); }
/** * Sets base type. * * @param baseType the base type * @return the base type */ public CsdlStructuralType setBaseType(final String baseType) { this.baseType = new FullQualifiedName(baseType); return this; }
private FullQualifiedName readType(StartElement element) { String type = attr(element, "Type"); if (type != null && type.startsWith("Collection(") && type.endsWith(")")) { return new FullQualifiedName(type.substring(11, type.length() - 1)); } return new FullQualifiedName(type); }
/** * Returns the {@link FullQualifiedName} for this type kind. * * @return {@link FullQualifiedName} */ public FullQualifiedName getFullQualifiedName() { return new FullQualifiedName(EdmPrimitiveType.EDM_NAMESPACE, toString()); }
private EdmEnumType getEnumType(final String primitiveValueLiteral) throws UriParserException { final String enumTypeName = primitiveValueLiteral.substring(0, primitiveValueLiteral.indexOf('\'')); final EdmEnumType type = edm.getEnumType(new FullQualifiedName(enumTypeName)); if (type == null) { throw new UriParserSemanticException("Unknown Enum type '" + enumTypeName + "'.", UriParserSemanticException.MessageKeys.UNKNOWN_TYPE, enumTypeName); } return type; }
/** * This validates the namespace to alias mapping * @param fQName * @return FullQualifiedName */ private FullQualifiedName fetchCorrectNamespaceFromAlias(FullQualifiedName fqName) { if (aliasNamespaceMap.containsKey(fqName.getNamespace())) { String namespace = aliasNamespaceMap.get(fqName.getNamespace()); fqName = new FullQualifiedName(namespace, fqName.getName()); } return fqName; }
private EntityInvocationHandler( final Class<?> typeRef, final AbstractService<?> service) { super(typeRef, service); final String name = typeRef.getAnnotation(org.apache.olingo.ext.proxy.api.annotations.EntityType.class).name(); final String namespace = typeRef.getAnnotation(Namespace.class).value(); this.internal = service.getClient().getObjectFactory().newEntity(new FullQualifiedName(namespace, name)); ClientEntity.class.cast(this.internal).setMediaEntity(typeRef.getAnnotation(EntityType.class).hasStream()); this.uuid = new EntityUUID(null, typeRef, null); }
private void readSingleton(XMLEventReader reader, StartElement element, CsdlEntityContainer container) throws XMLStreamException { CsdlSingleton singleton = new CsdlSingleton(); singleton.setNavigationPropertyBindings(new ArrayList<CsdlNavigationPropertyBinding>()); singleton.setName(attr(element, "Name")); singleton.setType(new FullQualifiedName(attr(element, "Type"))); singleton.setNavigationPropertyBindings(new ArrayList<CsdlNavigationPropertyBinding>()); readNavigationPropertyBindings(reader, element, singleton); container.getSingletons().add(singleton); }
private void readEntitySet(XMLEventReader reader, StartElement element, CsdlEntityContainer container) throws XMLStreamException { CsdlEntitySet entitySet = new CsdlEntitySet(); entitySet.setName(attr(element, "Name")); entitySet.setType(new FullQualifiedName(attr(element, "EntityType"))); entitySet.setIncludeInServiceDocument(Boolean.parseBoolean(attr(element, "IncludeInServiceDocument"))); entitySet.setNavigationPropertyBindings(new ArrayList<CsdlNavigationPropertyBinding>()); readNavigationPropertyBindings(reader, element, entitySet); container.getEntitySets().add(entitySet); }
private void parseSinglePathExpr(UriInfoImpl uriInfo, final UriResourcePartTyped lastResource) throws UriParserException, UriValidationException { if (tokenizer.next(TokenKind.SLASH)) { ParserHelper.requireNext(tokenizer, TokenKind.QualifiedName); parseBoundFunction(new FullQualifiedName(tokenizer.getText()), uriInfo, lastResource); } }
private void parseSinglePathExpr(UriInfoImpl uriInfo, final UriResourcePartTyped lastResource) throws UriParserException, UriValidationException { if (tokenizer.next(TokenKind.SLASH)) { ParserHelper.requireNext(tokenizer, TokenKind.QualifiedName); parseBoundFunction(new FullQualifiedName(tokenizer.getText()), uriInfo, lastResource); } }
public EdmEntityType parseDollarEntityTypeCast(final String pathSegment) throws UriParserException { tokenizer = new UriTokenizer(pathSegment); ParserHelper.requireNext(tokenizer, TokenKind.QualifiedName); final String name = tokenizer.getText(); ParserHelper.requireTokenEnd(tokenizer); final EdmEntityType type = edm.getEntityType(new FullQualifiedName(name)); if (type == null) { throw new UriParserSemanticException("Type '" + name + "' not found.", UriParserSemanticException.MessageKeys.UNKNOWN_TYPE, name); } return type; }
protected EdmEntityContainer createEntityContainer() { if (schema.getEntityContainer() != null) { FullQualifiedName containerFQN = new FullQualifiedName(namespace, schema.getEntityContainer().getName()); EdmEntityContainer impl = new EdmEntityContainerImpl(edm, provider, containerFQN, schema.getEntityContainer()); edm.cacheEntityContainer(containerFQN, impl); edm.cacheEntityContainer(null, impl); return impl; } return null; }