Java programs for semantic web