SubjectScheme getSubjectScheme ( final Element root ) { subjectSchemeReader . reset ( ) ; logger . debug ( "Loading subject schemes" ) ; final List < Element > subjectSchemes = toList ( root . getElementsByTagName ( "*" ) ) ; subjectSchemes . stream ( ) . filter ( SUBJECTSCHEME_ENUMERATIONDEF :: matches ) . forEach ( enumerationDef -> { final Element schemeRoot = ancestors ( enumerationDef ) . filter ( SUBMAP :: matches ) . findFirst ( ) . orElse ( root ) ; subjectSchemeReader . processEnumerationDef ( schemeRoot , enumerationDef ) ; } ) ; return subjectSchemeReader . getSubjectSchemeMap ( ) ; }
Read subject scheme definitions .