Semantic enabled resource discovery, and substitution in pervasive environments