use of org.eclipse.wst.xml.core.internal.contentmodel.ContentModelManager in project webtools.sourceediting by eclipse.
the class TestCatalogRetrivalAndModelCreation method doCM_directURITest_checkElementCount.
private void doCM_directURITest_checkElementCount(String EXPECTED_URI, int count) throws MalformedURLException, IOException {
ContentModelManager contentModelManager = ContentModelManager.getInstance();
CMDocument contentModel = contentModelManager.createCMDocument(EXPECTED_URI, null);
assertNotNull("expected to create content model for " + EXPECTED_URI, contentModel);
int actualCount = contentModel.getElements().getLength();
assertEquals("count of element declarations found for content model create from " + EXPECTED_URI, contentModel.getElements().getLength(), actualCount);
}
use of org.eclipse.wst.xml.core.internal.contentmodel.ContentModelManager in project webtools.sourceediting by eclipse.
the class TestCatalogRetrivalAndModelCreation method doURI_CMTest.
void doURI_CMTest(String EXPECTED_URI) throws MalformedURLException, IOException {
ICatalog xmlCatalog = XMLCorePlugin.getDefault().getDefaultXMLCatalog();
String resolved = xmlCatalog.resolveURI(EXPECTED_URI);
assertNotNull("expected to find " + EXPECTED_URI, resolved);
ContentModelManager contentModelManager = ContentModelManager.getInstance();
CMDocument contentModel = contentModelManager.createCMDocument(resolved, null);
assertNotNull("expected to create content model for " + EXPECTED_URI, contentModel);
}
use of org.eclipse.wst.xml.core.internal.contentmodel.ContentModelManager in project webtools.sourceediting by eclipse.
the class TestCatalogRetrivalAndModelCreation method doCMTest.
private void doCMTest(String EXPECTED_PUBLICID) throws MalformedURLException, IOException {
ICatalog xmlCatalog = XMLCorePlugin.getDefault().getDefaultXMLCatalog();
String resolved = xmlCatalog.resolvePublic(EXPECTED_PUBLICID, null);
ContentModelManager contentModelManager = ContentModelManager.getInstance();
CMDocument contentModel = contentModelManager.createCMDocument(resolved, null);
assertNotNull("expected to create content model for " + EXPECTED_PUBLICID, contentModel);
}
use of org.eclipse.wst.xml.core.internal.contentmodel.ContentModelManager in project webtools.sourceediting by eclipse.
the class TestCatalogRetrivalAndModelCreation method doCM_directURITest.
private void doCM_directURITest(String EXPECTED_URI) throws MalformedURLException, IOException {
ContentModelManager contentModelManager = ContentModelManager.getInstance();
CMDocument contentModel = contentModelManager.createCMDocument(EXPECTED_URI, null);
assertNotNull("expected to create content model for " + EXPECTED_URI, contentModel);
}
Aggregations