@@ -72,6 +72,10 @@ case class ExtractorDetail(
7272 * @param external_services external services used by the extractor
7373 * @param libraries libraries on which the code depends
7474 * @param bibtex bibtext formatted citation of relevant papers
75+ * @param maturity indicates whether this extractor is ready for public consumption
76+ * * For example: "Development" (default), "Staging", or "Production"
77+ * @param defaultLabels the categorization labels that were imported by default
78+ * * For example: "Development" (default), "Staging", or "Production"
7579 * @param process events that should trigger this extractor to process
7680 * @param categories list of categories that apply to the extractor
7781 * @param parameters JSON schema representing allowed parameters
@@ -94,6 +98,7 @@ case class ExtractorInfo(
9498 libraries : List [String ],
9599 bibtex : List [String ],
96100 maturity : String = " Development" ,
101+ defaultLabels : List [String ] = List [String ](),
97102 process : ExtractorProcessTriggers = new ExtractorProcessTriggers (),
98103 categories : List [String ] = List [String ](ExtractorCategory .EXTRACT .toString),
99104 parameters : JsValue = JsObject (Seq ())
@@ -146,6 +151,7 @@ object ExtractorInfo {
146151 (JsPath \ " libraries" ).read[List [String ]].orElse(Reads .pure(List .empty)) and
147152 (JsPath \ " bibtex" ).read[List [String ]].orElse(Reads .pure(List .empty)) and
148153 (JsPath \ " maturity" ).read[String ].orElse(Reads .pure(" Development" )) and
154+ (JsPath \ " labels" ).read[List [String ]].orElse(Reads .pure(List .empty)) and
149155 (JsPath \ " process" ).read[ExtractorProcessTriggers ].orElse(Reads .pure(new ExtractorProcessTriggers ())) and
150156 (JsPath \ " categories" ).read[List [String ]].orElse(Reads .pure(List [String ](ExtractorCategory .EXTRACT .toString))) and
151157 (JsPath \ " parameters" ).read[JsValue ].orElse(Reads .pure(JsObject (Seq ())))
@@ -208,4 +214,14 @@ object ExtractorsLabel {
208214 (JsPath \ " category" ).readNullable[String ] and
209215 (JsPath \ " extractors" ).read[List [String ]].orElse(Reads .pure(List .empty))
210216 )(ExtractorsLabel .apply _)
217+ }
218+
219+ case class LabelAssignment (
220+ extractorId : UUID ,
221+ labelId : UUID
222+ )
223+
224+ object LabelAssignment {
225+ implicit val writes = Json .writes[LabelAssignment ]
226+ implicit val reads = Json .reads[LabelAssignment ]
211227}
0 commit comments