Package com.volantis.devrep.device.api.xml.definitions

Examples of com.volantis.devrep.device.api.xml.definitions.DefinitionSet


    private ResourceJiBXTester tester = new ResourceJiBXTester(
            HierarchyTestCase.class);

    public void testUnmarshall() throws JiBXException, IOException {

        DefinitionSet definitionSet = (DefinitionSet) tester.unmarshall(
                DefinitionSet.class, "DefinitionsTest.xml");

        StringBuffer output = new StringBuffer();
        dumpDefinitions(definitionSet, output);
        String actual = output.toString();
View Full Code Here


    // Create some empty definitions.
    definitions = new Definitions();

    // Add the standard set of definitions.
    DefinitionSet standardDefinitionSet = (DefinitionSet) loadZipObject(
            DeviceRepositoryConstants.STANDARD_DEFINITIONS_XML,
                        DefinitionSet.class);
    if (standardDefinitionSet == null) {
        throw new RepositoryException(EXCEPTION_LOCALIZER.format(
             "device-repository-file-missing",
                               DeviceRepositoryConstants.STANDARD_DEFINITIONS_XML));
    }
    addDefinitionSetToDefinitions(standardDefinitionSet, definitions);

    // Add the custom set of definitions, if there are any.
    DefinitionSet customDefinitionSet = (DefinitionSet) loadZipObject(
                        DeviceRepositoryConstants.CUSTOM_DEFINITIONS_XML,
                        DefinitionSet.class);
    if (customDefinitionSet != null) {
        // NOTE: here we only add categories, ignoring custom types.
        // If we tried to add the types as well we blow up with a
View Full Code Here

TOP

Related Classes of com.volantis.devrep.device.api.xml.definitions.DefinitionSet

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.