@Override public EdmEntityContainer getEntityContainer(final FullQualifiedName namespaceOrAliasFQN) { final FullQualifiedName fqn = resolvePossibleAlias(namespaceOrAliasFQN); EdmEntityContainer container = entityContainers.get(fqn); if (container == null) { container = createEntityContainer(fqn); if (container != null) { entityContainers.put(fqn, container); if (fqn == null) { entityContainers.put(new FullQualifiedName(container.getNamespace(), container.getName()), container); } } } return container; }
private FullQualifiedName parseAllOperationsInSchema(UriTokenizer tokenizer) throws UriParserException { final String namespace = tokenizer.getText(); if (tokenizer.next(TokenKind.DOT)) { if (tokenizer.next(TokenKind.STAR)) { // Validate the namespace. Currently a namespace from a non-default schema is not supported. // There is no direct access to the namespace without loading the whole schema; // however, the default entity container should always be there, so its access methods can be used. if (edm.getEntityContainer(new FullQualifiedName(namespace, edm.getEntityContainer().getName())) == null) { throw new UriParserSemanticException("Wrong namespace '" + namespace + "'.", UriParserSemanticException.MessageKeys.UNKNOWN_PART, namespace); } return new FullQualifiedName(namespace, tokenizer.getText()); } else { throw new UriParserSemanticException("Expected star after dot.", UriParserSemanticException.MessageKeys.UNKNOWN_PART, ""); } } return null; }
@Override public EdmEntityContainer getEntityContainer(final FullQualifiedName namespaceOrAliasFQN) { final FullQualifiedName fqn = resolvePossibleAlias(namespaceOrAliasFQN); EdmEntityContainer container = entityContainers.get(fqn); if (container == null) { container = createEntityContainer(fqn); if (container != null) { entityContainers.put(fqn, container); if (fqn == null) { entityContainers.put(new FullQualifiedName(container.getNamespace(), container.getName()), container); } } } return container; }
private FullQualifiedName parseAllOperationsInSchema(UriTokenizer tokenizer) throws UriParserException { final String namespace = tokenizer.getText(); if (tokenizer.next(TokenKind.DOT)) { if (tokenizer.next(TokenKind.STAR)) { // Validate the namespace. Currently a namespace from a non-default schema is not supported. // There is no direct access to the namespace without loading the whole schema; // however, the default entity container should always be there, so its access methods can be used. if (edm.getEntityContainer(new FullQualifiedName(namespace, edm.getEntityContainer().getName())) == null) { throw new UriParserSemanticException("Wrong namespace '" + namespace + "'.", UriParserSemanticException.MessageKeys.UNKNOWN_PART, namespace); } return new FullQualifiedName(namespace, tokenizer.getText()); } else { throw new UriParserSemanticException("Expected star after dot.", UriParserSemanticException.MessageKeys.UNKNOWN_PART, ""); } } return null; }
writer.writeStartElement(XML_ENTITY_CONTAINER); writer.writeAttribute(XML_NAME, container.getName()); FullQualifiedName parentContainerName = container.getParentContainerName(); if (parentContainerName != null) {
writer.writeStartElement(XML_ENTITY_CONTAINER); writer.writeAttribute(XML_NAME, container.getName()); FullQualifiedName parentContainerName = container.getParentContainerName(); if (parentContainerName != null) {
private void appendEntityContainer(final JsonGenerator json, final EdmEntityContainer container) throws SerializerException, IOException { if (container != null) { json.writeObjectFieldStart(container.getName()); json.writeStringField(KIND, Kind.EntityContainer.name()); FullQualifiedName parentContainerName = container.getParentContainerName();
private void appendEntityContainer(final JsonGenerator json, final EdmEntityContainer container) throws SerializerException, IOException { if (container != null) { json.writeObjectFieldStart(container.getName()); json.writeStringField(KIND, Kind.EntityContainer.name()); FullQualifiedName parentContainerName = container.getParentContainerName();