public String getVocab ( MixinSource mixinSource , Object bean , Class < ? > mixInClass ) { if ( proxyUnwrapper != null ) { bean = proxyUnwrapper . unwrapProxy ( bean ) ; } // determine vocab in context String classVocab = bean == null ? null : vocabFromClassOrPackage ( bean . getClass ( ) ) ; final Vocab mixinVocab = findAnnotation ( mixInClass , Vocab . class ) ; Object nestedContextProviderFromMixin = getNestedContextProviderFromMixin ( mixinSource , bean , mixInClass ) ; String contextProviderVocab = null ; if ( nestedContextProviderFromMixin != null ) { contextProviderVocab = getVocab ( mixinSource , nestedContextProviderFromMixin , null ) ; } String vocab ; if ( mixinVocab != null ) { vocab = mixinVocab . value ( ) ; // wins over class } else if ( classVocab != null ) { vocab = classVocab ; // wins over context provider } else if ( contextProviderVocab != null ) { vocab = contextProviderVocab ; // wins over last resort } else { vocab = HTTP_SCHEMA_ORG ; } return vocab ; }
Gets vocab for given bean .