use of org.eclipse.wst.json.core.schema.catalog.ICatalog in project webtools.sourceediting by eclipse.
the class Catalog method addEntriesFromCatalog.
public void addEntriesFromCatalog(ICatalog catalog) {
try {
setNotificationEnabled(false);
if (catalog != null) {
ICatalogElement[] entries = ((Catalog) catalog).getCatalogElements();
for (int i = 0; i < entries.length; i++) {
CatalogElement clone = (CatalogElement) ((CatalogElement) entries[i]).clone();
addCatalogElement(clone);
}
} else {
Logger.log(Logger.ERROR, // $NON-NLS-1$
"argument was null in Catalog.addEntriesFromCatalog");
}
} finally {
setNotificationEnabled(true);
}
internalResolver = null;
notifyChanged();
}
use of org.eclipse.wst.json.core.schema.catalog.ICatalog 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;
}
Aggregations