import RequestState from './RequestState' ; import RequestStateFactory from './RequestStateFactory' ; import RequestUrlParser from './RequestUrlParser' ; class Request { state : RequestState ; constructor ( public id , public url , public validFrom , state ? ) { this . state = state ? new RequestState ( state ) : RequestStateFactory . createState ( validFrom ) ; } getContentType ( ) { return RequestUrlParser . resolveContentType ( this . url ) ; } getSelectionPath ( ) { return RequestUrlParser . resolveSelectionPath ( this . url ) ; } getLeftSideBound ( ) { return RequestUrlParser . resolveLeftSideBound ( this . url ) ; } getRightSideBound ( ) { return RequestUrlParser . resolveRightSideBound ( this . url ) ; } } export default Request ;