Package org.jdom.input

Examples of org.jdom.input.DefaultJDOMFactory


            throws RepositoryException {
        return queryRepository(repositoryFile, DeviceRepositoryConstants.REPOSITORY_XML,
                new DeviceRepositoryQuery() {
                    public String doQuery(InputStream zipEntryStream)
                            throws RepositoryException {
                        return retrieveRevision(zipEntryStream, new DefaultJDOMFactory());
                    }
                });
    }
View Full Code Here


            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,
View Full Code Here

                // property is changed. This is done with the
                // ProjectDeviceRepositoryChangeListener below.
                dram = new DeviceRepositoryAccessorManager(MCSProjectNature.
                        getDeviceRepositoryName(project),
                        new JAXPTransformerMetaFactory(),
                        new DefaultJDOMFactory(), false);

                final DeviceRepositoryBrowserPage page =
                        new DeviceRepositoryBrowserPage(dram);
                projDeviceRepositoryChangeListener =
                        new ProjectDeviceRepositoryChangeListener() {
View Full Code Here

     * @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.
View Full Code Here

        try {
            String fileName = file.getLocation().toOSString();
            dram = new DeviceRepositoryAccessorManager(fileName,
                    new JAXPTransformerMetaFactory(),
                    new DefaultJDOMFactory(), false);
        } catch (IOException e) {
            // PartInitExceptions are not logged by Eclipse so throw an
            // UndeclaredThrowable...
            throw new UndeclaredThrowableException(e, e.getMessage());
        } catch (RepositoryException e) {
View Full Code Here

            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,
View Full Code Here

        // Construct a bunch of testable devices using the underlying
        // accessor
        // @todo later refactor so it doesn't use the internal device API
        EclipseDeviceRepository accessor =
            new EclipseDeviceRepository(deviceRepository.getPath(),
                    transformerMetaFactory, new DefaultJDOMFactory(), null);

        int i = 0;
        HashMap nameToProfile = new HashMap();
        for (Iterator keys = deviceToProfile.keySet().iterator();
             keys.hasNext();) {
View Full Code Here

public class AttributesMessageFormatterTestCase extends TestCaseAbstract {
    /**
     * Test format with just attributes.
     */
    public void testFormatAttributes() {
        JDOMFactory factory = new DefaultJDOMFactory();
        Attribute attr;
        List attributes = new ArrayList();
        attr = factory.attribute("device", "PC");
        attributes.add(attr);
        attr = factory.attribute("pixelsX", "100");
        attributes.add(attr);
        attr = factory.attribute("pixelsY", "200");
        attributes.add(attr);
        attr = factory.attribute("pixelDepth", "24");
        attributes.add(attr);
        attr = factory.attribute("rendering", "color");
        attributes.add(attr);

        String message = "{value}, {element}, {assetGroup}, {device}, " +
                "{rendering}, {pixelDepth}bits, {pixelsX}x{pixelsY}px, " +
                "{widthHint}";
View Full Code Here

    /**
     * Test format with attributes and an element.
     */
    public void testFormatAttributesAndElement() {
        JDOMFactory factory = new DefaultJDOMFactory();
        Attribute attr;
        List attributes = new ArrayList();
        attr = factory.attribute("device", "PC");
        attributes.add(attr);
        attr = factory.attribute("pixelsX", "100");
        attributes.add(attr);
        attr = factory.attribute("pixelsY", "200");
        attributes.add(attr);
        attr = factory.attribute("pixelDepth", "24");
        attributes.add(attr);
        attr = factory.attribute("rendering", "color");
        attributes.add(attr);

        String message = "{value}, {element}, {assetGroup}, {device}, " +
                "{rendering}, {pixelDepth}bits, {pixelsX}x{pixelsY}px, " +
                "{widthHint}";
View Full Code Here

    /**
     * Test the removal of 'px' if no value for pixels and there is a previous
     * non-empty value in the list.
     */
    public void testFormatAttributesNoOtherElements() {
        JDOMFactory factory = new DefaultJDOMFactory();
        Attribute attr;
        List attributes = new ArrayList();
        attr = factory.attribute("pixelsX", "100");
        attributes.add(attr);

        String message = "{pixelDepth}bits, {pixelsX}x{pixelsY}px";

        PolicyAttributesDetails details =
View Full Code Here

TOP

Related Classes of org.jdom.input.DefaultJDOMFactory

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.