File tree Expand file tree Collapse file tree
whelk-core/src/main/groovy/whelk Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ class JsonLd {
104104 public static final String EQUIVALENT_CLASS = " equivalentClass"
105105 public static final String EQUIVALENT_PROPERTY = " equivalentProperty"
106106 public static final String SAME_AS = " sameAs"
107+ public static final String DEPRECATED = " deprecated"
107108 }
108109
109110 static final class Rdfs {
@@ -785,6 +786,10 @@ class JsonLd {
785786 getCategoryMembers(Category . PENDING ). contains(property)
786787 }
787788
789+ boolean isDeprecated(String term) {
790+ return vocabIndex[term]? [Owl . DEPRECATED ];
791+ }
792+
788793 /**
789794 * @param type
790795 * @return properties with range or rangeIncludes type
Original file line number Diff line number Diff line change @@ -204,6 +204,7 @@ private Node expandType(JsonLd jsonLd) {
204204 }
205205
206206 List <Condition > altFields = Stream .concat (Stream .of (baseType ), subtypes .stream ())
207+ .filter (Predicate .not (jsonLd ::isDeprecated ))
207208 .sorted ()
208209 .map (t -> withValue (new VocabTerm (t , jsonLd .vocabIndex .get (t ))))
209210 .toList ();
You can’t perform that action at this time.
0 commit comments