Search in sources :

Example 1 with ContentModelManager

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);
}
Also used : CMDocument(org.eclipse.wst.xml.core.internal.contentmodel.CMDocument) ContentModelManager(org.eclipse.wst.xml.core.internal.contentmodel.ContentModelManager)

Example 2 with ContentModelManager

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);
}
Also used : CMDocument(org.eclipse.wst.xml.core.internal.contentmodel.CMDocument) ICatalog(org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalog) ContentModelManager(org.eclipse.wst.xml.core.internal.contentmodel.ContentModelManager)

Example 3 with ContentModelManager

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);
}
Also used : CMDocument(org.eclipse.wst.xml.core.internal.contentmodel.CMDocument) ICatalog(org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalog) ContentModelManager(org.eclipse.wst.xml.core.internal.contentmodel.ContentModelManager)

Example 4 with ContentModelManager

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);
}
Also used : CMDocument(org.eclipse.wst.xml.core.internal.contentmodel.CMDocument) ContentModelManager(org.eclipse.wst.xml.core.internal.contentmodel.ContentModelManager)

Aggregations

CMDocument (org.eclipse.wst.xml.core.internal.contentmodel.CMDocument)4 ContentModelManager (org.eclipse.wst.xml.core.internal.contentmodel.ContentModelManager)4 ICatalog (org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalog)2