/* * Copyright (C) 2017 TypeFox and others. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ import { injectable } from "inversify"; import URI from "@theia/core/lib/common/uri"; @injectable() export class CatalogoUri { validate(uri: URI): URI { if (uri.path.ext !== '.connector') { throw new Error('The given URI is not a valid URI, ' + uri); } return new URI("file://" + uri); } }