-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCreateClassesAction.java
More file actions
55 lines (48 loc) · 2.65 KB
/
Copy pathCreateClassesAction.java
File metadata and controls
55 lines (48 loc) · 2.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package edu.stanford.protege.webprotege.entity;
import com.fasterxml.jackson.annotation.JsonClassDescription;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.google.common.collect.ImmutableSet;
import edu.stanford.protege.webprotege.common.ChangeRequestId;
import edu.stanford.protege.webprotege.common.ContentChangeRequest;
import edu.stanford.protege.webprotege.common.ProjectId;
import edu.stanford.protege.webprotege.common.Request;
import edu.stanford.protege.webprotege.dispatch.ProjectAction;
import org.semanticweb.owlapi.model.OWLClass;
/**
* Author: Matthew Horridge<br>
* Stanford University<br>
* Bio-Medical Informatics Research Group<br>
* Date: 22/02/2013
*/
@JsonTypeName("webprotege.entities.CreateClasses")
@JsonClassDescription("Represents a request to create OWL classes in a specified project")
public record CreateClassesAction(@JsonProperty("changeRequestId") ChangeRequestId changeRequestId,
@JsonProperty("projectId")
@JsonPropertyDescription("The id of the project where the classes will be created")
ProjectId projectId,
@JsonProperty("sourceText")
@JsonPropertyDescription("""
The source text that contains the user supplied names for the classes.
Multiple user-supplied class names should be separated with a new line.""")
String sourceText,
@JsonProperty("langTag")
@JsonPropertyDescription("The language tag that should be used for the labels of the created classes")
String langTag,
@JsonProperty("parents")
@JsonPropertyDescription("""
A set of classes that the created classes will be subclasses of.
May be empty.""")
ImmutableSet<OWLClass> parents) implements ProjectAction<CreateClassesResult>, Request<CreateClassesResult>, ContentChangeRequest {
public static final String CHANNEL = "webprotege.entities.CreateClasses";
public CreateClassesAction {
if(changeRequestId == null) {
changeRequestId = ChangeRequestId.generate();
}
}
@Override
public String getChannel() {
return CHANNEL;
}
}