private DocumentPath getDocumentPath ( List < PathSegment > params ) { if ( params . isEmpty ( ) ) { return DocumentPath . ROOT ; } else { return DocumentPath . from ( params . stream ( ) . map ( PathSegment :: getPath ) . collect ( Collectors . toList ( ) ) ) ; } }
Returns a document path for the given path params .