[Jsxe-cvs] SF.net SVN: jsxe: [1238] branches/jsxe2/src/net/sourceforge/jsxe
Status: Inactive
Brought to you by:
ian_lewis
From: <ian...@us...> - 2006-09-06 19:21:07
|
Revision: 1238 http://svn.sourceforge.net/jsxe/?rev=1238&view=rev Author: ian_lewis Date: 2006-09-06 12:20:54 -0700 (Wed, 06 Sep 2006) Log Message: ----------- Moved serialization classes to net.sourceforge.jsxe.dom.ls Modified Paths: -------------- branches/jsxe2/src/net/sourceforge/jsxe/BufferHistory.java branches/jsxe2/src/net/sourceforge/jsxe/dom/AdapterNode.java branches/jsxe2/src/net/sourceforge/jsxe/dom/XMLDocument.java Added Paths: ----------- branches/jsxe2/src/net/sourceforge/jsxe/dom/ls/ branches/jsxe2/src/net/sourceforge/jsxe/dom/ls/DOMOutput.java branches/jsxe2/src/net/sourceforge/jsxe/dom/ls/DefaultDOMLocator.java Removed Paths: ------------- branches/jsxe2/src/net/sourceforge/jsxe/dom/DOMOutput.java branches/jsxe2/src/net/sourceforge/jsxe/dom/DefaultDOMLocator.java Modified: branches/jsxe2/src/net/sourceforge/jsxe/BufferHistory.java =================================================================== --- branches/jsxe2/src/net/sourceforge/jsxe/BufferHistory.java 2006-09-06 19:13:21 UTC (rev 1237) +++ branches/jsxe2/src/net/sourceforge/jsxe/BufferHistory.java 2006-09-06 19:20:54 UTC (rev 1238) @@ -55,9 +55,9 @@ //}}} //{{{ jsXe classes -import net.sourceforge.jsxe.dom.DOMOutput; -import net.sourceforge.jsxe.dom.DOMSerializer; -import net.sourceforge.jsxe.dom.DOMSerializerConfiguration; +import net.sourceforge.jsxe.dom.ls.DOMOutput; +import net.sourceforge.jsxe.dom.ls.DOMSerializer; +import net.sourceforge.jsxe.dom.ls.DOMSerializerConfiguration; import net.sourceforge.jsxe.util.Log; //}}} Modified: branches/jsxe2/src/net/sourceforge/jsxe/dom/AdapterNode.java =================================================================== --- branches/jsxe2/src/net/sourceforge/jsxe/dom/AdapterNode.java 2006-09-06 19:13:21 UTC (rev 1237) +++ branches/jsxe2/src/net/sourceforge/jsxe/dom/AdapterNode.java 2006-09-06 19:20:54 UTC (rev 1238) @@ -33,6 +33,7 @@ import net.sourceforge.jsxe.util.MiscUtilities; import net.sourceforge.jsxe.dom.undo.*; import net.sourceforge.jsxe.dom.completion.*; +import net.sourceforge.jsxe.dom.ls.DOMSerializer; //}}} //{{{ Java Base Classes Deleted: branches/jsxe2/src/net/sourceforge/jsxe/dom/DOMOutput.java =================================================================== --- branches/jsxe2/src/net/sourceforge/jsxe/dom/DOMOutput.java 2006-09-06 19:13:21 UTC (rev 1237) +++ branches/jsxe2/src/net/sourceforge/jsxe/dom/DOMOutput.java 2006-09-06 19:20:54 UTC (rev 1238) @@ -1,129 +0,0 @@ -/* -DOMOutput.java -:tabSize=4:indentSize=4:noTabs=true: -:folding=explicit:collapseFolds=1: - -Copyright (C) 2002 Ian Lewis (Ian...@me...) - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -Optionally, you may find a copy of the GNU General Public License -from http://www.fsf.org/copyleft/gpl.txt -*/ - -package net.sourceforge.jsxe.dom; - -//{{{ imports - -//{{{ DOM classes -import org.w3c.dom.ls.LSOutput; -//}}} - -//{{{ Java classes -import java.io.OutputStream; -import java.io.Writer; -//}}} - -//}}} - -/** - * An implementation of the LSOutput interface for use with the DOMSerializer - * class. This object is used when generating locations into a document. - * @author <a href="mailto:IanLewis at member dot fsf dot org">Ian Lewis</a> - * @version $Id$ - * @see DOMSerializer - */ -public class DOMOutput implements LSOutput { - - //{{{ DOMOutput constructor - - public DOMOutput(OutputStream byteStream, String encoding) { - m_byteStream = byteStream; - m_encoding = encoding; - }//}}} - - //{{{ DOMOutput constructor - - public DOMOutput(String systemId, String encoding) { - m_systemId = systemId; - m_encoding = encoding; - }//}}} - - //{{{ DOMOutput constructor - - public DOMOutput(Writer characterStream) { - m_characterStream = characterStream; - }//}}} - - //{{{ Implemented LSOutput methods - - //{{{ getByteStream() - - public OutputStream getByteStream() { - return m_byteStream; - }//}}} - - //{{{ getCharacterStream() - - public Writer getCharacterStream() { - return m_characterStream; - }//}}} - - //{{{ getEncoding() - - public String getEncoding() { - return m_encoding; - }//}}} - - //{{{ getSystemId() - - public String getSystemId() { - return m_systemId; - }//}}} - - //{{{ getByteStream() - - public void setByteStream(OutputStream byteStream) { - m_byteStream = byteStream; - }//}}} - - //{{{ setCharacterStream() - - public void setCharacterStream(Writer characterStream) { - m_characterStream = characterStream; - }//}}} - - //{{{ setEncoding() - - public void setEncoding(String encoding) { - m_encoding = encoding; - }//}}} - - //{{{ setSystemId() - - public void setSystemId(String systemId) { - m_systemId = systemId; - }//}}} - - //}}} - - //{{{ Private members - - private OutputStream m_byteStream; - private Writer m_characterStream; - private String m_systemId; - private String m_encoding; - - //}}} -} Deleted: branches/jsxe2/src/net/sourceforge/jsxe/dom/DefaultDOMLocator.java =================================================================== --- branches/jsxe2/src/net/sourceforge/jsxe/dom/DefaultDOMLocator.java 2006-09-06 19:13:21 UTC (rev 1237) +++ branches/jsxe2/src/net/sourceforge/jsxe/dom/DefaultDOMLocator.java 2006-09-06 19:20:54 UTC (rev 1238) @@ -1,111 +0,0 @@ -/* -DefaultDOMLocator.java -:tabSize=4:indentSize=4:noTabs=true: -:folding=explicit:collapseFolds=1: - -Copyright (C) 2002 Ian Lewis (Ian...@me...) - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -Optionally, you may find a copy of the GNU General Public License -from http://www.fsf.org/copyleft/gpl.txt -*/ - -package net.sourceforge.jsxe.dom; - -//{{{ imports -/* -All classes are listed explicitly so -it is easy to see which package it -belongs to. -*/ - -//{{{ DOM classes -import org.w3c.dom.Node; -import org.w3c.dom.DOMLocator; -//}}} - -//}}} - -public class DefaultDOMLocator implements DOMLocator { - - //{{{ DefaultDOMLocator constructor - - public DefaultDOMLocator() { - m_column = -1; - m_line = -1; - m_offset = -1; - }//}}} - - //{{{ DefaultDOMLocator constructor - - public DefaultDOMLocator(Node node, int lineno, int col, int byteOffset, String uri) { - m_line = lineno; - m_column = col; - m_errorNode = node; - m_offset = byteOffset; - m_uri = uri; - }//}}} - - //{{{ Implemented DOMLocator methods - - //{{{ getByteOffset() - - public int getByteOffset() { - return m_offset; - }//}}} - - //{{{ getColumnNumber() - - public int getColumnNumber() { - return m_column; - }//}}} - - //{{{ getRelatedNode() - - public Node getRelatedNode() { - return m_errorNode; - }//}}} - - //{{{ getLineNumber() - - public int getLineNumber() { - return m_line; - }//}}} - - //{{{ getUri() - - public String getUri() { - return m_uri; - }//}}} - - //{{{ getUtf16Offset() - - public int getUtf16Offset() { - //not sure how to approach the byte/UTF-16 offset stuff yet. - return -1; - }//}}} - - //}}} - - //{{{ Private members - - private int m_column; - private int m_line; - private int m_offset; - private Node m_errorNode; - private String m_uri; - - //}}} -} Modified: branches/jsxe2/src/net/sourceforge/jsxe/dom/XMLDocument.java =================================================================== --- branches/jsxe2/src/net/sourceforge/jsxe/dom/XMLDocument.java 2006-09-06 19:13:21 UTC (rev 1237) +++ branches/jsxe2/src/net/sourceforge/jsxe/dom/XMLDocument.java 2006-09-06 19:20:54 UTC (rev 1238) @@ -35,6 +35,7 @@ import net.sourceforge.jsxe.util.MiscUtilities; import net.sourceforge.jsxe.dom.completion.*; import net.sourceforge.jsxe.dom.undo.*; +import net.sourceforge.jsxe.dom.ls.*; //}}} //{{{ DOM classes Copied: branches/jsxe2/src/net/sourceforge/jsxe/dom/ls/DOMOutput.java (from rev 1232, branches/jsxe2/src/net/sourceforge/jsxe/dom/DOMOutput.java) =================================================================== --- branches/jsxe2/src/net/sourceforge/jsxe/dom/ls/DOMOutput.java (rev 0) +++ branches/jsxe2/src/net/sourceforge/jsxe/dom/ls/DOMOutput.java 2006-09-06 19:20:54 UTC (rev 1238) @@ -0,0 +1,129 @@ +/* +DOMOutput.java +:tabSize=4:indentSize=4:noTabs=true: +:folding=explicit:collapseFolds=1: + +Copyright (C) 2002 Ian Lewis (Ian...@me...) + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +Optionally, you may find a copy of the GNU General Public License +from http://www.fsf.org/copyleft/gpl.txt +*/ + +package net.sourceforge.jsxe.dom.ls; + +//{{{ imports + +//{{{ DOM classes +import org.w3c.dom.ls.LSOutput; +//}}} + +//{{{ Java classes +import java.io.OutputStream; +import java.io.Writer; +//}}} + +//}}} + +/** + * An implementation of the LSOutput interface for use with the DOMSerializer + * class. This object is used when generating locations into a document. + * @author <a href="mailto:IanLewis at member dot fsf dot org">Ian Lewis</a> + * @version $Id$ + * @see DOMSerializer + */ +public class DOMOutput implements LSOutput { + + //{{{ DOMOutput constructor + + public DOMOutput(OutputStream byteStream, String encoding) { + m_byteStream = byteStream; + m_encoding = encoding; + }//}}} + + //{{{ DOMOutput constructor + + public DOMOutput(String systemId, String encoding) { + m_systemId = systemId; + m_encoding = encoding; + }//}}} + + //{{{ DOMOutput constructor + + public DOMOutput(Writer characterStream) { + m_characterStream = characterStream; + }//}}} + + //{{{ Implemented LSOutput methods + + //{{{ getByteStream() + + public OutputStream getByteStream() { + return m_byteStream; + }//}}} + + //{{{ getCharacterStream() + + public Writer getCharacterStream() { + return m_characterStream; + }//}}} + + //{{{ getEncoding() + + public String getEncoding() { + return m_encoding; + }//}}} + + //{{{ getSystemId() + + public String getSystemId() { + return m_systemId; + }//}}} + + //{{{ getByteStream() + + public void setByteStream(OutputStream byteStream) { + m_byteStream = byteStream; + }//}}} + + //{{{ setCharacterStream() + + public void setCharacterStream(Writer characterStream) { + m_characterStream = characterStream; + }//}}} + + //{{{ setEncoding() + + public void setEncoding(String encoding) { + m_encoding = encoding; + }//}}} + + //{{{ setSystemId() + + public void setSystemId(String systemId) { + m_systemId = systemId; + }//}}} + + //}}} + + //{{{ Private members + + private OutputStream m_byteStream; + private Writer m_characterStream; + private String m_systemId; + private String m_encoding; + + //}}} +} Copied: branches/jsxe2/src/net/sourceforge/jsxe/dom/ls/DefaultDOMLocator.java (from rev 1232, branches/jsxe2/src/net/sourceforge/jsxe/dom/DefaultDOMLocator.java) =================================================================== --- branches/jsxe2/src/net/sourceforge/jsxe/dom/ls/DefaultDOMLocator.java (rev 0) +++ branches/jsxe2/src/net/sourceforge/jsxe/dom/ls/DefaultDOMLocator.java 2006-09-06 19:20:54 UTC (rev 1238) @@ -0,0 +1,111 @@ +/* +DefaultDOMLocator.java +:tabSize=4:indentSize=4:noTabs=true: +:folding=explicit:collapseFolds=1: + +Copyright (C) 2002 Ian Lewis (Ian...@me...) + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +Optionally, you may find a copy of the GNU General Public License +from http://www.fsf.org/copyleft/gpl.txt +*/ + +package net.sourceforge.jsxe.dom.ls; + +//{{{ imports +/* +All classes are listed explicitly so +it is easy to see which package it +belongs to. +*/ + +//{{{ DOM classes +import org.w3c.dom.Node; +import org.w3c.dom.DOMLocator; +//}}} + +//}}} + +public class DefaultDOMLocator implements DOMLocator { + + //{{{ DefaultDOMLocator constructor + + public DefaultDOMLocator() { + m_column = -1; + m_line = -1; + m_offset = -1; + }//}}} + + //{{{ DefaultDOMLocator constructor + + public DefaultDOMLocator(Node node, int lineno, int col, int byteOffset, String uri) { + m_line = lineno; + m_column = col; + m_errorNode = node; + m_offset = byteOffset; + m_uri = uri; + }//}}} + + //{{{ Implemented DOMLocator methods + + //{{{ getByteOffset() + + public int getByteOffset() { + return m_offset; + }//}}} + + //{{{ getColumnNumber() + + public int getColumnNumber() { + return m_column; + }//}}} + + //{{{ getRelatedNode() + + public Node getRelatedNode() { + return m_errorNode; + }//}}} + + //{{{ getLineNumber() + + public int getLineNumber() { + return m_line; + }//}}} + + //{{{ getUri() + + public String getUri() { + return m_uri; + }//}}} + + //{{{ getUtf16Offset() + + public int getUtf16Offset() { + //not sure how to approach the byte/UTF-16 offset stuff yet. + return -1; + }//}}} + + //}}} + + //{{{ Private members + + private int m_column; + private int m_line; + private int m_offset; + private Node m_errorNode; + private String m_uri; + + //}}} +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |