Examples of VersionSerializer


Examples of com.clashinspector.jacksonSerializer.VersionSerializer


    ObjectMapper mapper = new ObjectMapper();
    SimpleModule module = new SimpleModule( "MyModule", new org.codehaus.jackson.Version( 1, 0, 0, null ) );

    module.addSerializer( Version.class, new VersionSerializer() );
    module.addSerializer( Project.class, new ProjectSerializerForDependencyNodeWrapper() );
    module.addSerializer( DependencyNodeWrapper.class, new DependencyNodeWrapperSerializer() );
    mapper.registerModule( module );

View Full Code Here

Examples of com.clashinspector.jacksonSerializer.VersionSerializer

      responseObject.setResult( clashCollectResultWrapper.getOuterClashesForSeverityLevel( clashSeverity ) );
      responseObject.setUserParameterWrapper( userParameterWrapper );


      module.addSerializer( Version.class, new VersionSerializer() );
      module.addSerializer( OuterVersionClash.class, new OuterVersionClashSerializer( clashSeverity ) );
      module.addSerializer( InnerVersionClash.class, new InnerVersionClashSerializer() );
      module.addSerializer( Project.class, new ProjectSerializerForDependencyNodeWrapper() );

      mapper.registerModule( module );
View Full Code Here

Examples of org.apache.marmotta.platform.versioning.io.VersionSerializer

                //get versions
                final RepositoryResult<Version> versions = versioningService.listVersions(resource);

                //get serializer
                final VersionSerializer serializer = versionSerializerService.getSerializer(types);

                //create response serialisation
                StreamingOutput entity = new StreamingOutput() {
                    @Override
                    public void write(OutputStream output) throws IOException, WebApplicationException {
                        serializer.write(resource,versions,output);
                    }
                };

                //create Header Links
                Set<String> links = new HashSet<String>();
                links.add("<" + MementoUtils.timegateURI(resource_string, configurationService.getBaseUri()) + ">;rel=timegate");

                links.add("<" + resource_string + ">;rel=original");

                //create response
                return Response
                        .ok()
                        .header("Link", CollectionUtils.fold(links," ,"))
                        .header("Content-Type", serializer.getContentType().toString())
                        .entity(entity)
                        .build();

            } catch (SailException e) {
                return Response.status(Response.Status.NOT_FOUND).entity("Cannot list versions").build();
View Full Code Here

Examples of org.apache.marmotta.platform.versioning.io.VersionSerializer

                //get versions
                final RepositoryResult<Version> versions = versioningService.listVersions(resource);

                //get serializer
                final VersionSerializer serializer = versionSerializerService.getSerializer(types);

                //create response serialisation
                StreamingOutput entity = new StreamingOutput() {
                    @Override
                    public void write(OutputStream output) throws IOException, WebApplicationException {
                        serializer.write(resource,versions,output);
                    }
                };

                //create Header Links
                Set<String> links = new HashSet<String>();
                links.add("<" + MementoUtils.timegateURI(resource_string, configurationService.getBaseUri()) + ">;rel=timegate");

                links.add("<" + resource_string + ">;rel=original");

                //create response
                return Response
                        .ok()
                        .header("Link", CollectionUtils.fold(links," ,"))
                        .header("Content-Type", serializer.getContentType().toString())
                        .entity(entity)
                        .build();

            } catch (SailException e) {
                return Response.status(Response.Status.NOT_FOUND).entity("Cannot list versions").build();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.