diff options
author | Jon Bratseth <bratseth@oath.com> | 2018-11-20 13:20:33 +0100 |
---|---|---|
committer | Jon Bratseth <bratseth@oath.com> | 2018-11-20 13:20:33 +0100 |
commit | 2343bf2644506b6fa385af92631d48ff9c16f915 (patch) | |
tree | b13c488696112d4567b78adeee3be05c48002680 /document/src | |
parent | a549b3d81757eb3670982c936c1312a939003816 (diff) |
Deprecation cleanup
Diffstat (limited to 'document/src')
6 files changed, 29 insertions, 37 deletions
diff --git a/document/src/main/java/com/yahoo/document/Document.java b/document/src/main/java/com/yahoo/document/Document.java index 51a1602516e..85049baf8b0 100644 --- a/document/src/main/java/com/yahoo/document/Document.java +++ b/document/src/main/java/com/yahoo/document/Document.java @@ -99,9 +99,12 @@ public class Document extends StructuredFieldValue { docId = id; } - @Deprecated + /** @deprecated do not use: Use getField(), getFieldValue() or iterator() instead */ + @Deprecated // TODO: Remove on Vespa 8 public Struct getHeader() { return header; } - @Deprecated + + /** @deprecated do not use: Use getField(), getFieldValue() or iterator() instead */ + @Deprecated // TODO: Remove on Vespa 8 public Struct getBody() { return body; } @Override diff --git a/document/src/main/java/com/yahoo/document/DocumentType.java b/document/src/main/java/com/yahoo/document/DocumentType.java index 4356745b77f..1aa1fed7659 100755 --- a/document/src/main/java/com/yahoo/document/DocumentType.java +++ b/document/src/main/java/com/yahoo/document/DocumentType.java @@ -26,10 +26,10 @@ import java.util.Set; * implicitly acquiring their fields as it's own. If a document is not set to inherit * any document, it will always inherit the document "document.0".</p> * - * @author <a href="mailto:thomasg@yahoo-inc.com">Thomas Gundersen</a> + * @author Thomas Gundersen * @author bratseth */ -// TODO Vespa 8 Remove header/body concept +// TODO: Remove header/body concept on Vespa 8 public class DocumentType extends StructuredDataType { public static final int classId = registerClass(Ids.document + 58, DocumentType.class); @@ -102,19 +102,21 @@ public class DocumentType extends StructuredDataType { /** * Provides the Struct describing the fields in the document. - * @return Struct describing the document fields. + * + * @return a struct describing the document fields. */ public StructDataType contentStruct() { return headerType; } - // Use contentStruct instead - @Deprecated + /** @deprecated use contentStruct instead */ + @Deprecated // TODO: Remove on Vespa 8 public StructDataType getHeaderType() { return contentStruct(); } - @Deprecated + @Deprecated // TODO: Remove on Vespa 8 + /** @deprecated use contentStruct instead */ public StructDataType getBodyType() { return bodyType; } diff --git a/document/src/main/java/com/yahoo/document/Field.java b/document/src/main/java/com/yahoo/document/Field.java index 4d00e79b555..5d3d148d832 100644 --- a/document/src/main/java/com/yahoo/document/Field.java +++ b/document/src/main/java/com/yahoo/document/Field.java @@ -16,7 +16,7 @@ import java.io.Serializable; * @author Thomas Gundersen * @author bratseth */ -//TODO Vespa 8 Remove header/body concept +// TODO: Remove header/body concept on Vespa 8 public class Field extends FieldBase implements FieldSet, Comparable, Serializable { protected DataType dataType; @@ -176,7 +176,7 @@ public class Field extends FieldBase implements FieldSet, Comparable, Serializab } } - /** @return Returns the datatype of the field */ + /** Returns the datatype of the field */ public final DataType getDataType() { return dataType; } @@ -184,10 +184,10 @@ public class Field extends FieldBase implements FieldSet, Comparable, Serializab /** * Set the data type of the field. This will cause recalculation of fieldid for version 7+. * - * @deprecated do not use * @param type The new type of the field. + * @deprecated do not use */ - @Deprecated // Do not remove on Vespa 6 + @Deprecated // TODO: Remove on Vespa 8 public void setDataType(DataType type) { dataType = type; fieldId = calculateIdV7(null); @@ -215,20 +215,14 @@ public class Field extends FieldBase implements FieldSet, Comparable, Serializab return forcedId; } - /** - * NB: Has no longer any semantic meaning as this is no longer an aspect with a field. - * @return Returns true if this field should be a part of "header" serializations. - */ - @Deprecated + /** @deprecated this has no longer any semantic meaning as this is no longer an aspect with a field */ + @Deprecated // TODO: Remove on Vespa 8 public boolean isHeader() { return isHeader; } - /** - * NB: Has no longer any semantic meaning as this is no longer an aspect with a field. - * Sets whether this is a header field - */ - @Deprecated + /** @deprecated this has no longer any semantic meaning as this is no longer an aspect with a field */ + @Deprecated // TODO: Remove on Vespa 8 public void setHeader(boolean header) { this.isHeader = header; } diff --git a/document/src/main/java/com/yahoo/document/fieldset/BodyFields.java b/document/src/main/java/com/yahoo/document/fieldset/BodyFields.java index 58973061340..1fd0d1129fa 100644 --- a/document/src/main/java/com/yahoo/document/fieldset/BodyFields.java +++ b/document/src/main/java/com/yahoo/document/fieldset/BodyFields.java @@ -4,14 +4,9 @@ package com.yahoo.document.fieldset; import com.yahoo.document.Field; /** - * Created with IntelliJ IDEA. - * User: thomasg - * Date: 4/25/12 - * Time: 3:18 PM - * To change this template use File | Settings | File Templates. + * @deprecated do not use */ -//TODO Vespa 8 Remove -@Deprecated +@Deprecated // TODO: Remove on Vespa 8 public class BodyFields implements FieldSet { @Override public boolean contains(FieldSet o) { @@ -41,4 +36,5 @@ public class BodyFields implements FieldSet { public FieldSet clone() throws CloneNotSupportedException { return new BodyFields(); } + } diff --git a/document/src/main/java/com/yahoo/document/fieldset/HeaderFields.java b/document/src/main/java/com/yahoo/document/fieldset/HeaderFields.java index cdfd370d1cb..220de1ab416 100644 --- a/document/src/main/java/com/yahoo/document/fieldset/HeaderFields.java +++ b/document/src/main/java/com/yahoo/document/fieldset/HeaderFields.java @@ -4,15 +4,11 @@ package com.yahoo.document.fieldset; import com.yahoo.document.Field; /** - * Created with IntelliJ IDEA. - * User: thomasg - * Date: 4/25/12 - * Time: 3:18 PM - * To change this template use File | Settings | File Templates. + * @deprecated do not use */ -//TODO Vespa 8 Remove -@Deprecated +@Deprecated // TODO: Remove on Vespa 8 public class HeaderFields implements FieldSet { + @Override public boolean contains(FieldSet o) { if (o instanceof HeaderFields || o instanceof DocIdOnly || o instanceof NoFields) { @@ -41,4 +37,5 @@ public class HeaderFields implements FieldSet { public FieldSet clone() throws CloneNotSupportedException { return new HeaderFields(); } + } diff --git a/document/src/main/java/com/yahoo/document/serialization/VespaDocumentSerializer42.java b/document/src/main/java/com/yahoo/document/serialization/VespaDocumentSerializer42.java index 460d35ed266..6a07e04a621 100644 --- a/document/src/main/java/com/yahoo/document/serialization/VespaDocumentSerializer42.java +++ b/document/src/main/java/com/yahoo/document/serialization/VespaDocumentSerializer42.java @@ -64,7 +64,7 @@ import static com.yahoo.text.Utf8.calculateBytePositions; /** * Class used for serializing documents on the Vespa 4.2 document format. * - * @deprecated Please use {@link com.yahoo.document.serialization.VespaDocumentSerializerHead} instead for new code. + * @deprecated use {@link com.yahoo.document.serialization.VespaDocumentSerializerHead} instead for new code * @author baldersheim */ @Deprecated // OK: Don't remove on Vespa 6: Mail may have documents on this format still |