hydra-jsonld/src/main/java/de/escalon/hypermedia/hydra/serialize/LdContextFactory.java
private Map<String, Object> getAnnotatedTerms(AnnotatedElement annotatedElement, String name) {
        final Terms annotatedTerms = findAnnotation(annotatedElement, Terms.class);
        final Term annotatedTerm = findAnnotation(annotatedElement, Term.class);

        if (annotatedTerms != null && annotatedTerm != null) {
            throw new IllegalStateException("found both @Terms and @Term in " + name + ", use either one or the other");
        }
        Map<String, Object> annotatedTermsMap = new LinkedHashMap<String, Object>();
        if (annotatedTerms != null) {
            final Term[] terms = annotatedTerms.value();
            for (Term term : terms) {
                collectTerms(name, annotatedTermsMap, term);
            }
        } else if (annotatedTerm != null) { // only one term
            collectTerms(name, annotatedTermsMap, annotatedTerm);
        }
        return annotatedTermsMap;
    }
private Map<String, Object> getAnnotatedTerms(AnnotatedElement annotatedElement, String name) {
        final Terms annotatedTerms = findAnnotation(annotatedElement, Terms.class);
        final Term annotatedTerm = findAnnotation(annotatedElement, Term.class);

        if (annotatedTerms != null && annotatedTerm != null) {
            throw new IllegalStateException("found both @Terms and @Term in " + name + ", use either one or the other");
        }
        Map<String, Object> annotatedTermsMap = new LinkedHashMap<String, Object>();
        if (annotatedTerms != null) {
            final Term[] terms = annotatedTerms.value();
            for (Term term : terms) {
                collectTerms(name, annotatedTermsMap, term);
            }
        } else if (annotatedTerm != null) { // only one term
            collectTerms(name, annotatedTermsMap, annotatedTerm);
        }
        return annotatedTermsMap;
    }
Gets explicitly defined terms, e.g. on package, class or mixin.

@param annotatedElement
to find terms
@param name
of annotated element, i.e. class name or package name
@return terms