com.japisoft.xmlpad.bean
Class XMLTemplate

java.lang.Object
  extended bycom.japisoft.xmlpad.bean.XMLTemplate

public class XMLTemplate
extends java.lang.Object

Template for XML. This is useful for the 'new' operation.

Version:
1.1
Author:
(c) 2002 JAPISOFT / A.Brillant

Constructor Summary
XMLTemplate()
           
 
Method Summary
 int getCursorLocation()
          Particular case when the template contains a 'cursor' param, this is used by the XMLContainer to force a cursor location
 boolean isValidating()
           
 void setComment(java.lang.String comment)
          Initial comment
 void setContent(java.lang.String content)
          End of the template
 void setDtd(java.lang.String dtd)
           
 void setEncoding(java.lang.String encoding)
           
 void setRawContent(java.lang.String content)
          Reset the template with only this content
 void setRootNode(java.lang.String root)
           
 void setSchema(java.lang.String schema)
           
 void setValidating(boolean validating)
          Choose to validate this document
 void setVersion(int majorVersion, int minorVersion)
          XMLTemplate version
 java.lang.String toString()
           
 java.lang.String toString(XMLDocumentInfo info)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XMLTemplate

public XMLTemplate()
Method Detail

setVersion

public void setVersion(int majorVersion,
                       int minorVersion)
XMLTemplate version


setEncoding

public void setEncoding(java.lang.String encoding)

setDtd

public void setDtd(java.lang.String dtd)

setSchema

public void setSchema(java.lang.String schema)

setRootNode

public void setRootNode(java.lang.String root)

setContent

public void setContent(java.lang.String content)
End of the template


setComment

public void setComment(java.lang.String comment)
Initial comment


setValidating

public void setValidating(boolean validating)
Choose to validate this document


isValidating

public boolean isValidating()

setRawContent

public void setRawContent(java.lang.String content)
Reset the template with only this content


getCursorLocation

public int getCursorLocation()
Particular case when the template contains a 'cursor' param, this is used by the XMLContainer to force a cursor location

Returns:
-1 for an empty value

toString

public java.lang.String toString(XMLDocumentInfo info)
Parameters:
info - A Document info
Returns:
a string format of the current template resolving all parameters ${...} using the XMLDocumentInfo values

toString

public java.lang.String toString()