Examples of DefaultJDOMFactory


Examples of org.jdom.input.DefaultJDOMFactory

        // 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

Examples of org.jdom.input.DefaultJDOMFactory

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

Examples of org.jdom.input.DefaultJDOMFactory

    /**
     * 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

Examples of org.jdom.input.DefaultJDOMFactory

    /**
     * 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

Examples of org.jdom.input.DefaultJDOMFactory

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

        String message = "{pixelDepth}bits,  {pixelsX}x{pixelsY}px  and that is the end";

        PolicyAttributesDetails details =
View Full Code Here

Examples of org.jdom.input.DefaultJDOMFactory

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

        String message = "{pixelsX}x{pixelsY}px";

        PolicyAttributesDetails details =
View Full Code Here

Examples of org.jdom.input.DefaultJDOMFactory

    /**
     * Test the removal of 'px' if no value for pixels and there is spaces and
     * commas.
     */
    public void testFormatAttributesCommasSpaces() {
        JDOMFactory factory = new DefaultJDOMFactory();
        Attribute attr;
        List attributes = new ArrayList();
        attr = factory.attribute("pixelDepth", "24");
        attributes.add(attr);
        attr = factory.attribute("pixelsY", "100");
        attributes.add(attr);

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

        PolicyAttributesDetails details =
View Full Code Here

Examples of org.jdom.input.DefaultJDOMFactory

    /**
     * Test the missing first bracket (or char) if no value present.
     */
    public void testFormatAttributesMissingGridOpenBracket() {
        JDOMFactory factory = new DefaultJDOMFactory();
        Attribute attr;
        List attributes = new ArrayList();
        attr = factory.attribute("rows", "1");
        attributes.add(attr);
        attr = factory.attribute("columns", "2");
        attributes.add(attr);

        String message = "{element}: ''{name}'' ({rows}x{columns})";

        PolicyAttributesDetails details =
View Full Code Here

Examples of org.jdom.input.DefaultJDOMFactory

    /**
     * Test the missing first bracket (or char) if value present.
     */
    public void testFormatAttributesGridOpenBracket() {
        JDOMFactory factory = new DefaultJDOMFactory();
        Attribute attr;
        List attributes = new ArrayList();
        attr = factory.attribute("name", "name");
        attributes.add(attr);
        attr = factory.attribute("rows", "1");
        attributes.add(attr);
        attr = factory.attribute("columns", "2");
        attributes.add(attr);

        String message = "{element}: ''{name}'' ({rows}x{columns})";

        PolicyAttributesDetails details =
View Full Code Here

Examples of org.jdom.input.DefaultJDOMFactory

            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,
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.