Package org.jdom.input

Examples of org.jdom.input.DefaultJDOMFactory.element()


                errorReporter.setLocationDetailsRegistry(registry);
            }

            DefaultJDOMFactory factory = new DefaultJDOMFactory();

            Element element = factory.element(DeviceRepositorySchemaConstants.
                    USER_AGENT_PATTERN_ELEMENT_NAME,
                    MCSNamespace.DEVICE_IDENTIFICATION);

            LocationDetails details =
                    new DeviceLocationDetails(ERROR_LOCATION_FORMAT,
View Full Code Here


    private void createLocationDetailsRegistry(ODOMElement root,
                                               DeviceEditorContext context) {
        LocationDetailsRegistry registry = new LocationDetailsRegistry();
        DefaultJDOMFactory factory = new DefaultJDOMFactory();

        Element element = factory.element(DeviceRepositorySchemaConstants.
                POLICY_ELEMENT_NAME,
                MCSNamespace.DEVICE);

        LocationDetails details =
                new DevicePolicyLocationDetails(context.
View Full Code Here

                errorReporter.setLocationDetailsRegistry(registry);
            }

            DefaultJDOMFactory factory = new DefaultJDOMFactory();

            Element element = factory.element(DeviceRepositorySchemaConstants.
                    DEVICE_ELEMENT_NAME,
                    MCSNamespace.DEVICE_HIERARCHY);

            LocationDetails details =
                    new DeviceLocationDetails(ERROR_LOCATION_FORMAT,
View Full Code Here

                errorReporter.setLocationDetailsRegistry(registry);
            }

            DefaultJDOMFactory factory = new DefaultJDOMFactory();

            Element element = factory.element(DeviceRepositorySchemaConstants.
                    HEADER_PATTERN_ELEMENT_NAME,
                    MCSNamespace.DEVICE_IDENTIFICATION);

            LocationDetails details =
                    new DeviceLocationDetails(ERROR_LOCATION_FORMAT,
View Full Code Here

     */
    private void createLocationDetailsRegistry(DeviceEditorContext context) {
        LocationDetailsRegistry registry = new LocationDetailsRegistry();
        DefaultJDOMFactory factory = new DefaultJDOMFactory();

        Element element = factory.element(DeviceRepositorySchemaConstants.
                POLICY_ELEMENT_NAME,
                MCSNamespace.DEVICE_DEFINITIONS);

        ODOMElement root = (ODOMElement)
                context.getDeviceRepositoryAccessorManager().
View Full Code Here

                errorReporter.setLocationDetailsRegistry(registry);
            }

            DefaultJDOMFactory factory = new DefaultJDOMFactory();

            Element element = factory.element(DeviceRepositorySchemaConstants.
                    NUMBER_ELEMENT_NAME,
                    MCSNamespace.DEVICE_TAC_IDENTIFICATION);

            LocationDetails details =
                    new DeviceLocationDetails(ERROR_LOCATION_FORMAT,
View Full Code Here

                new PolicyProxyElementDetails("imageComponent");
        ProxyElementDetails.ChangeReason reason =
                ProxyElementDetails.ATTRIBUTES;
        JDOMFactory factory = new DefaultJDOMFactory();
        ArrayList elements = new ArrayList();
        Element element = factory.element("deviceImageAsset");
        elements.add(element);

        assertFalse("Should be false with an ATTRIBUTES reason.",
                details.setProxiedElements(elements.iterator(), reason));
View Full Code Here

                new PolicyProxyElementDetails("imageComponent");
        ProxyElementDetails.ChangeReason reason =
                ProxyElementDetails.ELEMENTS;
        JDOMFactory factory = new DefaultJDOMFactory();
        ArrayList elements = new ArrayList();
        elements.add(factory.element(ODOMElement.NULL_ELEMENT_NAME));

        assertFalse("Should be false since the first time " +
                "setProxiedElements is called, element should be \"" +
                ODOMElement.NULL_ELEMENT_NAME + "\".",
                details.setProxiedElements(elements.iterator(), reason));
View Full Code Here

                ProxyElementDetails.ELEMENTS;
        JDOMFactory factory = new DefaultJDOMFactory();
        ArrayList elements = new ArrayList();

        // Test that when the element changes then the element name changes.
        elements.add(factory.element("deviceImageAsset"));
        assertTrue("Element name has changed and reason is ELEMENTS.",
                details.setProxiedElements(elements.iterator(), reason));

        assertEquals("Element name should now be \"deviceImageAsset\"",
                "deviceImageAsset", details.getElementName());
View Full Code Here

        assertEquals("Element name should now be \"deviceImageAsset\"",
                "deviceImageAsset", details.getElementName());

        // Test that different element names produce UNDEFINED_ELEMENT_NAME
        Element element = factory.element("genericImageAsset");
        elements.add(element);
        assertTrue("Element name has changed and reason is ELEMENTS.",
                details.setProxiedElements(elements.iterator(), reason));
        assertEquals("Element name should now be \"" +
                ODOMElement.UNDEFINED_ELEMENT_NAME + "\"",
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.