Java 类org.w3c.dom.DOMLocator 实例源码

项目:sdcct    文件:SdcctLocation.java   
public SdcctLocation(@Nullable DOMLocator domLocator) {
    this();

    if (domLocator != null) {
        this.initializeNode(domLocator.getRelatedNode());
    }
}
项目:sdcct    文件:SdcctLocation.java   
private void initializeSourceLocator(@Nullable SourceLocator srcLocator) {
    if (srcLocator == null) {
        return;
    }

    this.colNum = srcLocator.getColumnNumber();
    this.lineNum = srcLocator.getLineNumber();
    this.publicId = srcLocator.getPublicId();
    this.sysId = srcLocator.getSystemId();

    if (srcLocator instanceof javax.xml.transform.dom.DOMLocator) {
        this.initializeNode(((javax.xml.transform.dom.DOMLocator) srcLocator).getOriginatingNode());
    }
}
项目:In-the-Box-Fork    文件:DOMLocatorImpl.java   
public DOMLocatorImpl(DOMLocator src) {
  this.lineNumber = src.getLineNumber();
  this.columnNumber = src.getColumnNumber();
  this.byteOffset = src.getByteOffset();
  this.utf16Offset = src.getUtf16Offset();
  this.relatedNode = src.getRelatedNode();
  this.uri = src.getUri();
}
项目:xml-avro    文件:SchemaBuilder.java   
void throwExceptionIfHasError() {
    if (exception != null)
        throw new ConverterException(exception);

    if (error != null) {
        if (error.getRelatedException() instanceof Throwable)
            throw new ConverterException((Throwable) error.getRelatedException());

        DOMLocator locator = error.getLocation();
        String location = "at:" + locator.getUri() + ", line:" + locator.getLineNumber() + ", char:" + locator.getColumnNumber();
        throw new ConverterException(location + " " + error.getMessage());
    }
}
项目:OpenJSharp    文件:DOMErrorImpl.java   
/**
 * The location of the error.
 */

public DOMLocator getLocation() {
    return fLocator;
}
项目:OpenJSharp    文件:DOMErrorHandlerWrapper.java   
/** Prints the error message. */

    private void printError(DOMError error) {
        int severity = error.getSeverity();
        fOut.print("[");
        if ( severity == DOMError.SEVERITY_WARNING) {
            fOut.print("Warning");
        } else if ( severity == DOMError.SEVERITY_ERROR) {
            fOut.print("Error");
        } else {
            fOut.print("FatalError");
            eStatus = false ; //REVISIT: Abort processing if fatal error, do we need to??
        }
        fOut.print("] ");
        DOMLocator locator = error.getLocation();
        if (locator != null) {
            fOut.print(locator.getLineNumber());
            fOut.print(":");
            fOut.print(locator.getColumnNumber());
            fOut.print(":");
            fOut.print(locator.getByteOffset());
            fOut.print(",");
            fOut.print(locator.getUtf16Offset());
            Node node = locator.getRelatedNode();
            if (node != null) {
                fOut.print("[");
                fOut.print(node.getNodeName());
                fOut.print("]");
            }
            String systemId = locator.getUri();
            if (systemId != null) {
                int index = systemId.lastIndexOf('/');
                if (index != -1)
                    systemId = systemId.substring(index + 1);
                fOut.print(": ");
                fOut.print(systemId);
            }

        }

        fOut.print(":");
        fOut.print(error.getMessage());
        fOut.println();
        fOut.flush();

    }
项目:openjdk-jdk10    文件:DOMErrorImpl.java   
/**
 * The location of the error.
 */

public DOMLocator getLocation() {
    return fLocator;
}
项目:openjdk-jdk10    文件:DOMErrorHandlerWrapper.java   
/** Prints the error message. */

    private void printError(DOMError error) {
        int severity = error.getSeverity();
        fOut.print("[");
        if ( severity == DOMError.SEVERITY_WARNING) {
            fOut.print("Warning");
        } else if ( severity == DOMError.SEVERITY_ERROR) {
            fOut.print("Error");
        } else {
            fOut.print("FatalError");
            eStatus = false ; //REVISIT: Abort processing if fatal error, do we need to??
        }
        fOut.print("] ");
        DOMLocator locator = error.getLocation();
        if (locator != null) {
            fOut.print(locator.getLineNumber());
            fOut.print(":");
            fOut.print(locator.getColumnNumber());
            fOut.print(":");
            fOut.print(locator.getByteOffset());
            fOut.print(",");
            fOut.print(locator.getUtf16Offset());
            Node node = locator.getRelatedNode();
            if (node != null) {
                fOut.print("[");
                fOut.print(node.getNodeName());
                fOut.print("]");
            }
            String systemId = locator.getUri();
            if (systemId != null) {
                int index = systemId.lastIndexOf('/');
                if (index != -1)
                    systemId = systemId.substring(index + 1);
                fOut.print(": ");
                fOut.print(systemId);
            }

        }

        fOut.print(":");
        fOut.print(error.getMessage());
        fOut.println();
        fOut.flush();

    }
项目:openjdk9    文件:DOMErrorImpl.java   
/**
 * The location of the error.
 */

public DOMLocator getLocation() {
    return fLocator;
}
项目:openjdk9    文件:DOMErrorHandlerWrapper.java   
/** Prints the error message. */

    private void printError(DOMError error) {
        int severity = error.getSeverity();
        fOut.print("[");
        if ( severity == DOMError.SEVERITY_WARNING) {
            fOut.print("Warning");
        } else if ( severity == DOMError.SEVERITY_ERROR) {
            fOut.print("Error");
        } else {
            fOut.print("FatalError");
            eStatus = false ; //REVISIT: Abort processing if fatal error, do we need to??
        }
        fOut.print("] ");
        DOMLocator locator = error.getLocation();
        if (locator != null) {
            fOut.print(locator.getLineNumber());
            fOut.print(":");
            fOut.print(locator.getColumnNumber());
            fOut.print(":");
            fOut.print(locator.getByteOffset());
            fOut.print(",");
            fOut.print(locator.getUtf16Offset());
            Node node = locator.getRelatedNode();
            if (node != null) {
                fOut.print("[");
                fOut.print(node.getNodeName());
                fOut.print("]");
            }
            String systemId = locator.getUri();
            if (systemId != null) {
                int index = systemId.lastIndexOf('/');
                if (index != -1)
                    systemId = systemId.substring(index + 1);
                fOut.print(": ");
                fOut.print(systemId);
            }

        }

        fOut.print(":");
        fOut.print(error.getMessage());
        fOut.println();
        fOut.flush();

    }
项目:Push2Display    文件:AbstractDocument.java   
public DOMLocator getLocation() {
    if (domLocator == null) {
        domLocator = new ErrorLocation(relatedNode);
    }
    return domLocator;
}
项目:lookaside_java-1.8.0-openjdk    文件:DOMErrorImpl.java   
/**
 * The location of the error.
 */

public DOMLocator getLocation() {
    return fLocator;
}
项目:lookaside_java-1.8.0-openjdk    文件:DOMErrorHandlerWrapper.java   
/** Prints the error message. */

    private void printError(DOMError error) {
        int severity = error.getSeverity();
        fOut.print("[");
        if ( severity == DOMError.SEVERITY_WARNING) {
            fOut.print("Warning");
        } else if ( severity == DOMError.SEVERITY_ERROR) {
            fOut.print("Error");
        } else {
            fOut.print("FatalError");
            eStatus = false ; //REVISIT: Abort processing if fatal error, do we need to??
        }
        fOut.print("] ");
        DOMLocator locator = error.getLocation();
        if (locator != null) {
            fOut.print(locator.getLineNumber());
            fOut.print(":");
            fOut.print(locator.getColumnNumber());
            fOut.print(":");
            fOut.print(locator.getByteOffset());
            fOut.print(",");
            fOut.print(locator.getUtf16Offset());
            Node node = locator.getRelatedNode();
            if (node != null) {
                fOut.print("[");
                fOut.print(node.getNodeName());
                fOut.print("]");
            }
            String systemId = locator.getUri();
            if (systemId != null) {
                int index = systemId.lastIndexOf('/');
                if (index != -1)
                    systemId = systemId.substring(index + 1);
                fOut.print(": ");
                fOut.print(systemId);
            }

        }

        fOut.print(":");
        fOut.print(error.getMessage());
        fOut.println();
        fOut.flush();

    }
项目:agui_framework    文件:DOMErrorImpl.java   
public DOMLocator getLocation() {
    return NULL_DOM_LOCATOR;
}
项目:j2objc    文件:DOMErrorImpl.java   
public DOMLocator getLocation() {
    return NULL_DOM_LOCATOR;
}
项目:Push2Display    文件:AbstractDocument.java   
public DOMLocator getLocation() {
    if (domLocator == null) {
        domLocator = new ErrorLocation(relatedNode);
    }
    return domLocator;
}
项目:infobip-open-jdk-8    文件:DOMErrorImpl.java   
/**
 * The location of the error.
 */

public DOMLocator getLocation() {
    return fLocator;
}
项目:infobip-open-jdk-8    文件:DOMErrorHandlerWrapper.java   
/** Prints the error message. */

    private void printError(DOMError error) {
        int severity = error.getSeverity();
        fOut.print("[");
        if ( severity == DOMError.SEVERITY_WARNING) {
            fOut.print("Warning");
        } else if ( severity == DOMError.SEVERITY_ERROR) {
            fOut.print("Error");
        } else {
            fOut.print("FatalError");
            eStatus = false ; //REVISIT: Abort processing if fatal error, do we need to??
        }
        fOut.print("] ");
        DOMLocator locator = error.getLocation();
        if (locator != null) {
            fOut.print(locator.getLineNumber());
            fOut.print(":");
            fOut.print(locator.getColumnNumber());
            fOut.print(":");
            fOut.print(locator.getByteOffset());
            fOut.print(",");
            fOut.print(locator.getUtf16Offset());
            Node node = locator.getRelatedNode();
            if (node != null) {
                fOut.print("[");
                fOut.print(node.getNodeName());
                fOut.print("]");
            }
            String systemId = locator.getUri();
            if (systemId != null) {
                int index = systemId.lastIndexOf('/');
                if (index != -1)
                    systemId = systemId.substring(index + 1);
                fOut.print(": ");
                fOut.print(systemId);
            }

        }

        fOut.print(":");
        fOut.print(error.getMessage());
        fOut.println();
        fOut.flush();

    }
项目:feathers-sdk    文件:AbstractDocument.java   
public DOMLocator getLocation() {
    if (domLocator == null) {
        domLocator = new ErrorLocation(relatedNode);
    }
    return domLocator;
}
项目:In-the-Box-Fork    文件:DOMErrorImpl.java   
public final DOMLocator getLocation() {
  return location;
}
项目:OLD-OpenJDK8    文件:DOMErrorImpl.java   
/**
 * The location of the error.
 */

public DOMLocator getLocation() {
    return fLocator;
}
项目:OLD-OpenJDK8    文件:DOMErrorHandlerWrapper.java   
/** Prints the error message. */

    private void printError(DOMError error) {
        int severity = error.getSeverity();
        fOut.print("[");
        if ( severity == DOMError.SEVERITY_WARNING) {
            fOut.print("Warning");
        } else if ( severity == DOMError.SEVERITY_ERROR) {
            fOut.print("Error");
        } else {
            fOut.print("FatalError");
            eStatus = false ; //REVISIT: Abort processing if fatal error, do we need to??
        }
        fOut.print("] ");
        DOMLocator locator = error.getLocation();
        if (locator != null) {
            fOut.print(locator.getLineNumber());
            fOut.print(":");
            fOut.print(locator.getColumnNumber());
            fOut.print(":");
            fOut.print(locator.getByteOffset());
            fOut.print(",");
            fOut.print(locator.getUtf16Offset());
            Node node = locator.getRelatedNode();
            if (node != null) {
                fOut.print("[");
                fOut.print(node.getNodeName());
                fOut.print("]");
            }
            String systemId = locator.getUri();
            if (systemId != null) {
                int index = systemId.lastIndexOf('/');
                if (index != -1)
                    systemId = systemId.substring(index + 1);
                fOut.print(": ");
                fOut.print(systemId);
            }

        }

        fOut.print(":");
        fOut.print(error.getMessage());
        fOut.println();
        fOut.flush();

    }
项目:SplitCharater    文件:DOMErrorImpl.java   
/**
 * The location of the error.
 */

public DOMLocator getLocation() {
    return fLocator;
}
项目:SplitCharater    文件:DOMErrorHandlerWrapper.java   
/** Prints the error message. */

    private void printError(DOMError error) {
        int severity = error.getSeverity();
        fOut.print("[");
        if ( severity == DOMError.SEVERITY_WARNING) {
            fOut.print("Warning");
        } else if ( severity == DOMError.SEVERITY_ERROR) {
            fOut.print("Error");
        } else {
            fOut.print("FatalError");
            eStatus = false ; //REVISIT: Abort processing if fatal error, do we need to??
        }
        fOut.print("] ");
        DOMLocator locator = error.getLocation();
        if (locator != null) {
            fOut.print(locator.getLineNumber());
            fOut.print(":");
            fOut.print(locator.getColumnNumber());
            fOut.print(":");
            fOut.print(locator.getByteOffset());
            fOut.print(",");            
            fOut.print(locator.getUtf16Offset());
            Node node = locator.getRelatedNode();
            if (node != null) {
                fOut.print("[");
                fOut.print(node.getNodeName());
                fOut.print("]");
            }
            String systemId = locator.getUri();
            if (systemId != null) {
                int index = systemId.lastIndexOf('/');
                if (index != -1)
                    systemId = systemId.substring(index + 1);
                fOut.print(": ");
                fOut.print(systemId);
            }

        }

        fOut.print(":");
        fOut.print(error.getMessage());
        fOut.println();
        fOut.flush();

    }
项目:openjdk-icedtea7    文件:DOMErrorImpl.java   
/**
 * The location of the error.
 */

public DOMLocator getLocation() {
    return fLocator;
}
项目:openjdk-icedtea7    文件:DOMErrorHandlerWrapper.java   
/** Prints the error message. */

    private void printError(DOMError error) {
        int severity = error.getSeverity();
        fOut.print("[");
        if ( severity == DOMError.SEVERITY_WARNING) {
            fOut.print("Warning");
        } else if ( severity == DOMError.SEVERITY_ERROR) {
            fOut.print("Error");
        } else {
            fOut.print("FatalError");
            eStatus = false ; //REVISIT: Abort processing if fatal error, do we need to??
        }
        fOut.print("] ");
        DOMLocator locator = error.getLocation();
        if (locator != null) {
            fOut.print(locator.getLineNumber());
            fOut.print(":");
            fOut.print(locator.getColumnNumber());
            fOut.print(":");
            fOut.print(locator.getByteOffset());
            fOut.print(",");
            fOut.print(locator.getUtf16Offset());
            Node node = locator.getRelatedNode();
            if (node != null) {
                fOut.print("[");
                fOut.print(node.getNodeName());
                fOut.print("]");
            }
            String systemId = locator.getUri();
            if (systemId != null) {
                int index = systemId.lastIndexOf('/');
                if (index != -1)
                    systemId = systemId.substring(index + 1);
                fOut.print(": ");
                fOut.print(systemId);
            }

        }

        fOut.print(":");
        fOut.print(error.getMessage());
        fOut.println();
        fOut.flush();

    }
项目:openjdk-jdk10    文件:DOMErrorImpl.java   
/**
 * The location of the DOMError.
 *
 * @return A DOMLocator object containing the DOMError location.
 */
public DOMLocator getLocation() {
    return fLocation;
}
项目:openjdk9    文件:DOMErrorImpl.java   
/**
 * The location of the DOMError.
 *
 * @return A DOMLocator object containing the DOMError location.
 */
public DOMLocator getLocation() {
    return fLocation;
}
项目:In-the-Box-Fork    文件:DOMErrorImpl.java   
/**
 * The location of the DOMError.
 * 
 * @return A DOMLocator object containing the DOMError location.
 */
public DOMLocator getLocation() {
    return fLocation;
}