Examples of attributeCount()


Examples of com.btaz.util.reader.xml.model.Element.attributeCount()

    public boolean matches(Node node) {
        if(node == null || ! (node instanceof Element)) {
            return false;
        }
        Element element = (Element) node;
        return element.attributeCount() > 0;
    }

    @Override
    public String toString() {
        return "@*";
 
View Full Code Here

Examples of com.btaz.util.xml.model.Element.attributeCount()

    public boolean matches(Node node) {
        if(node == null || ! (node instanceof Element)) {
            return false;
        }
        Element element = (Element) node;
        return element.attributeCount() > 0;
    }

    @Override
    public String toString() {
        return "@*";
 
View Full Code Here

Examples of org.dom4j.Element.attributeCount()

                <to variable="ncname" part="ncname"? query="queryString"?/>
            */
            toFirstAtt = toElement.attribute("variable");
            toSecondAtt = toElement.attribute("part");
            toThirdAtt = toElement.attribute("query");
            if ((toFirstAtt != null && toElement.attributeCount() == 1)
                    || (toSecondAtt != null || toThirdAtt != null)) {
                toType = Assignment.VARIABLE_PART;
                toFirstValue = toFirstAtt != null ? toFirstAtt.getValue() : "";
                toSecondValue = toSecondAtt != null ? toSecondAtt.getValue() : "";
                toThirdValue = toThirdAtt != null ? toThirdAtt.getValue() : "";
View Full Code Here

Examples of org.dom4j.Element.attributeCount()

   
    Document document = xmlReader.read(outputXml);
    Element root = document.getRootElement();
   
    // There are 7 attributes because there are defaults defined by the DTD makes up the missing entries
    assertEquals("Unexpected number of hibernate-mapping elements ", 7, root.attributeCount() );
    assertEquals("Unexpected package name", "org.hibernate.tool.hbm2x.hbm2hbmxml", root.attribute("package").getStringValue() );
    assertEquals("Unexpected schema name", "myschema", root.attribute("schema").getStringValue() );
    assertEquals("Unexpected mycatalog name", "mycatalog", root.attribute("catalog").getStringValue() );
   
  }
View Full Code Here

Examples of org.dom4j.Element.attributeCount()

   
    Document document = xmlReader.read(outputXml);
    Element root = document.getRootElement();
   
    // There are 5 attributes because there are non-defaults not set for this test
    assertEquals("Unexpected number of hibernate-mapping elements ", 5, root.attributeCount() );
    assertEquals("Unexpected package name", "org.hibernate.tool.hbm2x.hbm2hbmxml", root.attribute("package").getStringValue() );
    assertEquals("Unexpected access setting", "field", root.attribute("default-access").getStringValue() );
    assertEquals("Unexpected cascade setting", "save-update", root.attribute("default-cascade").getStringValue() );
 
  }
View Full Code Here

Examples of org.dom4j.Element.attributeCount()

   
    Document document = xmlReader.read(outputXml);
    Element root = document.getRootElement();
   
    // There are 5 attributes because there are non-defaults not set for this test
    assertEquals("Unexpected number of hibernate-mapping elements ", 5, root.attributeCount() );
    assertEquals("Unexpected package name", "org.hibernate.tool.hbm2x.hbm2hbmxml", root.attribute("package").getStringValue() );
    assertEquals("Unexpected access setting", "property", root.attribute("default-access").getStringValue() );
    assertEquals("Unexpected cascade setting", "none", root.attribute("default-cascade").getStringValue() );
   
  }
View Full Code Here

Examples of org.dom4j.Element.attributeCount()

   
    Document document = xmlReader.read(outputXml);
    Element root = document.getRootElement();
   
    // There are 5 attributes because there are non-defaults not set for this test
    assertEquals("Unexpected number of hibernate-mapping elements ", 5, root.attributeCount() );
    assertEquals("Unexpected package name", "org.hibernate.tool.hbm2x.hbm2hbmxml", root.attribute("package").getStringValue() );
    assertEquals("Unexpected access setting", "false", root.attribute("default-lazy").getStringValue() );
    assertEquals("Unexpected cascade setting", "false", root.attribute("auto-import").getStringValue() );
   
  }
View Full Code Here

Examples of org.dom4j.Element.attributeCount()

        Assert.assertEquals(rootElement.getName(), "connectors");

        // validate connector
        Assert.assertEquals(rootElement.elements("connector").size(), 1);
        Element connectorElement = rootElement.element("connector");
        Assert.assertEquals(connectorElement.attributeCount(), 3);
        Assert.assertEquals(connectorElement.attributeValue("id"), "test");
        Assert.assertEquals(connectorElement.attributeValue("priority"), "1000");
        Assert.assertEquals(connectorElement.attributeValue("className"), "org.mokai.types.mock.MockConnector");

        // validate no additional
View Full Code Here

Examples of org.dom4j.Element.attributeCount()

        Assert.assertEquals(rootElement.getName(), "connectors");

        // validate connector
        Assert.assertEquals(1, rootElement.elements("connector").size());
        Element connectorElement = rootElement.element("connector");
        Assert.assertEquals(3, connectorElement.attributeCount());
        Assert.assertEquals(connectorElement.attributeValue("id"), "test");
        Assert.assertEquals(connectorElement.attributeValue("priority"), "1000");
        Assert.assertEquals(connectorElement.attributeValue("className"), "org.mokai.types.mock.MockConnector");

        // validate additional
View Full Code Here

Examples of org.dom4j.Element.attributeCount()

        Assert.assertEquals(rootElement.getName(), "connectors");

        // validate connector
        Assert.assertEquals(rootElement.elements("connector").size(), 1);
        Element connectorElement = rootElement.element("connector");
        Assert.assertEquals(connectorElement.attributeCount(), 3);
        Assert.assertEquals(connectorElement.attributeValue("id"), "test");
        Assert.assertEquals(connectorElement.attributeValue("priority"), "1000");
        Assert.assertEquals(connectorElement.attributeValue("className"), "org.mokai.types.mock.MockConfigurableConnector");

        Element configurationElement = connectorElement.element("configuration");
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.