diff options
Diffstat (limited to 'config-model/src/main/java/com/yahoo/schema/document/annotation')
2 files changed, 70 insertions, 0 deletions
diff --git a/config-model/src/main/java/com/yahoo/schema/document/annotation/SDAnnotationType.java b/config-model/src/main/java/com/yahoo/schema/document/annotation/SDAnnotationType.java new file mode 100644 index 00000000000..3dc46a91c1b --- /dev/null +++ b/config-model/src/main/java/com/yahoo/schema/document/annotation/SDAnnotationType.java @@ -0,0 +1,42 @@ +// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.schema.document.annotation; + +import com.yahoo.schema.document.SDDocumentType; +import com.yahoo.document.annotation.AnnotationType; + +/** + * @author Einar M R Rosenvinge + */ +public class SDAnnotationType extends AnnotationType { + + private SDDocumentType sdDocType; + private String inherits; + + public SDAnnotationType(String name) { + super(name); + } + + public SDAnnotationType(String name, SDDocumentType dataType, String inherits) { + super(name); + this.sdDocType = dataType; + this.inherits = inherits; + } + + public SDDocumentType getSdDocType() { + return sdDocType; + } + + public void setSdDocType(SDDocumentType value) { + assert(sdDocType == null); + sdDocType = value; + } + + public String getInherits() { + return inherits; + } + + public void inherit(String inherits) { + this.inherits = inherits; + } + +} diff --git a/config-model/src/main/java/com/yahoo/schema/document/annotation/TemporaryAnnotationReferenceDataType.java b/config-model/src/main/java/com/yahoo/schema/document/annotation/TemporaryAnnotationReferenceDataType.java new file mode 100644 index 00000000000..de9bd977823 --- /dev/null +++ b/config-model/src/main/java/com/yahoo/schema/document/annotation/TemporaryAnnotationReferenceDataType.java @@ -0,0 +1,28 @@ +// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.schema.document.annotation; + +import com.yahoo.document.annotation.AnnotationReferenceDataType; +import com.yahoo.document.annotation.AnnotationType; + +/** + * @author Einar M R Rosenvinge + */ +public class TemporaryAnnotationReferenceDataType extends AnnotationReferenceDataType { + + private final String target; + + public TemporaryAnnotationReferenceDataType(String target) { + this.target = target; + } + + public String getTarget() { + return target; + } + + @Override + public void setAnnotationType(AnnotationType type) { + super.setName("annotationreference<" + type.getName() + ">"); + super.setAnnotationType(type); + } + +} |