When working on PR #4516, I noticed that the "is-annotatable" property is stronger than the "is-xrefable" property. xrefable does not imply annotatable. For example, the ELF analyzer allows for the ELF binaries to be xrefable (by extracting the symbols and other metadata), however annotating the binaries is currently not possible (although it would be certainly possible to come up with some ideas). The HistoryGuru#hasAnnotation() check can be adapted to make the check more precise/restrictive. The "xrefable" check currently uses the T field in the document, which stores the AbstractAnalyzer.Genre value. Also, this field is stored only for files that are "xrefable". For the more precise check, the TYPE document field can be used, probably as a secondary check after the "xrefable" check, to further narrow down whether the file can be annotated. The TYPE field is always present and stored for each document.
When working on PR #4516, I noticed that the "is-annotatable" property is stronger than the "is-xrefable" property. xrefable does not imply annotatable. For example, the ELF analyzer allows for the ELF binaries to be xrefable (by extracting the symbols and other metadata), however annotating the binaries is currently not possible (although it would be certainly possible to come up with some ideas). The
HistoryGuru#hasAnnotation()
check can be adapted to make the check more precise/restrictive. The "xrefable" check currently uses theT
field in the document, which stores theAbstractAnalyzer.Genre
value. Also, this field is stored only for files that are "xrefable". For the more precise check, theTYPE
document field can be used, probably as a secondary check after the "xrefable" check, to further narrow down whether the file can be annotated. TheTYPE
field is always present and stored for each document.