Search in sources :

Example 6 with Version

use of de.catma.tag.Version in project catma by forTEXT.

the class ChangeImportActionDialog method getResult.

@Override
protected TagsetDefinition getResult() {
    if (choices.getValue().equals(choice1)) {
        String name = tagsetNameInput.getValue();
        IDGenerator idGenerator = new IDGenerator();
        return new TagsetDefinition(idGenerator.generateTagsetId(), name, new Version());
    } else if (choices.getValue().equals(choice2)) {
        return this.tagsetGrid.getSelectedItems().iterator().next();
    }
    return null;
}
Also used : TagsetDefinition(de.catma.tag.TagsetDefinition) Version(de.catma.tag.Version) IDGenerator(de.catma.util.IDGenerator)

Example 7 with Version

use of de.catma.tag.Version in project catma by forTEXT.

the class ProjectView method handleAddTagsetRequest.

private void handleAddTagsetRequest() {
    SingleTextInputDialog collectionNameDlg = new SingleTextInputDialog("Add Tagset", "Please enter the Tagset name:", new SaveCancelListener<String>() {

        @Override
        public void savePressed(String result) {
            IDGenerator idGenerator = new IDGenerator();
            project.getTagManager().addTagsetDefinition(new TagsetDefinition(idGenerator.generateTagsetId(), result, new Version()));
        }
    });
    collectionNameDlg.show();
}
Also used : TagsetDefinition(de.catma.tag.TagsetDefinition) Version(de.catma.tag.Version) SingleTextInputDialog(de.catma.ui.dialog.SingleTextInputDialog) IDGenerator(de.catma.util.IDGenerator)

Example 8 with Version

use of de.catma.tag.Version in project catma by forTEXT.

the class TagSelectionPanel method handleAddTagsetRequest.

private void handleAddTagsetRequest() {
    SingleTextInputDialog tagsetNameDlg = new SingleTextInputDialog("Add Tagset", "Please enter the Tagset name:", new SaveCancelListener<String>() {

        @Override
        public void savePressed(String result) {
            IDGenerator idGenerator = new IDGenerator();
            project.getTagManager().addTagsetDefinition(new TagsetDefinition(idGenerator.generateTagsetId(), result, new Version()));
        }
    });
    tagsetNameDlg.show();
}
Also used : TagsetDefinition(de.catma.tag.TagsetDefinition) Version(de.catma.tag.Version) SingleTextInputDialog(de.catma.ui.dialog.SingleTextInputDialog) IDGenerator(de.catma.util.IDGenerator)

Example 9 with Version

use of de.catma.tag.Version in project catma by forTEXT.

the class TagsView method handleAddTagsetRequest.

private void handleAddTagsetRequest() {
    if (project.isAuthorizedOnProject(RBACPermission.TAGSET_CREATE_OR_UPLOAD)) {
        SingleTextInputDialog tagsetNameDlg = new SingleTextInputDialog("Add Tagset", "Please enter the Tagset name:", new SaveCancelListener<String>() {

            @Override
            public void savePressed(String result) {
                IDGenerator idGenerator = new IDGenerator();
                project.getTagManager().addTagsetDefinition(new TagsetDefinition(idGenerator.generateTagsetId(), result, new Version()));
            }
        });
        tagsetNameDlg.show();
    } else {
        Notification.show("Info", "You do not have the permission to create Tagsets! " + "Please contact the Project maintainer for changes!", Type.HUMANIZED_MESSAGE);
    }
}
Also used : TagsetDefinition(de.catma.tag.TagsetDefinition) Version(de.catma.tag.Version) SingleTextInputDialog(de.catma.ui.dialog.SingleTextInputDialog) IDGenerator(de.catma.util.IDGenerator)

Example 10 with Version

use of de.catma.tag.Version in project catma by forTEXT.

the class TagResourcePanel method handleAddTagsetRequest.

private void handleAddTagsetRequest() {
    SingleTextInputDialog tagsetNameDlg = new SingleTextInputDialog("Add Tagset", "Please enter the Tagset name:", new SaveCancelListener<String>() {

        @Override
        public void savePressed(String result) {
            IDGenerator idGenerator = new IDGenerator();
            project.getTagManager().addTagsetDefinition(new TagsetDefinition(idGenerator.generateTagsetId(), result, new Version()));
        }
    });
    tagsetNameDlg.show();
}
Also used : TagsetDefinition(de.catma.tag.TagsetDefinition) Version(de.catma.tag.Version) SingleTextInputDialog(de.catma.ui.dialog.SingleTextInputDialog) IDGenerator(de.catma.util.IDGenerator)

Aggregations

Version (de.catma.tag.Version)13 TagsetDefinition (de.catma.tag.TagsetDefinition)8 IDGenerator (de.catma.util.IDGenerator)7 SingleTextInputDialog (de.catma.ui.dialog.SingleTextInputDialog)5 JGitRepoManager (de.catma.repository.git.managers.JGitRepoManager)3 PropertyDefinition (de.catma.tag.PropertyDefinition)3 TagDefinition (de.catma.tag.TagDefinition)3 File (java.io.File)3 ContentInfoSet (de.catma.document.source.ContentInfoSet)2 ILocalGitRepositoryManager (de.catma.repository.git.interfaces.ILocalGitRepositoryManager)2 GitLabServerManagerTest (de.catma.repository.git.managers.GitLabServerManagerTest)2 GitTagDefinition (de.catma.repository.git.serialization.model_wrappers.GitTagDefinition)2 JsonLdWebAnnotationTest (de.catma.repository.git.serialization.models.json_ld.JsonLdWebAnnotationTest)2 HashMap (java.util.HashMap)2 Test (org.junit.Test)2 Range (de.catma.document.Range)1 AnnotationCollection (de.catma.document.annotation.AnnotationCollection)1 IndexInfoSet (de.catma.document.source.IndexInfoSet)1 SourceDocument (de.catma.document.source.SourceDocument)1 SourceDocumentInfo (de.catma.document.source.SourceDocumentInfo)1