1 17 package com.sun.org.apache.xml.internal.security.algorithms; 18 19 20 21 import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException; 22 import com.sun.org.apache.xml.internal.security.utils.Constants; 23 import com.sun.org.apache.xml.internal.security.utils.ElementProxy; 24 import org.w3c.dom.Document ; 25 import org.w3c.dom.Element ; 26 27 28 32 public abstract class Algorithm extends ElementProxy { 33 34 35 static java.util.logging.Logger log = 36 java.util.logging.Logger.getLogger(Algorithm.class.getName()); 37 38 43 public Algorithm(Document doc, String algorithmURI) { 44 45 super(doc); 46 47 this.setAlgorithmURI(algorithmURI); 48 } 49 50 57 public Algorithm(Element element, String BaseURI) 58 throws XMLSecurityException { 59 super(element, BaseURI); 60 } 61 62 67 public String getAlgorithmURI() { 68 return this._constructionElement.getAttributeNS(null, Constants._ATT_ALGORITHM); 69 } 70 71 76 protected void setAlgorithmURI(String algorithmURI) { 77 78 if ((this._state == MODE_CREATE) && (algorithmURI != null)) { 79 this._constructionElement.setAttributeNS(null, Constants._ATT_ALGORITHM, 80 algorithmURI); 81 } 82 } 83 } 84 | Popular Tags |