55import com .fasterxml .jackson .annotation .JsonProperty ;
66import com .fasterxml .jackson .annotation .JsonTypeName ;
77import com .google .auto .value .AutoValue ;
8- import com .google .common .collect .ImmutableList ;
9- import com .google .common .collect .ImmutableMap ;
10- import edu .stanford .protege .webprotege .common .DictionaryLanguage ;
11- import edu .stanford .protege .webprotege .common .ShortForm ;
8+ import com .google .common .collect .*;
9+ import edu .stanford .protege .webprotege .common .*;
1210import org .semanticweb .owlapi .model .IRI ;
1311import org .semanticweb .owlapi .model .OWLClass ;
1412import org .semanticweb .owlapi .model .OWLEntityVisitorEx ;
@@ -32,19 +30,27 @@ public abstract class OWLClassData extends OWLEntityData {
3230
3331 public static OWLClassData get (@ Nonnull OWLClass cls ,
3432 @ Nonnull ImmutableMap <DictionaryLanguage , String > shortForms ) {
35- return get (cls , shortForms , false );
33+ return get (cls , shortForms , false , ImmutableSet . of () );
3634 }
3735
3836 public static OWLClassData get (@ Nonnull OWLClass cls ,
3937 @ Nonnull ImmutableMap <DictionaryLanguage , String > shortForms ,
4038 boolean deprecated ) {
41- return get (cls , toShortFormList (shortForms ), deprecated );
39+ return get (cls , toShortFormList (shortForms ), deprecated , ImmutableSet .of ());
40+ }
41+
42+ public static OWLClassData get (@ Nonnull OWLClass cls ,
43+ @ Nonnull ImmutableMap <DictionaryLanguage , String > shortForms ,
44+ boolean deprecated ,
45+ ImmutableSet <EntityStatus > statuses ) {
46+ return get (cls , toShortFormList (shortForms ), deprecated , statuses );
4247 }
4348
4449 public static OWLClassData get (@ JsonProperty ("entity" ) @ Nonnull OWLClass cls ,
4550 @ JsonProperty ("shortForms" ) @ Nonnull ImmutableList <ShortForm > shortForms ,
46- @ JsonProperty ("deprecated" ) boolean deprecated ) {
47- return new AutoValue_OWLClassData (shortForms , deprecated , cls );
51+ @ JsonProperty ("deprecated" ) boolean deprecated ,
52+ @ JsonProperty ("statuses" ) ImmutableSet <EntityStatus > statuses ) {
53+ return new AutoValue_OWLClassData (shortForms , deprecated , cls , statuses );
4854 }
4955
5056 /**
@@ -56,9 +62,14 @@ public static OWLClassData get(@JsonProperty("entity") @Nonnull OWLClass cls,
5662 */
5763 @ JsonCreator
5864 protected static OWLClassData get (@ JsonProperty ("iri" ) @ Nonnull String iri ,
59- @ JsonProperty (value = "shortForms" ) @ Nullable ImmutableList <ShortForm > shortForms ,
60- @ JsonProperty ("deprecated" ) boolean deprecated ) {
61- return new AutoValue_OWLClassData (Objects .requireNonNullElse (shortForms , ImmutableList .of ()), deprecated , new OWLClassImpl (IRI .create (iri )));
65+ @ JsonProperty (value = "shortForms" ) @ Nullable ImmutableList <ShortForm > shortForms ,
66+ @ JsonProperty ("deprecated" ) boolean deprecated ,
67+ @ JsonProperty ("statuses" ) ImmutableSet <EntityStatus > statuses ) {
68+ return new AutoValue_OWLClassData (
69+ Objects .requireNonNullElse (shortForms , ImmutableList .of ()),
70+ deprecated ,
71+ new OWLClassImpl (IRI .create (iri )),
72+ Objects .requireNonNullElse (statuses , ImmutableSet .of ()));
6273 }
6374
6475 @ JsonIgnore
@@ -85,6 +96,9 @@ public PrimitiveType getType() {
8596 return PrimitiveType .CLASS ;
8697 }
8798
99+ @ Nonnull
100+ public abstract ImmutableSet <EntityStatus > getStatuses ();
101+
88102 @ Override
89103 public <R , E extends Throwable > R accept (OWLPrimitiveDataVisitor <R , E > visitor ) throws E {
90104 return visitor .visit (this );
0 commit comments