Examples of removeVersion()


Examples of javax.jcr.version.VersionHistory.removeVersion()

            Property reference = otherRoot.setProperty(
                    "RemoveOrphanVersionTest", uuid, PropertyType.REFERENCE);
            otherSession.save();

            // Now remove the contents of the version history
            history.removeVersion(v10.getName());

            // Check that the version history still exists!
            try {
                session.getNodeByUUID(uuid);
            } catch (ItemNotFoundException e) {
View Full Code Here

Examples of net.sf.archimede.model.folder.FolderDao.removeVersion()

    }
   
    public String removeVersion() {
        FolderDao folderDao = FolderDao.createInstance();
        CustomTreeNode ctn = (CustomTreeNode) this.versionsTreeModel.getNode();
        folderDao.removeVersion((Folder) ctn.getContent());
       
        Folder folder = folderDao.retrieve(this.selectedFolder.getId());
        this.selectedFolder = new ViewFolder(folder);
        this.metadataTreeModel = getMetadataTreeNode();
        this.versionsTreeModel = getVersionsTreeNode();
View Full Code Here

Examples of org.apache.marmotta.kiwi.versioning.persistence.KiWiVersioningConnection.removeVersion()

            Assert.assertEquals("there should be exactly two version",2,list2.size());
            Assert.assertEquals("contents of version differ", version2, list2.get(1));

            connection.commit();

            connection.removeVersion(version1.getId());
            connection.commit();

            // check if listVersions now gives exactly two versions
            List<Version> list3 = Iterations.asList(connection.listVersions());
            Assert.assertEquals("there should be exactly one version",1,list3.size());
View Full Code Here

Examples of org.apache.marmotta.kiwi.versioning.persistence.KiWiVersioningConnection.removeVersion()

     */
    public void removeVersion(Long id) throws SailException {
        try {
            final KiWiVersioningConnection connection = persistence.getConnection();
            try {
                connection.removeVersion(id);
                connection.commit();
            } finally {
                connection.close();
            }

View Full Code Here

Examples of org.apache.marmotta.kiwi.versioning.persistence.KiWiVersioningConnection.removeVersion()

     */
    public void removeVersion(Long id) throws SailException {
        try {
            final KiWiVersioningConnection connection = persistence.getConnection();
            try {
                connection.removeVersion(id);
                connection.commit();
            } finally {
                connection.close();
            }

View Full Code Here

Examples of org.apache.marmotta.kiwi.versioning.persistence.KiWiVersioningConnection.removeVersion()

            Assert.assertEquals("there should be exactly two version",2,list2.size());
            Assert.assertEquals("contents of version differ", version2, list2.get(1));

            connection.commit();

            connection.removeVersion(version1.getId());
            connection.commit();

            // check if listVersions now gives exactly two versions
            List<Version> list3 = Iterations.asList(connection.listVersions());
            Assert.assertEquals("there should be exactly one version",1,list3.size());
View Full Code Here

Examples of org.dspace.versioning.VersioningService.removeVersion()

    private void removeVersion() throws AuthorizeException, SQLException
    {
        VersioningService versioningService = new DSpace().getSingletonService(VersioningService.class);
        if(versioningService.getVersion(ourContext, this)!=null)
        {
            versioningService.removeVersion(ourContext, this);
        }else{
            IdentifierService identifierService = new DSpace().getSingletonService(IdentifierService.class);
            try {
                identifierService.delete(ourContext, this);
            } catch (IdentifierException e) {
View Full Code Here

Examples of org.dspace.versioning.VersioningService.removeVersion()

    private void removeVersion() throws AuthorizeException, SQLException
    {
        VersioningService versioningService = new DSpace().getSingletonService(VersioningService.class);
        if(versioningService.getVersion(ourContext, this)!=null)
        {
            versioningService.removeVersion(ourContext, this);
        }else{
            IdentifierService identifierService = new DSpace().getSingletonService(IdentifierService.class);
            try {
                identifierService.delete(ourContext, this);
            } catch (IdentifierException e) {
View Full Code Here

Examples of org.dspace.versioning.VersioningService.removeVersion()

            VersionHistory versionHistory = versioningService
                    .findVersionHistory(context, itemId);

            for (String id : versionIDs)
            {
                versioningService.removeVersion(context, Integer.parseInt(id));
            }
            context.commit();

            // Retrieve the latest version of our history (IF any is even
            // present)
View Full Code Here

Examples of org.dspace.versioning.VersioningService.removeVersion()

            VersioningService versioningService = new DSpace().getSingletonService(VersioningService.class);

            VersionHistory versionHistory = versioningService.findVersionHistory(context, itemId);

            for (String id : versionIDs) {
                versioningService.removeVersion(context, Integer.parseInt(id));
            }
            context.commit();

            //Retrieve the latest version of our history (IF any is even present)
            Version latestVersion = versionHistory.getLatestVersion();
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.