Package org.apache.karaf.features.internal.model

Examples of org.apache.karaf.features.internal.model.Features


            getLog().warn(out.toString());
        }
    }

    private Features toFeatures(Collection<Bundle> addedBundles, Collection<Dependency> addedDependencys, ObjectFactory objectFactory) {
        Features features = objectFactory.createFeaturesRoot();
        Feature feature = objectFactory.createFeature();
        feature.getBundle().addAll(addedBundles);
        feature.getFeature().addAll(addedDependencys);
        features.getFeature().add(feature);
        return features;
    }
View Full Code Here


    }

    @Test
    public void testNs10Unmarshall() throws Exception {
        URL url = getClass().getResource("f02.xml");
        Features features = JaxbUtil.unmarshal(url.toExternalForm(), true);
        assertNotNull(features);
    }
View Full Code Here

    }

    @Test
    public void testNs10NoNameUnmarshall() throws Exception {
        URL url = getClass().getResource("f03.xml");
        Features features = JaxbUtil.unmarshal(url.toExternalForm(), true);
        assertNotNull(features);
    }
View Full Code Here

    }

    @Test
    public void testNs11Unmarshall() throws Exception {
        URL url = getClass().getResource("f04.xml");
        Features features = JaxbUtil.unmarshal(url.toExternalForm(), true);
        assertNotNull(features);
    }
View Full Code Here

    }

    @Test
    public void testNs12Unmarshall() throws Exception {
        URL url = getClass().getResource("f06.xml");
        Features features = JaxbUtil.unmarshal(url.toExternalForm(), true);
        assertNotNull(features);
    }
View Full Code Here

    }

    @Test
    public void testNs13Unmarshall() throws Exception {
        URL url = getClass().getResource("f07.xml");
        Features features = JaxbUtil.unmarshal(url.toExternalForm(), true);
        assertNotNull(features);
        assertEquals("2.5.6.SEC02", features.getFeature().get(0).getVersion());
        assertTrue(features.getFeature().get(1).isHidden());
    }
View Full Code Here

    @Test
    public void testReadXml100() throws JAXBException, SAXException, ParserConfigurationException, XMLStreamException {

        URL url = getClass().getClassLoader().getResource("input-features-1.0.0.xml");

        Features featuresRoot = JaxbUtil.unmarshal(url.toExternalForm(), false);

        assertEquals(featuresRoot.getRepository().size(), 1);

        ByteArrayOutputStream baos = new ByteArrayOutputStream();

        JaxbUtil.marshal(featuresRoot, baos);
View Full Code Here

    @Test
    public void testReadXml1() throws Exception {

        URL url = getClass().getClassLoader().getResource("input-features-1.1.0.xml");

        Features featuresRoot = JaxbUtil.unmarshal(url.toExternalForm(), false);

        List<Feature> featuresList = featuresRoot.getFeature();

        assertEquals(featuresList.size(), 1);

        Feature feature = featuresList.get(0);
View Full Code Here

TOP

Related Classes of org.apache.karaf.features.internal.model.Features

Copyright © 2018 www.massapicom. 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.