Package com.volantis.mcs.eclipse.ab.editors.dom.validation

Examples of com.volantis.mcs.eclipse.ab.editors.dom.validation.LocationDetailsRegistry$RegistryEntry


            context.addRootElement(identificationRootElement,
                    identificationRootElement.getName());
            MarkerGeneratingErrorReporter errorReporter =
                    context.getErrorReporter(identificationRootElement);

            LocationDetailsRegistry registry =
                    errorReporter.getLocationDetailsRegistry();
            if (registry == null) {
                registry = new LocationDetailsRegistry();
                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,
                            MCSNamespace.DEVICE_IDENTIFICATION);

            registry.registerLocationDetails(element, details);
        } catch (SAXException e) {
            EclipseCommonPlugin.handleError(ABPlugin.getDefault(), e);
        } catch (ParserErrorException e) {
            EclipseCommonPlugin.handleError(ABPlugin.getDefault(), e);
        }
View Full Code Here


     * associated with the given DeviceEditorContext.
     * @param context the DeviceEditorContext
     */
    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.
                getDeviceRepositoryAccessorManager());

        registry.registerLocationDetails(element, details);

        context.getErrorReporter(root).setLocationDetailsRegistry(registry);
    }
View Full Code Here

                    DeviceRepositorySchemaConstants.HIERARCHY_ELEMENT_NAME);

            MarkerGeneratingErrorReporter errorReporter =
                    context.getErrorReporter(hierarchyRootElement);

            LocationDetailsRegistry registry =
                    errorReporter.getLocationDetailsRegistry();
            if (registry == null) {
                registry = new LocationDetailsRegistry();
                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,
                            MCSNamespace.DEVICE_HIERARCHY);

            registry.registerLocationDetails(element, details);
        } catch (SAXException e) {
            EclipseCommonPlugin.handleError(ABPlugin.getDefault(), e);
        } catch (ParserErrorException e) {
            EclipseCommonPlugin.handleError(ABPlugin.getDefault(), e);
        }
View Full Code Here

        try {
            context.addRootElement(identificationRootElement,
                    identificationRootElement.getName());
            MarkerGeneratingErrorReporter errorReporter =
                    context.getErrorReporter(identificationRootElement);
            LocationDetailsRegistry registry =
                    errorReporter.getLocationDetailsRegistry();
            if (registry == null) {
                registry = new LocationDetailsRegistry();
                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,
                            MCSNamespace.DEVICE_IDENTIFICATION);

            registry.registerLocationDetails(element, details);
        } catch (SAXException e) {
            EclipseCommonPlugin.handleError(ABPlugin.getDefault(), e);
        } catch (ParserErrorException e) {
            EclipseCommonPlugin.handleError(ABPlugin.getDefault(), e);
        }
View Full Code Here

                    "invalidTACNumber");

            context.addRootElement(identificationRootElement,
                    identificationRootElement.getName());

            LocationDetailsRegistry registry =
                    errorReporter.getLocationDetailsRegistry();
            if (registry == null) {
                registry = new LocationDetailsRegistry();
                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,
                            MCSNamespace.DEVICE_TAC_IDENTIFICATION);

            registry.registerLocationDetails(element, details);

        } catch (SAXException e) {
            EclipseCommonPlugin.handleError(ABPlugin.getDefault(), e);
        } catch (ParserErrorException e) {
            EclipseCommonPlugin.handleError(ABPlugin.getDefault(), e);
View Full Code Here

     * DeviceStructurePart and set this registry on the ErrorReporter
     * associated with the given DeviceEditorContext.
     * @param context the DeviceEditorContext
     */
    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().
                getDeviceDefinitionsDocument().getRootElement();

        LocationDetails details =
                new CategoryPolicyLocationDetails(context.getDeviceRepositoryAccessorManager());

        registry.registerLocationDetails(element, details);

        context.getErrorReporter(root).setLocationDetailsRegistry(registry);
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.eclipse.ab.editors.dom.validation.LocationDetailsRegistry$RegistryEntry

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.