Examples of removePart()


Examples of appeng.api.parts.IPartHost.removePart()

            if ( sp.part != null )
            {
              is.add( sp.part.getItemStack( PartItemStack.Wrench ) );
              sp.part.getDrops( is, true );
              host.removePart( sp.side, false );
            }

            if ( sp.facade != null )
            {
              is.add( sp.facade.getItemStack() );
View Full Code Here

Examples of org.apache.stanbol.enhancer.servicesapi.ContentItem.removePart()

        ci.addPart(mainPart, new Date());
    }
    @Test(expected=IllegalArgumentException.class)
    public void removeNullPart()  throws IOException{
        ContentItem ci = createContentItem(contentSource);
        ci.removePart(null);
    }
    @Test(expected=IllegalArgumentException.class)
    public void removeNegaitveIndexPart() throws IOException {
        ContentItem ci = createContentItem(contentSource);
        ci.removePart(-1);
View Full Code Here

Examples of org.apache.stanbol.enhancer.servicesapi.ContentItem.removePart()

        ci.removePart(null);
    }
    @Test(expected=IllegalArgumentException.class)
    public void removeNegaitveIndexPart() throws IOException {
        ContentItem ci = createContentItem(contentSource);
        ci.removePart(-1);
    }
    @Test(expected=IllegalStateException.class)
    public void removeMainContentPartByUri() throws IOException {
        ContentItem ci = createContentItem(contentSource);
        ci.removePart(ci.getPartUri(0));
View Full Code Here

Examples of org.apache.stanbol.enhancer.servicesapi.ContentItem.removePart()

        ci.removePart(-1);
    }
    @Test(expected=IllegalStateException.class)
    public void removeMainContentPartByUri() throws IOException {
        ContentItem ci = createContentItem(contentSource);
        ci.removePart(ci.getPartUri(0));
    }
    @Test(expected=IllegalStateException.class)
    public void removeMainContentPartByIndex() throws IOException {
        ContentItem ci = createContentItem(contentSource);
        ci.removePart(0);
View Full Code Here

Examples of org.apache.stanbol.enhancer.servicesapi.ContentItem.removePart()

        ci.removePart(ci.getPartUri(0));
    }
    @Test(expected=IllegalStateException.class)
    public void removeMainContentPartByIndex() throws IOException {
        ContentItem ci = createContentItem(contentSource);
        ci.removePart(0);
    }
    @Test(expected=NoSuchPartException.class)
    public void removeNonExistentPartByUri() throws IOException {
        ContentItem ci = createContentItem(contentSource);
        ci.removePart(new UriRef("urn:does.not.exist:and.can.not.be.removed"));
View Full Code Here

Examples of org.apache.stanbol.enhancer.servicesapi.ContentItem.removePart()

        ci.removePart(0);
    }
    @Test(expected=NoSuchPartException.class)
    public void removeNonExistentPartByUri() throws IOException {
        ContentItem ci = createContentItem(contentSource);
        ci.removePart(new UriRef("urn:does.not.exist:and.can.not.be.removed"));
    }
    @Test(expected=NoSuchPartException.class)
    public void removeNonExistentPartByIndex() throws IOException {
        ContentItem ci = createContentItem(contentSource);
        ci.removePart(12345);
View Full Code Here

Examples of org.apache.stanbol.enhancer.servicesapi.ContentItem.removePart()

        ci.removePart(new UriRef("urn:does.not.exist:and.can.not.be.removed"));
    }
    @Test(expected=NoSuchPartException.class)
    public void removeNonExistentPartByIndex() throws IOException {
        ContentItem ci = createContentItem(contentSource);
        ci.removePart(12345);
    }
    @Test
    public void removeRemoveByUri() throws IOException {
        ContentItem ci = createContentItem(contentSource);
        UriRef uri = new UriRef("urn:content.part:remove.test");
View Full Code Here

Examples of org.apache.stanbol.enhancer.servicesapi.ContentItem.removePart()

            ci.getPart(uri, Date.class);
        }catch (NoSuchPartException e) {
            assertFalse("The part with the uri "+uri+" was not added correctly",
                true);
        }
        ci.removePart(uri);
        try {
            ci.getPart(uri, Date.class);
            assertFalse("The part with the uri "+uri+" was not removed correctly",
                true);
        }catch (NoSuchPartException e) {
View Full Code Here

Examples of org.apache.stanbol.enhancer.servicesapi.ContentItem.removePart()

            }
        }catch (NoSuchPartException e) {
            assertFalse("The part with the uri "+uri+" was not added correctly",
                true);
        }
        ci.removePart(index);
        try {
            ci.getPart(index, Date.class);
            assertTrue("The part with the uri "+uri+" was not removed correctly",
                false);
        }catch (NoSuchPartException e) {
View Full Code Here

Examples of org.apache.stanbol.enhancer.servicesapi.ContentItem.removePart()

        ci.addPart(mainPart, new Date());
    }
    @Test(expected=IllegalArgumentException.class)
    public void removeNullPart() {
        ContentItem ci = new ContentItemImpl(ciUri,blob,new SimpleMGraph()){};
        ci.removePart(null);
    }
    @Test(expected=IllegalArgumentException.class)
    public void removeNegaitveIndexPart() {
        ContentItem ci = new ContentItemImpl(ciUri,blob,new SimpleMGraph()){};
        ci.removePart(-1);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.