Skip to end of metadata
Go to start of metadata

Inspecting document features

To inspect the document features, first you need to check the supported features collection. This collection has a set, containing the keys of all items available there. So walk through the collection requesting items by key.

Inspecting document annotations

Every KIM document has a default annotation set, which is returned by the getAnnotations() method. This annotation set holds the annotations to the document and they are available by ID or through iterating.

Inspecting all annotations of certain type(s)

When you have a certain annotation set, you can request a list of all annotation types used. Then, you can also request a subset of the current annotation set, which contains only annotations of a certain type. If you want to view annotations of more than one type (E.g "Person" and "Organization"), you should build a list of them and pass it to the KIMAnnotationSet get() method.

Inspecting annotation features

You can inspect the features for each annotation just like inspecting the document features. First, get the document annotation set. Then, walk through the annotations, get the features collection for each annotation and view the items.

Inspecting 'class' and 'inst' features

The following example is similar to the one above. The only difference is that here annotation features are requested by key. 'class' and 'inst' are essential properties of the features. The 'class' property gives the class of the feature according to the RDF repository. The 'inst' property gives the instance of an exact resource, which the feature represents (if any).

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.