Java Code Examples for org.restlet.representation.Representation#release()
The following examples show how to use
org.restlet.representation.Representation#release() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TopicResourceGETTest.java From ontopia with Apache License 2.0 | 5 votes |
@Test public void testGetXTM() throws IOException { Representation xtm = getRaw("1", Constants.XTM_MEDIA_TYPE); try { Assert.assertNotNull(xtm); XTMTopicMapReader reader = new XTMTopicMapReader(xtm.getReader(), URILocator.create("foo:")); reader.setValidation(false); // ignore foo: url failures TopicMapIF tm = reader.read(); Assert.assertNotNull(tm.getObjectByItemIdentifier(URILocator.create("foo:#topic1"))); } finally { xtm.release(); } }
Example 2
Source File: TopicResourceGETTest.java From ontopia with Apache License 2.0 | 5 votes |
@Test public void testGetTMXML() throws IOException { Representation tmxml = getRaw("5", Constants.TMXML_MEDIA_TYPE); try { Assert.assertNotNull(tmxml); TopicMapIF tm = new TMXMLReader(new InputSource(tmxml.getReader()), URILocator.create("foo:")).read(); Assert.assertNotNull(tm.getObjectByItemIdentifier(URILocator.create("foo:#topic2"))); } finally { tmxml.release(); } }