You are viewing a plain text version of this content. The canonical link for it is here.
Posted to woden-dev@ws.apache.org by jk...@apache.org on 2005/10/25 22:55:40 UTC
svn commit: r328476 - in /incubator/woden/java/src/org/apache/woden:
ErrorLocator.java internal/ErrorLocatorImpl.java
Author: jkaputin
Date: Tue Oct 25 13:55:33 2005
New Revision: 328476
URL: http://svn.apache.org/viewcvs?rev=328476&view=rev
Log:
Create ErrorLocator to capture the source of an
error in the document (e.g. line/col, etc).
Added:
incubator/woden/java/src/org/apache/woden/ErrorLocator.java
incubator/woden/java/src/org/apache/woden/internal/ErrorLocatorImpl.java
Added: incubator/woden/java/src/org/apache/woden/ErrorLocator.java
URL: http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/ErrorLocator.java?rev=328476&view=auto
==============================================================================
--- incubator/woden/java/src/org/apache/woden/ErrorLocator.java (added)
+++ incubator/woden/java/src/org/apache/woden/ErrorLocator.java Tue Oct 25 13:55:33 2005
@@ -0,0 +1,36 @@
+/**
+ * Copyright 2005 Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.woden;
+
+/**
+ * Represents the location of parsing error within a XML document.
+ * Based on org.xml.sax.Locator.
+ *
+ * @author kaputin
+ */
+public interface ErrorLocator {
+
+ //TODO do we need URI info or just line/col?
+
+ public String getDocumentBaseURI();
+
+ public String getLocationURI();
+
+ public int getLineNumber();
+
+ public int getColumnNumber();
+
+}
Added: incubator/woden/java/src/org/apache/woden/internal/ErrorLocatorImpl.java
URL: http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/internal/ErrorLocatorImpl.java?rev=328476&view=auto
==============================================================================
--- incubator/woden/java/src/org/apache/woden/internal/ErrorLocatorImpl.java (added)
+++ incubator/woden/java/src/org/apache/woden/internal/ErrorLocatorImpl.java Tue Oct 25 13:55:33 2005
@@ -0,0 +1,61 @@
+/**
+ * Copyright 2005 Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.woden.internal;
+
+import org.apache.woden.ErrorLocator;
+
+/**
+ * Represents the location of parsing error within a XML document.
+ * Based on org.xml.sax.Locator.
+ *
+ * @author kaputin
+ */
+public class ErrorLocatorImpl implements ErrorLocator {
+
+ private int fLineNumber;
+ private int fColumnNumber;
+
+ /* (non-Javadoc)
+ * @see org.apache.woden.ErrorLocator#getDocumentBaseURI()
+ */
+ public String getDocumentBaseURI() {
+ // TODO required?
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.woden.ErrorLocator#getLocationURI()
+ */
+ public String getLocationURI() {
+ // TODO required?
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.woden.ErrorLocator#getLineNumber()
+ */
+ public int getLineNumber() {
+ return fLineNumber;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.woden.ErrorLocator#getColumnNumber()
+ */
+ public int getColumnNumber() {
+ return fColumnNumber;
+ }
+
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org