if (entitySet.getEntityType().hasStream()) {
if (entitySet.getEntityType().hasStream()) {
if (entitySet.getEntityType().hasStream()) {
if (entitySet.getEntityType().hasStream()) {
private void handleNavigationPathOptions() throws UriSyntaxException, UriNotMatchingException, EdmException { currentPathSegment = pathSegments.remove(0); final String decodedPath = percentDecode(currentPathSegment); checkCount(); if (uriResult.isCount()) { uriResult.setUriType(UriType.URI16); // Count of multiple entities is handled elsewhere } else if ("$value".equals(decodedPath)) { if (uriResult.getTargetEntitySet().getEntityType().hasStream()) { ensureLastSegment(); uriResult.setUriType(UriType.URI17); uriResult.setValue(true); } else { throw new UriSyntaxException(UriSyntaxException.NOMEDIARESOURCE); } } else if ("$links".equals(decodedPath)) { uriResult.setLinks(true); if (pathSegments.isEmpty()) { throw new UriSyntaxException(UriSyntaxException.MUSTNOTBELASTSEGMENT.addContent(currentPathSegment)); } currentPathSegment = pathSegments.remove(0); handleNavigationProperties(); } else { handleNavigationProperties(); } }
private void handleNavigationPathOptions() throws UriSyntaxException, UriNotMatchingException, EdmException { currentPathSegment = pathSegments.remove(0); checkCount(); if (uriResult.isCount()) { uriResult.setUriType(UriType.URI16); // Count of multiple entities is handled elsewhere } else if ("$value".equals(currentPathSegment)) { if (uriResult.getTargetEntitySet().getEntityType().hasStream()) { ensureLastSegment(); uriResult.setUriType(UriType.URI17); uriResult.setValue(true); } else { throw new UriSyntaxException(UriSyntaxException.NOMEDIARESOURCE); } } else if ("$links".equals(currentPathSegment)) { uriResult.setLinks(true); if (pathSegments.isEmpty()) { throw new UriSyntaxException(UriSyntaxException.MUSTNOTBELASTSEGMENT.addContent(currentPathSegment)); } currentPathSegment = pathSegments.remove(0); handleNavigationProperties(); } else { handleNavigationProperties(); } }
appendAtomOptionalParts(writer, eia, data); if (eia.getEntityType().hasStream()) {
private void handleNavigationPathOptions() throws UriSyntaxException, UriNotMatchingException, EdmException { currentPathSegment = pathSegments.remove(0); final String decodedPath = percentDecode(currentPathSegment); checkCount(); if (uriResult.isCount()) { uriResult.setUriType(UriType.URI16); // Count of multiple entities is handled elsewhere } else if ("$value".equals(decodedPath)) { if (uriResult.getTargetEntitySet().getEntityType().hasStream()) { ensureLastSegment(); uriResult.setUriType(UriType.URI17); uriResult.setValue(true); } else { throw new UriSyntaxException(UriSyntaxException.NOMEDIARESOURCE); } } else if ("$links".equals(decodedPath)) { uriResult.setLinks(true); if (pathSegments.isEmpty()) { throw new UriSyntaxException(UriSyntaxException.MUSTNOTBELASTSEGMENT.addContent(currentPathSegment)); } currentPathSegment = pathSegments.remove(0); handleNavigationProperties(); } else { handleNavigationProperties(); } }
ExpandSelectTreeNode expandSelectTree = null; if (entityType.hasStream()) { dataSource.createData(entitySet, data); dataSource.writeBinaryData(entitySet, data,
private void validateMetadata() throws EdmException, EntityProviderException { if (eia.getEntityType().hasStream()) { if (mediaMetadata.getSourceLink() == null) { throw new EntityProviderException(EntityProviderException.MISSING_ATTRIBUTE.addContent(FormatJson.MEDIA_SRC) .addContent(FormatJson.METADATA)); } if (mediaMetadata.getContentType() == null) { throw new EntityProviderException(EntityProviderException.MISSING_ATTRIBUTE.addContent(FormatJson.CONTENT_TYPE) .addContent(FormatJson.METADATA)); } } else { if (mediaMetadata.getContentType() != null || mediaMetadata.getEditLink() != null || mediaMetadata.getEtag() != null || mediaMetadata.getSourceLink() != null) { throw new EntityProviderException(EntityProviderException.MEDIA_DATA_NOT_INITIAL); } } }
ExpandSelectTreeNode expandSelectTree = null; if (entityType.hasStream()) { dataSource.createData(entitySet, data); dataSource.writeBinaryData(entitySet, data,
ExpandSelectTreeNode expandSelectTree = null; if (entityType.hasStream()) { dataSource.createData(entitySet, data); dataSource.writeBinaryData(entitySet, data,
private void validateMetadata() throws EdmException, EntityProviderException { if (eia.getEntityType().hasStream()) { if (mediaMetadata.getSourceLink() == null) { throw new EntityProviderException(EntityProviderException.MISSING_ATTRIBUTE.addContent(FormatJson.MEDIA_SRC) .addContent(FormatJson.METADATA)); } if (mediaMetadata.getContentType() == null) { throw new EntityProviderException(EntityProviderException.MISSING_ATTRIBUTE.addContent(FormatJson.CONTENT_TYPE) .addContent(FormatJson.METADATA)); } } else { if (mediaMetadata.getContentType() != null || mediaMetadata.getEditLink() != null || mediaMetadata.getEtag() != null || mediaMetadata.getSourceLink() != null) { throw new EntityProviderException(EntityProviderException.MEDIA_DATA_NOT_INITIAL); } } }
private void validateMetadata() throws EdmException, EntityProviderException { if (eia.getEntityType().hasStream()) { if (mediaMetadata.getSourceLink() == null) { throw new EntityProviderException(EntityProviderException.MISSING_ATTRIBUTE.addContent(FormatJson.MEDIA_SRC) .addContent(FormatJson.METADATA)); } if (mediaMetadata.getContentType() == null) { throw new EntityProviderException(EntityProviderException.MISSING_ATTRIBUTE.addContent(FormatJson.CONTENT_TYPE) .addContent(FormatJson.METADATA)); } // TODO Mime Type Mapping } else { if (mediaMetadata.getContentType() != null || mediaMetadata.getEditLink() != null || mediaMetadata.getEtag() != null || mediaMetadata.getSourceLink() != null) { throw new EntityProviderException(EntityProviderException.MEDIA_DATA_NOT_INITIAL); } } }
jsonStreamWriter.namedStringValueRaw(FormatJson.TYPE, type.getNamespace() + Edm.DELIMITER + type.getName()); if (type.hasStream()) { jsonStreamWriter.separator();
/** * * @throws EdmException * @throws EntityProviderException */ private void validateMetadata() throws EdmException, EntityProviderException { if (eia.getEntityType().hasStream()) { if (mediaMetadata.getSourceLink() == null) { throw new EntityProviderException(EntityProviderException.MISSING_ATTRIBUTE.addContent(FormatJson.MEDIA_SRC) .addContent(FormatJson.METADATA)); } if (mediaMetadata.getContentType() == null) { throw new EntityProviderException(EntityProviderException.MISSING_ATTRIBUTE.addContent(FormatJson.CONTENT_TYPE) .addContent(FormatJson.METADATA)); } } else { if (mediaMetadata.getContentType() != null || mediaMetadata.getEditLink() != null || mediaMetadata.getEtag() != null || mediaMetadata.getSourceLink() != null) { throw new EntityProviderException(EntityProviderException.MEDIA_DATA_NOT_INITIAL); } } }
processorFeature = uriInfo.getTargetEntitySet().getEntityType().hasStream() ? EntityMediaProcessor.class : EntityProcessor.class; // The request must contain a single entity! } else if (processorFeature == EntityLinksProcessor.class) {
processorFeature = uriInfo.getTargetEntitySet().getEntityType().hasStream() ? EntityMediaProcessor.class : EntityProcessor.class; // The request must contain a single entity! } else if (processorFeature == EntityLinksProcessor.class) {
if (type.hasStream()) { jsonStreamWriter.separator();
processorFeature = uriInfo.getTargetEntitySet().getEntityType().hasStream() ? EntityMediaProcessor.class : EntityProcessor.class; // The request must contain a single entity! } else if (processorFeature == EntityLinksProcessor.class) {