Search in sources :

Example 1 with INextCatalog

use of org.eclipse.wst.json.core.schema.catalog.INextCatalog in project webtools.sourceediting by eclipse.

the class Catalog method resolveSubordinateCatalogs.

protected String resolveSubordinateCatalogs(int entryType, String publicId, String systemId) throws MalformedURLException, IOException {
    String result = null;
    INextCatalog[] nextCatalogs = getNextCatalogs();
    for (int i = 0; i < nextCatalogs.length; i++) {
        INextCatalog nextCatalog = nextCatalogs[i];
        ICatalog catalog = nextCatalog.getReferencedCatalog();
        if (catalog != null) {
            switch(entryType) {
                case ICatalogEntry.ENTRY_TYPE_SCHEMA:
                    result = catalog.resolveSchema(systemId);
                    break;
                default:
                    break;
            }
            if (result != null) {
                return result;
            }
        }
    }
    return null;
}
Also used : INextCatalog(org.eclipse.wst.json.core.schema.catalog.INextCatalog) ICatalog(org.eclipse.wst.json.core.schema.catalog.ICatalog)

Aggregations

ICatalog (org.eclipse.wst.json.core.schema.catalog.ICatalog)1 INextCatalog (org.eclipse.wst.json.core.schema.catalog.INextCatalog)1