Clover coverage report - JBind Project
Coverage timestamp: Fr Mai 28 2004 11:17:36 CEST
file stats: LOC: 175   Methods: 36
NCLOC: 126   Classes: 1
This license of Clover is provided to support the development of JBind only. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover.
 
 Source file Conditionals Statements Methods TOTAL
ElementFactoryImpl.java - 0% 0% 0%
 1   
 /*
 2   
  * JBind
 3   
  *
 4   
  * Copyright (c) by Stefan Wachter. All rights reserved.
 5   
  *
 6   
  * Usage, modification, and redistribution is subject to license terms that are
 7   
  * available at 'http://www.jbind.org'. The JBind license is like the
 8   
  * 'Apache Software License V 1.1'.
 9   
  */
 10   
 package org.jbind.xml.dom3.core;
 11   
 
 12   
 import java.util.Collections;
 13   
 import java.util.Iterator;
 14   
 import java.util.ListIterator;
 15   
 import java.util.Map;
 16   
 
 17   
 import org.jbind.xml.base.ILocation;
 18   
 import org.jbind.xml.core.base.ITextContentMemento;
 19   
 import org.jbind.xml.core.base.ITextContentProvider;
 20   
 import org.jbind.xml.core.bridge.IAttributeImpl;
 21   
 import org.jbind.xml.core.bridge.IDataImplVisitor;
 22   
 import org.jbind.xml.core.bridge.IDefaultAttrCreator;
 23   
 import org.jbind.xml.core.bridge.IElementImpl;
 24   
 import org.jbind.xml.core.bridge.IImplContainer;
 25   
 import org.jbind.xml.core.bridge.ITextImpl;
 26   
 import org.jbind.xml.core.data.IAnyTypeData;
 27   
 import org.jbind.xml.core.data.IImpl;
 28   
 import org.jbind.xml.dom3.types.IDomAttr;
 29   
 import org.jbind.xml.dom3.types.IDomDocument;
 30   
 import org.jbind.xml.dom3.types.IDomElement;
 31   
 import org.jbind.xml.dom3.types.IDomImplementation;
 32   
 
 33   
 public class ElementFactoryImpl implements IElementImpl {
 34   
 
 35   
   private IDomDocument myOwnerDocument;
 36   
 
 37  0
   public ElementFactoryImpl() {
 38  0
     IDomImplementation domImplementation = (IDomImplementation)new DomImplementationSource().getDOMImplementation(null);
 39  0
     myOwnerDocument = (IDomDocument)domImplementation.createDocument(null, null, null);
 40   
   }
 41   
 
 42  0
   public IAttributeImpl addAttribute(String aNamespace, String aQName, String aValue, boolean anIsDefault, ILocation aLocation) {
 43  0
     IDomAttr a = (IDomAttr)myOwnerDocument.createAttributeNS(aNamespace, aQName);
 44  0
     a.setValue(aValue);
 45  0
     a.setLocation(aLocation);
 46  0
     return a;
 47   
   }
 48   
 
 49  0
   public IAttributeImpl addAttribute(String aNamespace, String aQName, ITextContentProvider aProvider, boolean anIsDefault, ILocation aLocation) {
 50  0
     IDomAttr a = (IDomAttr)myOwnerDocument.createAttributeNS(aNamespace, aQName);
 51  0
     a.setTextContent(aProvider);
 52  0
     a.setLocation(aLocation);
 53  0
     return a;
 54   
   }
 55   
 
 56  0
   public IElementImpl addElement(String aNamespace, String aQName) {
 57  0
     return addElement(aNamespace, aQName, Collections.EMPTY_MAP, null);
 58   
   }
 59   
 
 60  0
   public IElementImpl addElement(String aNamespace, String aQName, Map aPrefixMappings, ILocation aLocation) {
 61  0
     IDomElement element = (IDomElement)myOwnerDocument.createElementNS(aNamespace, aQName);
 62  0
     element.setPrefixToNamespaceMapping(aPrefixMappings);
 63  0
     element.setLocation(aLocation);
 64  0
     return element;
 65   
   }
 66   
 
 67  0
   public ITextImpl addText(String aText, ILocation aLocation) {
 68   
     assert false;
 69  0
     return null;
 70   
   }
 71   
 
 72  0
   public IAnyTypeData getAttributeData(String aNamespace, String aLocalName) {
 73  0
     return null;
 74   
   }
 75   
 
 76  0
   public Iterator iterAttributes(String aNamespace, String aName) {
 77  0
     return Collections.EMPTY_LIST.iterator();
 78   
   }
 79   
 
 80  0
   public IAttributeImpl getAttributeImpl(String aNamespace, String aName) {
 81  0
     return null;
 82   
   }
 83   
 
 84  0
   public IImpl getChild(int anIndex) {
 85  0
     return null;
 86   
   }
 87   
 
 88  0
   public ILocation getLocation() {
 89  0
     return null;
 90   
   }
 91   
 
 92  0
   public String getNamespace() {
 93  0
     return null;
 94   
   }
 95   
 
 96  0
   public String getNamespaceForPrefix(String aPrefix) {
 97  0
     return null;
 98   
   }
 99   
 
 100  0
   public int getNbChildren() {
 101  0
     return 0;
 102   
   }
 103   
 
 104  0
   public int getNonDefaultedNbChildren() {
 105  0
     return 0;
 106   
   }
 107   
 
 108  0
   public IImplContainer getParentImpl() {
 109  0
     return null;
 110   
   }
 111   
 
 112  0
   public String getPartName() {
 113  0
     return null;
 114   
   }
 115   
 
 116  0
   public String getTextContent() {
 117  0
     return null;
 118   
   }
 119   
 
 120  0
   public IAnyTypeData getData() {
 121  0
     return null;
 122   
   }
 123   
 
 124  0
   public boolean hasTextContent() {
 125  0
     return false;
 126   
   }
 127   
 
 128  0
   public boolean isDefault() {
 129  0
     return false;
 130   
   }
 131   
 
 132  0
   public boolean isNil() {
 133  0
     return false;
 134   
   }
 135   
 
 136  0
   public Iterator iterAttributeImpls() {
 137  0
     return Collections.EMPTY_LIST.iterator();
 138   
   }
 139  0
   public ListIterator iterChildren() {
 140  0
     return Collections.EMPTY_LIST.listIterator();
 141   
   }
 142   
 
 143  0
   public ListIterator iterElementData(String aNamespace, String aLocalName) {
 144  0
     return Collections.EMPTY_LIST.listIterator();
 145   
   }
 146   
 
 147  0
   public void removeAttribute(String aNamespace, String aName) {}
 148   
 
 149  0
   public void restoreTextContent(ITextContentMemento aMemento) {}
 150   
 
 151  0
   public ITextContentMemento saveTextContent() {
 152  0
     return null;
 153   
   }
 154   
 
 155  0
   public void setDefaultAttrCreator(IDefaultAttrCreator aCreator) {}
 156   
 
 157  0
   public void setDefaultTextContent(String aString) {}
 158   
 
 159  0
   public void setTextContent(String aValue) {}
 160   
 
 161  0
   public void setTextContent(ITextContentProvider aTextContentProvider) {}
 162   
 
 163  0
   public void setData(IAnyTypeData aData) {}
 164   
 
 165  0
   public void accept(IDataImplVisitor aVisitor) {}
 166   
 
 167  0
   public String getPrefixForNamespace(String aNamespace, boolean aCreate) {
 168  0
     return null;
 169   
   }
 170   
 
 171  0
   public Map getPrefixToNamespaceMapping() {
 172  0
     return Collections.EMPTY_MAP;
 173   
   }
 174   
 }
 175