summaryrefslogtreecommitdiffstats
path: root/vespa-documentgen-plugin
diff options
context:
space:
mode:
authorArne H Juul <arnej@yahooinc.com>2022-04-07 13:33:22 +0000
committerArne H Juul <arnej@yahooinc.com>2022-04-07 14:01:29 +0000
commit292264d5377015a22997563fc6af464317271fcc (patch)
treed11e0fce1f03ddaab62fbb8b19c124012aa959df /vespa-documentgen-plugin
parentf744851523a69829b96b5bf9cb153ed14a9a8161 (diff)
handle namespaced struct type names
Diffstat (limited to 'vespa-documentgen-plugin')
-rw-r--r--vespa-documentgen-plugin/src/main/java/com/yahoo/vespa/DocumentGenMojo.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/vespa-documentgen-plugin/src/main/java/com/yahoo/vespa/DocumentGenMojo.java b/vespa-documentgen-plugin/src/main/java/com/yahoo/vespa/DocumentGenMojo.java
index 943c2c17406..7ffd93f55b0 100644
--- a/vespa-documentgen-plugin/src/main/java/com/yahoo/vespa/DocumentGenMojo.java
+++ b/vespa-documentgen-plugin/src/main/java/com/yahoo/vespa/DocumentGenMojo.java
@@ -8,14 +8,15 @@ import com.yahoo.document.DataType;
import com.yahoo.document.Field;
import com.yahoo.document.MapDataType;
import com.yahoo.document.PositionDataType;
-import com.yahoo.documentmodel.NewDocumentReferenceDataType;
import com.yahoo.document.StructDataType;
import com.yahoo.document.StructuredDataType;
import com.yahoo.document.TensorDataType;
import com.yahoo.document.WeightedSetDataType;
import com.yahoo.document.annotation.AnnotationReferenceDataType;
import com.yahoo.document.annotation.AnnotationType;
+import com.yahoo.documentmodel.NewDocumentReferenceDataType;
import com.yahoo.documentmodel.NewDocumentType;
+import com.yahoo.documentmodel.OwnedStructDataType;
import com.yahoo.documentmodel.VespaDocumentType;
import com.yahoo.searchdefinition.Schema;
import com.yahoo.searchdefinition.ApplicationBuilder;
@@ -481,7 +482,12 @@ public class DocumentGenMojo extends AbstractMojo {
}
docTypes.put(docType.getName(), packageName+"."+className);
for (DataType exportedStruct : exportedStructs) {
- structTypes.put(exportedStruct.getName(), packageName+"."+className+"."+className(exportedStruct.getName()));
+ String fullName = packageName+"."+className+"."+className(exportedStruct.getName());
+ structTypes.put(exportedStruct.getName(), fullName);
+ if (exportedStruct instanceof OwnedStructDataType) {
+ var owned = (OwnedStructDataType) exportedStruct;
+ structTypes.put(owned.getUniqueName(), fullName);
+ }
}
out.write("}\n");
}