\label{doc_usecases_core_UC_keyset_lookup_hierarchy_md_md_doc_usecases_core_UC_keyset_lookup_hierarchy}%
\Hypertarget{doc_usecases_core_UC_keyset_lookup_hierarchy_md_md_doc_usecases_core_UC_keyset_lookup_hierarchy}%
 \hypertarget{doc_usecases_core_UC_keyset_lookup_hierarchy_md_autotoc_md4511}{}\doxysection{Summary}\label{doc_usecases_core_UC_keyset_lookup_hierarchy_md_autotoc_md4511}

\begin{DoxyItemize}
\item {\bfseries{Scope\+:}} {\ttfamily libelektra-\/core}
\item {\bfseries{Level\+:}} Developer Goal
\item {\bfseries{Actors\+:}} Core, Caller
\item {\bfseries{Brief\+:}} Caller cuts (=looks up and removes) a {\ttfamily Key} hierarchy from an existing {\ttfamily Key\+Set}
\end{DoxyItemize}\hypertarget{doc_usecases_core_UC_keyset_lookup_hierarchy_md_autotoc_md4512}{}\doxysection{Scenarios}\label{doc_usecases_core_UC_keyset_lookup_hierarchy_md_autotoc_md4512}

\begin{DoxyItemize}
\item {\bfseries{Precondition\+:}}
\begin{DoxyItemize}
\item \mbox{\hyperlink{doc_usecases_core_UC_keyset_create_md}{\`{}\+Key\+Set\`{} has been created}}
\end{DoxyItemize}
\item {\bfseries{Main success scenario\+:}}
\begin{DoxyItemize}
\item Caller asks Core to cut a {\ttfamily Key} hierarchy descendant from a given {\ttfamily Key} R from a {\ttfamily Key\+Set} KS.
\item Core searches for the first {\ttfamily Key} in KS that is part of the desired hierarchy, i.\+e., the first {\ttfamily Key} in KS that is a descendant of R according to \mbox{\hyperlink{doc_usecases_core_UC_keyname_hierarchy_md}{\`{}\+Key\`{} hierarchy comparison}}.
\item If not found, Core returns an empty KS
\item If found, Core searches for the last {\ttfamily Key} that is not part of the desired hierarchy, i.\+e., Core tries all {\ttfamily Key}s in KS in \mbox{\hyperlink{doc_usecases_core_UC_keyname_ordering_md}{keyname order}} until it finds a {\ttfamily Key} that is not a descendant of R.
\item Core removes all {\ttfamily Key}s of the desired hierarchy from KS and puts them into a new {\ttfamily Key\+Set} KS1
\item Core returns KS1.
\end{DoxyItemize}
\item {\bfseries{Alternative scenario\+:}} -\/
\item {\bfseries{Error scenario\+:}} -\/
\item {\bfseries{Postcondition\+:}} -\/
\item {\bfseries{Non-\/functional Constraints\+:}} -\/ 
\end{DoxyItemize}