
com.siemens.ct.exi.main.api.stream.EmptyLocation Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of exificient Show documentation
Show all versions of exificient Show documentation
EXIficient is an open source implementation of the W3C Efficient XML Interchange
(EXI) format specification written in the Java programming language. The EXI format is a very
compact representation for the Extensible Markup Language (XML) Information Set that is intended
to simultaneously optimize performance and the utilization of computational resources.
/*
* Copyright (c) 2007-2018 Siemens AG
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*/
package com.siemens.ct.exi.main.api.stream;
import javax.xml.stream.Location;
public final class EmptyLocation implements Location {
/**
* Singleton instance.
*/
private static final EmptyLocation EMPTY_LOCATION_INSTANCE = new EmptyLocation();
private EmptyLocation() {
}
/**
* Returns the one and only instance of this class.
*
* @return empty location instance
*/
public static EmptyLocation getInstance() {
return EMPTY_LOCATION_INSTANCE;
}
/**
* Return the line number where the current event ends, returns -1 if none
* is available.
*
* @return the current line number
*/
public int getLineNumber() {
return -1;
}
/**
* Return the column number where the current event ends, returns -1 if none
* is available.
*
* @return the current column number
*/
public int getColumnNumber() {
return -1;
}
/**
* Return the byte or character offset into the input source this location
* is pointing to. If the input source is a file or a byte stream then this
* is the byte offset into that stream, but if the input source is a
* character media then the offset is the character offset. Returns -1 if
* there is no offset available.
*
* @return the current offset
*/
public int getCharacterOffset() {
return -1;
}
/**
* Returns the public ID of the XML
*
* @return the public ID, or null if not available
*/
public String getPublicId() {
return null;
}
/**
* Returns the system ID of the XML
*
* @return the system ID, or null if not available
*/
public String getSystemId() {
return null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy