code
stringlengths 11
173k
| docstring
stringlengths 2
593k
| func_name
stringlengths 2
189
| language
stringclasses 1
value | repo
stringclasses 844
values | path
stringlengths 11
294
| url
stringlengths 60
339
| license
stringclasses 4
values |
---|---|---|---|---|---|---|---|
static Object createObject(String factoryId,
String propertiesFilename,
String fallbackClassName)
throws ConfigurationError
{
Class factoryClass = lookUpFactoryClass(factoryId,
propertiesFilename,
fallbackClassName);
if (factoryClass == null) {
throw new ConfigurationError(
"Provider for " + factoryId + " cannot be found", null);
}
try{
Object instance = factoryClass.newInstance();
debugPrintln("created new instance of factory " + factoryId);
return instance;
} catch (Exception x) {
throw new ConfigurationError(
"Provider for factory " + factoryId
+ " could not be instantiated: " + x, x);
}
} // createObject(String,String,String):Object |
Finds the implementation Class object in the specified order. The
specified order is the following:
<ol>
<li>query the system property using <code>System.getProperty</code>
<li>read <code>$java.home/lib/<i>propertiesFilename</i></code> file
<li>read <code>META-INF/services/<i>factoryId</i></code> file
<li>use fallback classname
</ol>
@return instance of factory, never null
@param factoryId Name of the factory to find, same as
a property name
@param propertiesFilename The filename in the $java.home/lib directory
of the properties file. If none specified,
${java.home}/lib/xalan.properties will be used.
@param fallbackClassName Implementation class name, if nothing else
is found. Use null to mean no fallback.
@exception ObjectFactory.ConfigurationError
| ObjectFactory::createObject | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ObjectFactory.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ObjectFactory.java | Apache-2.0 |
static Class lookUpFactoryClass(String factoryId)
throws ConfigurationError
{
return lookUpFactoryClass(factoryId, null, null);
} // lookUpFactoryClass(String):Class |
Finds the implementation Class object in the specified order. The
specified order is the following:
<ol>
<li>query the system property using <code>System.getProperty</code>
<li>read <code>$java.home/lib/<i>propertiesFilename</i></code> file
<li>read <code>META-INF/services/<i>factoryId</i></code> file
<li>use fallback classname
</ol>
@return Class object of factory, never null
@param factoryId Name of the factory to find, same as
a property name
@param propertiesFilename The filename in the $java.home/lib directory
of the properties file. If none specified,
${java.home}/lib/xalan.properties will be used.
@param fallbackClassName Implementation class name, if nothing else
is found. Use null to mean no fallback.
@exception ObjectFactory.ConfigurationError
| ObjectFactory::lookUpFactoryClass | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ObjectFactory.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ObjectFactory.java | Apache-2.0 |
static Class lookUpFactoryClass(String factoryId,
String propertiesFilename,
String fallbackClassName)
throws ConfigurationError
{
String factoryClassName = lookUpFactoryClassName(factoryId,
propertiesFilename,
fallbackClassName);
ClassLoader cl = findClassLoader();
if (factoryClassName == null) {
factoryClassName = fallbackClassName;
}
// assert(className != null);
try{
Class providerClass = findProviderClass(factoryClassName,
cl,
true);
debugPrintln("created new instance of " + providerClass +
" using ClassLoader: " + cl);
return providerClass;
} catch (ClassNotFoundException x) {
throw new ConfigurationError(
"Provider " + factoryClassName + " not found", x);
} catch (Exception x) {
throw new ConfigurationError(
"Provider "+factoryClassName+" could not be instantiated: "+x,
x);
}
} // lookUpFactoryClass(String,String,String):Class |
Finds the implementation Class object in the specified order. The
specified order is the following:
<ol>
<li>query the system property using <code>System.getProperty</code>
<li>read <code>$java.home/lib/<i>propertiesFilename</i></code> file
<li>read <code>META-INF/services/<i>factoryId</i></code> file
<li>use fallback classname
</ol>
@return Class object that provides factory service, never null
@param factoryId Name of the factory to find, same as
a property name
@param propertiesFilename The filename in the $java.home/lib directory
of the properties file. If none specified,
${java.home}/lib/xalan.properties will be used.
@param fallbackClassName Implementation class name, if nothing else
is found. Use null to mean no fallback.
@exception ObjectFactory.ConfigurationError
| ObjectFactory::lookUpFactoryClass | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ObjectFactory.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ObjectFactory.java | Apache-2.0 |
private static void debugPrintln(String msg) {
if (DEBUG) {
System.err.println("JAXP: " + msg);
}
} // debugPrintln(String) |
Finds the name of the required implementation class in the specified
order. The specified order is the following:
<ol>
<li>query the system property using <code>System.getProperty</code>
<li>read <code>$java.home/lib/<i>propertiesFilename</i></code> file
<li>read <code>META-INF/services/<i>factoryId</i></code> file
<li>use fallback classname
</ol>
@return name of class that provides factory service, never null
@param factoryId Name of the factory to find, same as
a property name
@param propertiesFilename The filename in the $java.home/lib directory
of the properties file. If none specified,
${java.home}/lib/xalan.properties will be used.
@param fallbackClassName Implementation class name, if nothing else
is found. Use null to mean no fallback.
@exception ObjectFactory.ConfigurationError
static String lookUpFactoryClassName(String factoryId,
String propertiesFilename,
String fallbackClassName)
{
SecuritySupport ss = SecuritySupport.getInstance();
// Use the system property first
try {
String systemProp = ss.getSystemProperty(factoryId);
if (systemProp != null) {
debugPrintln("found system property, value=" + systemProp);
return systemProp;
}
} catch (SecurityException se) {
// Ignore and continue w/ next location
}
// Try to read from propertiesFilename, or
// $java.home/lib/xalan.properties
String factoryClassName = null;
// no properties file name specified; use
// $JAVA_HOME/lib/xalan.properties:
if (propertiesFilename == null) {
File propertiesFile = null;
boolean propertiesFileExists = false;
try {
String javah = ss.getSystemProperty("java.home");
propertiesFilename = javah + File.separator +
"lib" + File.separator + DEFAULT_PROPERTIES_FILENAME;
propertiesFile = new File(propertiesFilename);
propertiesFileExists = ss.getFileExists(propertiesFile);
} catch (SecurityException e) {
// try again...
fLastModified = -1;
fXalanProperties = null;
}
synchronized (ObjectFactory.class) {
boolean loadProperties = false;
FileInputStream fis = null;
try {
// file existed last time
if(fLastModified >= 0) {
if(propertiesFileExists &&
(fLastModified < (fLastModified = ss.getLastModified(propertiesFile)))) {
loadProperties = true;
} else {
// file has stopped existing...
if(!propertiesFileExists) {
fLastModified = -1;
fXalanProperties = null;
} // else, file wasn't modified!
}
} else {
// file has started to exist:
if(propertiesFileExists) {
loadProperties = true;
fLastModified = ss.getLastModified(propertiesFile);
} // else, nothing's changed
}
if(loadProperties) {
// must never have attempted to read xalan.properties
// before (or it's outdeated)
fXalanProperties = new Properties();
fis = ss.getFileInputStream(propertiesFile);
fXalanProperties.load(fis);
}
} catch (Exception x) {
fXalanProperties = null;
fLastModified = -1;
// assert(x instanceof FileNotFoundException
// || x instanceof SecurityException)
// In both cases, ignore and continue w/ next location
}
finally {
// try to close the input stream if one was opened.
if (fis != null) {
try {
fis.close();
}
// Ignore the exception.
catch (IOException exc) {}
}
}
}
if(fXalanProperties != null) {
factoryClassName = fXalanProperties.getProperty(factoryId);
}
} else {
FileInputStream fis = null;
try {
fis = ss.getFileInputStream(new File(propertiesFilename));
Properties props = new Properties();
props.load(fis);
factoryClassName = props.getProperty(factoryId);
} catch (Exception x) {
// assert(x instanceof FileNotFoundException
// || x instanceof SecurityException)
// In both cases, ignore and continue w/ next location
}
finally {
// try to close the input stream if one was opened.
if (fis != null) {
try {
fis.close();
}
// Ignore the exception.
catch (IOException exc) {}
}
}
}
if (factoryClassName != null) {
debugPrintln("found in " + propertiesFilename + ", value="
+ factoryClassName);
return factoryClassName;
}
// Try Jar Service Provider Mechanism
return findJarServiceProviderName(factoryId);
} // lookUpFactoryClass(String,String):String
//
// Private static methods
//
/** Prints a message to standard error if debugging is enabled. | ObjectFactory::debugPrintln | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ObjectFactory.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ObjectFactory.java | Apache-2.0 |
static Object newInstance(String className, ClassLoader cl,
boolean doFallback)
throws ConfigurationError
{
// assert(className != null);
try{
Class providerClass = findProviderClass(className, cl, doFallback);
Object instance = providerClass.newInstance();
debugPrintln("created new instance of " + providerClass +
" using ClassLoader: " + cl);
return instance;
} catch (ClassNotFoundException x) {
throw new ConfigurationError(
"Provider " + className + " not found", x);
} catch (Exception x) {
throw new ConfigurationError(
"Provider " + className + " could not be instantiated: " + x,
x);
}
} |
Create an instance of a class using the specified ClassLoader
| ObjectFactory::newInstance | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ObjectFactory.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ObjectFactory.java | Apache-2.0 |
ConfigurationError(String msg, Exception x) {
super(msg);
this.exception = x;
} // <init>(String,Exception) |
Construct a new instance with the specified detail string and
exception.
| ConfigurationError::ConfigurationError | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ObjectFactory.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ObjectFactory.java | Apache-2.0 |
Exception getException() {
return exception;
} // getException():Exception |
Construct a new instance with the specified detail string and
exception.
ConfigurationError(String msg, Exception x) {
super(msg);
this.exception = x;
} // <init>(String,Exception)
//
// Public methods
//
/** Returns the exception associated to this error. | ConfigurationError::getException | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ObjectFactory.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ObjectFactory.java | Apache-2.0 |
protected DTMManager(){} |
Default constructor is protected on purpose.
| DTMManager::DTMManager | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMManager.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMManager.java | Apache-2.0 |
public XMLStringFactory getXMLStringFactory()
{
return m_xsf;
} |
Get the XMLStringFactory used for the DTMs.
@return a valid XMLStringFactory object, or null if it hasn't been set yet.
| DTMManager::getXMLStringFactory | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMManager.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMManager.java | Apache-2.0 |
public void setXMLStringFactory(XMLStringFactory xsf)
{
m_xsf = xsf;
} |
Set the XMLStringFactory used for the DTMs.
@param xsf a valid XMLStringFactory object, should not be null.
| DTMManager::setXMLStringFactory | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMManager.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMManager.java | Apache-2.0 |
public static DTMManager newInstance(XMLStringFactory xsf)
throws DTMConfigurationException
{
DTMManager factoryImpl = null;
try
{
factoryImpl = (DTMManager) ObjectFactory
.createObject(defaultPropName, defaultClassName);
}
catch (ObjectFactory.ConfigurationError e)
{
throw new DTMConfigurationException(XMLMessages.createXMLMessage(
XMLErrorResources.ER_NO_DEFAULT_IMPL, null), e.getException());
//"No default implementation found");
}
if (factoryImpl == null)
{
throw new DTMConfigurationException(XMLMessages.createXMLMessage(
XMLErrorResources.ER_NO_DEFAULT_IMPL, null));
//"No default implementation found");
}
factoryImpl.setXMLStringFactory(xsf);
return factoryImpl;
} |
Obtain a new instance of a <code>DTMManager</code>.
This static method creates a new factory instance
This method uses the following ordered lookup procedure to determine
the <code>DTMManager</code> implementation class to
load:
<ul>
<li>
Use the <code>org.apache.xml.dtm.DTMManager</code> system
property.
</li>
<li>
Use the JAVA_HOME(the parent directory where jdk is
installed)/lib/xalan.properties for a property file that contains the
name of the implementation class keyed on the same value as the
system property defined above.
</li>
<li>
Use the Services API (as detailed in the JAR specification), if
available, to determine the classname. The Services API will look
for a classname in the file
<code>META-INF/services/org.apache.xml.dtm.DTMManager</code>
in jars available to the runtime.
</li>
<li>
Use the default <code>DTMManager</code> classname, which is
<code>org.apache.xml.dtm.ref.DTMManagerDefault</code>.
</li>
</ul>
Once an application has obtained a reference to a <code>
DTMManager</code> it can use the factory to configure
and obtain parser instances.
@return new DTMManager instance, never null.
@throws DTMConfigurationException
if the implementation is not available or cannot be instantiated.
| DTMManager::newInstance | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMManager.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMManager.java | Apache-2.0 |
public boolean getIncremental()
{
return m_incremental;
} |
Get a flag indicating whether an incremental transform is desired
@return incremental boolean.
| DTMManager::getIncremental | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMManager.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMManager.java | Apache-2.0 |
public void setIncremental(boolean incremental)
{
m_incremental = incremental;
} |
Set a flag indicating whether an incremental transform is desired
This flag should have the same value as the FEATURE_INCREMENTAL feature
which is set by the TransformerFactory.setAttribut() method before a
DTMManager is created
@param incremental boolean to use to set m_incremental.
| DTMManager::setIncremental | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMManager.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMManager.java | Apache-2.0 |
public boolean getSource_location()
{
return m_source_location;
} |
Get a flag indicating whether the transformation phase should
keep track of line and column numbers for the input source
document.
@return source location boolean
| DTMManager::getSource_location | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMManager.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMManager.java | Apache-2.0 |
public void setSource_location(boolean sourceLocation){
m_source_location = sourceLocation;
} |
Set a flag indicating whether the transformation phase should
keep track of line and column numbers for the input source
document.
This flag should have the same value as the FEATURE_SOURCE_LOCATION feature
which is set by the TransformerFactory.setAttribut() method before a
DTMManager is created
@param sourceLocation boolean to use to set m_source_location
| DTMManager::setSource_location | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMManager.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMManager.java | Apache-2.0 |
public int getDTMIdentityMask()
{
return IDENT_DTM_DEFAULT;
} |
%TBD% Doc
NEEDSDOC ($objectName$) @return
| DTMManager::getDTMIdentityMask | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMManager.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMManager.java | Apache-2.0 |
public int getNodeIdentityMask()
{
return IDENT_NODE_DEFAULT;
} |
%TBD% Doc
NEEDSDOC ($objectName$) @return
| DTMManager::getNodeIdentityMask | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMManager.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMManager.java | Apache-2.0 |
public SourceLocator getLocator() {
return locator;
} |
Method getLocator retrieves an instance of a SourceLocator
object that specifies where an error occured.
@return A SourceLocator object, or null if none was specified.
| DTMException::getLocator | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMException.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMException.java | Apache-2.0 |
public void setLocator(SourceLocator location) {
locator = location;
} |
Method setLocator sets an instance of a SourceLocator
object that specifies where an error occured.
@param location A SourceLocator object, or null to clear the location.
| DTMException::setLocator | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMException.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMException.java | Apache-2.0 |
public Throwable getException() {
return containedException;
} |
This method retrieves an exception that this exception wraps.
@return An Throwable object, or null.
@see #getCause
| DTMException::getException | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMException.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMException.java | Apache-2.0 |
public Throwable getCause() {
return ((containedException == this)
? null
: containedException);
} |
Returns the cause of this throwable or <code>null</code> if the
cause is nonexistent or unknown. (The cause is the throwable that
caused this throwable to get thrown.)
| DTMException::getCause | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMException.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMException.java | Apache-2.0 |
public synchronized Throwable initCause(Throwable cause) {
if ((this.containedException == null) && (cause != null)) {
throw new IllegalStateException(XMLMessages.createXMLMessage(XMLErrorResources.ER_CANNOT_OVERWRITE_CAUSE, null)); //"Can't overwrite cause");
}
if (cause == this) {
throw new IllegalArgumentException(
XMLMessages.createXMLMessage(XMLErrorResources.ER_SELF_CAUSATION_NOT_PERMITTED, null)); //"Self-causation not permitted");
}
this.containedException = cause;
return this;
} |
Initializes the <i>cause</i> of this throwable to the specified value.
(The cause is the throwable that caused this throwable to get thrown.)
<p>This method can be called at most once. It is generally called from
within the constructor, or immediately after creating the
throwable. If this throwable was created
with {@link #DTMException(Throwable)} or
{@link #DTMException(String,Throwable)}, this method cannot be called
even once.
@param cause the cause (which is saved for later retrieval by the
{@link #getCause()} method). (A <tt>null</tt> value is
permitted, and indicates that the cause is nonexistent or
unknown.)
@return a reference to this <code>Throwable</code> instance.
@throws IllegalArgumentException if <code>cause</code> is this
throwable. (A throwable cannot
be its own cause.)
@throws IllegalStateException if this throwable was
created with {@link #DTMException(Throwable)} or
{@link #DTMException(String,Throwable)}, or this method has already
been called on this throwable.
| DTMException::initCause | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMException.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMException.java | Apache-2.0 |
public DTMException(String message) {
super(message);
this.containedException = null;
this.locator = null;
} |
Create a new DTMException.
@param message The error or warning message.
| DTMException::DTMException | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMException.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMException.java | Apache-2.0 |
public DTMException(Throwable e) {
super(e.getMessage());
this.containedException = e;
this.locator = null;
} |
Create a new DTMException wrapping an existing exception.
@param e The exception to be wrapped.
| DTMException::DTMException | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMException.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMException.java | Apache-2.0 |
public DTMException(String message, Throwable e) {
super(((message == null) || (message.length() == 0))
? e.getMessage()
: message);
this.containedException = e;
this.locator = null;
} |
Wrap an existing exception in a DTMException.
<p>This is used for throwing processor exceptions before
the processing has started.</p>
@param message The error or warning message, or null to
use the message from the embedded exception.
@param e Any exception
| DTMException::DTMException | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMException.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMException.java | Apache-2.0 |
public DTMException(String message, SourceLocator locator) {
super(message);
this.containedException = null;
this.locator = locator;
} |
Create a new DTMException from a message and a Locator.
<p>This constructor is especially useful when an application is
creating its own exception from within a DocumentHandler
callback.</p>
@param message The error or warning message.
@param locator The locator object for the error or warning.
| DTMException::DTMException | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMException.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMException.java | Apache-2.0 |
public DTMException(String message, SourceLocator locator,
Throwable e) {
super(message);
this.containedException = e;
this.locator = locator;
} |
Wrap an existing exception in a DTMException.
@param message The error or warning message, or null to
use the message from the embedded exception.
@param locator The locator object for the error or warning.
@param e Any exception
| DTMException::DTMException | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMException.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMException.java | Apache-2.0 |
public String getMessageAndLocation() {
StringBuffer sbuffer = new StringBuffer();
String message = super.getMessage();
if (null != message) {
sbuffer.append(message);
}
if (null != locator) {
String systemID = locator.getSystemId();
int line = locator.getLineNumber();
int column = locator.getColumnNumber();
if (null != systemID) {
sbuffer.append("; SystemID: ");
sbuffer.append(systemID);
}
if (0 != line) {
sbuffer.append("; Line#: ");
sbuffer.append(line);
}
if (0 != column) {
sbuffer.append("; Column#: ");
sbuffer.append(column);
}
}
return sbuffer.toString();
} |
Get the error message with location information
appended.
| DTMException::getMessageAndLocation | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMException.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMException.java | Apache-2.0 |
public String getLocationAsString() {
if (null != locator) {
StringBuffer sbuffer = new StringBuffer();
String systemID = locator.getSystemId();
int line = locator.getLineNumber();
int column = locator.getColumnNumber();
if (null != systemID) {
sbuffer.append("; SystemID: ");
sbuffer.append(systemID);
}
if (0 != line) {
sbuffer.append("; Line#: ");
sbuffer.append(line);
}
if (0 != column) {
sbuffer.append("; Column#: ");
sbuffer.append(column);
}
return sbuffer.toString();
} else {
return null;
}
} |
Get the location information as a string.
@return A string with location info, or null
if there is no location information.
| DTMException::getLocationAsString | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMException.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMException.java | Apache-2.0 |
public void printStackTrace() {
printStackTrace(new java.io.PrintWriter(System.err, true));
} |
Print the the trace of methods from where the error
originated. This will trace all nested exception
objects, as well as this object.
| DTMException::printStackTrace | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMException.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMException.java | Apache-2.0 |
public void printStackTrace(java.io.PrintStream s) {
printStackTrace(new java.io.PrintWriter(s));
} |
Print the the trace of methods from where the error
originated. This will trace all nested exception
objects, as well as this object.
@param s The stream where the dump will be sent to.
| DTMException::printStackTrace | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMException.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMException.java | Apache-2.0 |
public void printStackTrace(java.io.PrintWriter s) {
if (s == null) {
s = new java.io.PrintWriter(System.err, true);
}
try {
String locInfo = getLocationAsString();
if (null != locInfo) {
s.println(locInfo);
}
super.printStackTrace(s);
} catch (Throwable e) {}
boolean isJdk14OrHigher = false;
try {
Throwable.class.getMethod("getCause", (Class<?>) null);
isJdk14OrHigher = true;
} catch (NoSuchMethodException nsme) {
// do nothing
}
// The printStackTrace method of the Throwable class in jdk 1.4
// and higher will include the cause when printing the backtrace.
// The following code is only required when using jdk 1.3 or lower
if (!isJdk14OrHigher) {
Throwable exception = getException();
for (int i = 0; (i < 10) && (null != exception); i++) {
s.println("---------");
try {
if (exception instanceof DTMException) {
String locInfo =
((DTMException) exception)
.getLocationAsString();
if (null != locInfo) {
s.println(locInfo);
}
}
exception.printStackTrace(s);
} catch (Throwable e) {
s.println("Could not print stack trace...");
}
try {
Method meth =
((Object) exception).getClass().getMethod("getException",
(Class<?>) null);
if (null != meth) {
Throwable prev = exception;
exception = (Throwable) meth.invoke(exception, (Class<?>) null);
if (prev == exception) {
break;
}
} else {
exception = null;
}
} catch (InvocationTargetException ite) {
exception = null;
} catch (IllegalAccessException iae) {
exception = null;
} catch (NoSuchMethodException nsme) {
exception = null;
}
}
}
} |
Print the the trace of methods from where the error
originated. This will trace all nested exception
objects, as well as this object.
@param s The writer where the dump will be sent to.
| DTMException::printStackTrace | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMException.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMException.java | Apache-2.0 |
public DTMDOMException(short code, String message)
{
super(code, message);
} |
Constructs a DOM/DTM exception.
@param code
@param message
| DTMDOMException::DTMDOMException | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMDOMException.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMDOMException.java | Apache-2.0 |
public DTMDOMException(short code)
{
super(code, "");
} |
Constructor DTMDOMException
@param code
| DTMDOMException::DTMDOMException | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMDOMException.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMDOMException.java | Apache-2.0 |
public DTMConfigurationException() {
super("Configuration Error");
} |
Create a new <code>DTMConfigurationException</code> with no
detail mesage.
| DTMConfigurationException::DTMConfigurationException | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMConfigurationException.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMConfigurationException.java | Apache-2.0 |
public DTMConfigurationException(String msg) {
super(msg);
} |
Create a new <code>DTMConfigurationException</code> with
the <code>String </code> specified as an error message.
@param msg The error message for the exception.
| DTMConfigurationException::DTMConfigurationException | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMConfigurationException.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMConfigurationException.java | Apache-2.0 |
public DTMConfigurationException(Throwable e) {
super(e);
} |
Create a new <code>DTMConfigurationException</code> with a
given <code>Exception</code> base cause of the error.
@param e The exception to be encapsulated in a
DTMConfigurationException.
| DTMConfigurationException::DTMConfigurationException | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMConfigurationException.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMConfigurationException.java | Apache-2.0 |
public DTMConfigurationException(String msg, Throwable e) {
super(msg, e);
} |
Create a new <code>DTMConfigurationException</code> with the
given <code>Exception</code> base cause and detail message.
@param msg The detail message.
@param e The exception to be wrapped in a DTMConfigurationException
| DTMConfigurationException::DTMConfigurationException | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMConfigurationException.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMConfigurationException.java | Apache-2.0 |
public DTMConfigurationException(String message,
SourceLocator locator) {
super(message, locator);
} |
Create a new DTMConfigurationException from a message and a Locator.
<p>This constructor is especially useful when an application is
creating its own exception from within a DocumentHandler
callback.</p>
@param message The error or warning message.
@param locator The locator object for the error or warning.
| DTMConfigurationException::DTMConfigurationException | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMConfigurationException.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMConfigurationException.java | Apache-2.0 |
public DTMConfigurationException(String message,
SourceLocator locator,
Throwable e) {
super(message, locator, e);
} |
Wrap an existing exception in a DTMConfigurationException.
@param message The error or warning message, or null to
use the message from the embedded exception.
@param locator The locator object for the error or warning.
@param e Any exception.
| DTMConfigurationException::DTMConfigurationException | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMConfigurationException.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/DTMConfigurationException.java | Apache-2.0 |
public DTMDefaultBaseTraversers(DTMManager mgr, Source source,
int dtmIdentity,
DTMWSFilter whiteSpaceFilter,
XMLStringFactory xstringfactory,
boolean doIndexing)
{
super(mgr, source, dtmIdentity, whiteSpaceFilter, xstringfactory,
doIndexing);
} |
Construct a DTMDefaultBaseTraversers object from a DOM node.
@param mgr The DTMManager who owns this DTM.
@param source The object that is used to specify the construction source.
@param dtmIdentity The DTM identity ID for this DTM.
@param whiteSpaceFilter The white space filter for this DTM, which may
be null.
@param xstringfactory The factory to use for creating XMLStrings.
@param doIndexing true if the caller considers it worth it to use
indexing schemes.
| DTMDefaultBaseTraversers::DTMDefaultBaseTraversers | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public DTMDefaultBaseTraversers(DTMManager mgr, Source source,
int dtmIdentity,
DTMWSFilter whiteSpaceFilter,
XMLStringFactory xstringfactory,
boolean doIndexing,
int blocksize,
boolean usePrevsib,
boolean newNameTable)
{
super(mgr, source, dtmIdentity, whiteSpaceFilter, xstringfactory,
doIndexing, blocksize, usePrevsib, newNameTable);
} |
Construct a DTMDefaultBaseTraversers object from a DOM node.
@param mgr The DTMManager who owns this DTM.
@param source The object that is used to specify the construction source.
@param dtmIdentity The DTM identity ID for this DTM.
@param whiteSpaceFilter The white space filter for this DTM, which may
be null.
@param xstringfactory The factory to use for creating XMLStrings.
@param doIndexing true if the caller considers it worth it to use
indexing schemes.
@param blocksize The block size of the DTM.
@param usePrevsib true if we want to build the previous sibling node array.
@param newNameTable true if we want to use a new ExpandedNameTable for this DTM.
| DTMDefaultBaseTraversers::DTMDefaultBaseTraversers | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public DTMAxisTraverser getAxisTraverser(final int axis)
{
DTMAxisTraverser traverser;
if (null == m_traversers) // Cache of stateless traversers for this DTM
{
m_traversers = new DTMAxisTraverser[Axis.getNamesLength()];
traverser = null;
}
else
{
traverser = m_traversers[axis]; // Share/reuse existing traverser
if (traverser != null)
return traverser;
}
switch (axis) // Generate new traverser
{
case Axis.ANCESTOR :
traverser = new AncestorTraverser();
break;
case Axis.ANCESTORORSELF :
traverser = new AncestorOrSelfTraverser();
break;
case Axis.ATTRIBUTE :
traverser = new AttributeTraverser();
break;
case Axis.CHILD :
traverser = new ChildTraverser();
break;
case Axis.DESCENDANT :
traverser = new DescendantTraverser();
break;
case Axis.DESCENDANTORSELF :
traverser = new DescendantOrSelfTraverser();
break;
case Axis.FOLLOWING :
traverser = new FollowingTraverser();
break;
case Axis.FOLLOWINGSIBLING :
traverser = new FollowingSiblingTraverser();
break;
case Axis.NAMESPACE :
traverser = new NamespaceTraverser();
break;
case Axis.NAMESPACEDECLS :
traverser = new NamespaceDeclsTraverser();
break;
case Axis.PARENT :
traverser = new ParentTraverser();
break;
case Axis.PRECEDING :
traverser = new PrecedingTraverser();
break;
case Axis.PRECEDINGSIBLING :
traverser = new PrecedingSiblingTraverser();
break;
case Axis.SELF :
traverser = new SelfTraverser();
break;
case Axis.ALL :
traverser = new AllFromRootTraverser();
break;
case Axis.ALLFROMNODE :
traverser = new AllFromNodeTraverser();
break;
case Axis.PRECEDINGANDANCESTOR :
traverser = new PrecedingAndAncestorTraverser();
break;
case Axis.DESCENDANTSFROMROOT :
traverser = new DescendantFromRootTraverser();
break;
case Axis.DESCENDANTSORSELFFROMROOT :
traverser = new DescendantOrSelfFromRootTraverser();
break;
case Axis.ROOT :
traverser = new RootTraverser();
break;
case Axis.FILTEREDLIST :
return null; // Don't want to throw an exception for this one.
default :
throw new DTMException(XMLMessages.createXMLMessage(XMLErrorResources.ER_UNKNOWN_AXIS_TYPE, new Object[]{Integer.toString(axis)})); //"Unknown axis traversal type: "+axis);
}
if (null == traverser)
throw new DTMException(XMLMessages.createXMLMessage(XMLErrorResources.ER_AXIS_TRAVERSER_NOT_SUPPORTED, new Object[]{Axis.getNames(axis)}));
// "Axis traverser not supported: "
// + Axis.names[axis]);
m_traversers[axis] = traverser;
return traverser;
} |
This returns a stateless "traverser", that can navigate
over an XPath axis, though perhaps not in document order.
@param axis One of Axes.ANCESTORORSELF, etc.
@return A DTMAxisTraverser, or null if the given axis isn't supported.
| DTMDefaultBaseTraversers::getAxisTraverser | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int next(int context, int current)
{
return getParent(current);
} |
Traverse to the next node after the current node.
@param context The context node if this iteration.
@param current The current node of the iteration.
@return the next node in the iteration, or DTM.NULL.
| AncestorTraverser::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int next(int context, int current, int expandedTypeID)
{
// Process using identities
current = makeNodeIdentity(current);
while (DTM.NULL != (current = m_parent.elementAt(current)))
{
if (m_exptype.elementAt(current) == expandedTypeID)
return makeNodeHandle(current);
}
return NULL;
} |
Traverse to the next node after the current node that is matched
by the expanded type ID.
@param context The context node of this iteration.
@param current The current node of the iteration.
@param expandedTypeID The expanded type ID that must match.
@return the next node in the iteration, or DTM.NULL.
| AncestorTraverser::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int first(int context)
{
return context;
} |
By the nature of the stateless traversal, the context node can not be
returned or the iteration will go into an infinate loop. To see if
the self node should be processed, use this function.
@param context The context node of this traversal.
@return the first node in the traversal.
| AncestorOrSelfTraverser::first | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int first(int context, int expandedTypeID)
{
return (getExpandedTypeID(context) == expandedTypeID)
? context : next(context, context, expandedTypeID);
} |
By the nature of the stateless traversal, the context node can not be
returned or the iteration will go into an infinate loop. To see if
the self node should be processed, use this function. If the context
node does not match the expanded type ID, this function will return
false.
@param context The context node of this traversal.
@param expandedTypeID The expanded type ID that must match.
@return the first node in the traversal.
| AncestorOrSelfTraverser::first | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int next(int context, int current)
{
return (context == current)
? getFirstAttribute(context) : getNextAttribute(current);
} |
Traverse to the next node after the current node.
@param context The context node of this iteration.
@param current The current node of the iteration.
@return the next node in the iteration, or DTM.NULL.
| AttributeTraverser::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int next(int context, int current, int expandedTypeID)
{
current = (context == current)
? getFirstAttribute(context) : getNextAttribute(current);
do
{
if (getExpandedTypeID(current) == expandedTypeID)
return current;
}
while (DTM.NULL != (current = getNextAttribute(current)));
return NULL;
} |
Traverse to the next node after the current node that is matched
by the expanded type ID.
@param context The context node of this iteration.
@param current The current node of the iteration.
@param expandedTypeID The expanded type ID that must match.
@return the next node in the iteration, or DTM.NULL.
| AttributeTraverser::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
protected int getNextIndexed(int axisRoot, int nextPotential,
int expandedTypeID)
{
int nsIndex = m_expandedNameTable.getNamespaceID(expandedTypeID);
int lnIndex = m_expandedNameTable.getLocalNameID(expandedTypeID);
for (; ; )
{
int nextID = findElementFromIndex(nsIndex, lnIndex, nextPotential);
if (NOTPROCESSED != nextID)
{
int parentID = m_parent.elementAt(nextID);
// Is it a child?
if(parentID == axisRoot)
return nextID;
// If the parent occured before the subtree root, then
// we know it is past the child axis.
if(parentID < axisRoot)
return NULL;
// Otherwise, it could be a descendant below the subtree root
// children, or it could be after the subtree root. So we have
// to climb up until the parent is less than the subtree root, in
// which case we return NULL, or until it is equal to the subtree
// root, in which case we continue to look.
do
{
parentID = m_parent.elementAt(parentID);
if(parentID < axisRoot)
return NULL;
}
while(parentID > axisRoot);
// System.out.println("Found node via index: "+first);
nextPotential = nextID+1;
continue;
}
nextNode();
if(!(m_nextsib.elementAt(axisRoot) == NOTPROCESSED))
break;
}
return DTM.NULL;
} |
Get the next indexed node that matches the expanded type ID. Before
calling this function, one should first call
{@link #isIndexed(int) isIndexed} to make sure that the index can
contain nodes that match the given expanded type ID.
@param axisRoot The root identity of the axis.
@param nextPotential The node found must match or occur after this node.
@param expandedTypeID The expanded type ID for the request.
@return The node ID or NULL if not found.
| ChildTraverser::getNextIndexed | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int first(int context)
{
return getFirstChild(context);
} |
By the nature of the stateless traversal, the context node can not be
returned or the iteration will go into an infinate loop. So to traverse
an axis, the first function must be used to get the first node.
<p>This method needs to be overloaded only by those axis that process
the self node. <\p>
@param context The context node of this traversal. This is the point
that the traversal starts from.
@return the first node in the traversal.
| ChildTraverser::first | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int first(int context, int expandedTypeID)
{
if(true)
{
int identity = makeNodeIdentity(context);
int firstMatch = getNextIndexed(identity, _firstch(identity),
expandedTypeID);
return makeNodeHandle(firstMatch);
}
else
{
// %REVIEW% Dead code. Eliminate?
for (int current = _firstch(makeNodeIdentity(context));
DTM.NULL != current;
current = _nextsib(current))
{
if (m_exptype.elementAt(current) == expandedTypeID)
return makeNodeHandle(current);
}
return NULL;
}
} |
By the nature of the stateless traversal, the context node can not be
returned or the iteration will go into an infinate loop. So to traverse
an axis, the first function must be used to get the first node.
<p>This method needs to be overloaded only by those axis that process
the self node. <\p>
@param context The context node of this traversal. This is the point
of origin for the traversal -- its "root node" or starting point.
@param expandedTypeID The expanded type ID that must match.
@return the first node in the traversal.
| ChildTraverser::first | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int next(int context, int current)
{
return getNextSibling(current);
} |
Traverse to the next node after the current node.
@param context The context node of this iteration.
@param current The current node of the iteration.
@return the next node in the iteration, or DTM.NULL.
| ChildTraverser::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int next(int context, int current, int expandedTypeID)
{
// Process in Identifier space
for (current = _nextsib(makeNodeIdentity(current));
DTM.NULL != current;
current = _nextsib(current))
{
if (m_exptype.elementAt(current) == expandedTypeID)
return makeNodeHandle(current);
}
return NULL;
} |
Traverse to the next node after the current node that is matched
by the expanded type ID.
@param context The context node of this iteration.
@param current The current node of the iteration.
@param expandedTypeID The expanded type ID that must match.
@return the next node in the iteration, or DTM.NULL.
| ChildTraverser::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
protected final boolean isIndexed(int expandedTypeID)
{
return (m_indexing
&& ExpandedNameTable.ELEMENT
== m_expandedNameTable.getType(expandedTypeID));
} |
Tell if the indexing is on and the given expanded type ID matches
what is in the indexes. Derived classes should call this before
calling {@link #getNextIndexed(int, int, int) getNextIndexed} method.
@param expandedTypeID The expanded type ID being requested.
@return true if it is OK to call the
{@link #getNextIndexed(int, int, int) getNextIndexed} method.
| IndexedDTMAxisTraverser::isIndexed | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
protected int getNextIndexed(int axisRoot, int nextPotential,
int expandedTypeID)
{
int nsIndex = m_expandedNameTable.getNamespaceID(expandedTypeID);
int lnIndex = m_expandedNameTable.getLocalNameID(expandedTypeID);
while(true)
{
int next = findElementFromIndex(nsIndex, lnIndex, nextPotential);
if (NOTPROCESSED != next)
{
if (isAfterAxis(axisRoot, next))
return NULL;
// System.out.println("Found node via index: "+first);
return next;
}
else if(axisHasBeenProcessed(axisRoot))
break;
nextNode();
}
return DTM.NULL;
} |
Get the next indexed node that matches the expanded type ID. Before
calling this function, one should first call
{@link #isIndexed(int) isIndexed} to make sure that the index can
contain nodes that match the given expanded type ID.
@param axisRoot The root identity of the axis.
@param nextPotential The node found must match or occur after this node.
@param expandedTypeID The expanded type ID for the request.
@return The node ID or NULL if not found.
| IndexedDTMAxisTraverser::getNextIndexed | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
protected int getFirstPotential(int identity)
{
return identity + 1;
} |
Get the first potential identity that can be returned. This should
be overridded by classes that need to return the self node.
@param identity The node identity of the root context of the traversal.
@return The first potential node that can be in the traversal.
| DescendantTraverser::getFirstPotential | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
protected boolean axisHasBeenProcessed(int axisRoot)
{
return !(m_nextsib.elementAt(axisRoot) == NOTPROCESSED);
} |
Tell if the axis has been fully processed to tell if a the wait for
an arriving node should terminate.
@param axisRoot The root identity of the axis.
@return true if the axis has been fully processed.
| DescendantTraverser::axisHasBeenProcessed | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
protected int getSubtreeRoot(int handle)
{
return makeNodeIdentity(handle);
} |
Get the subtree root identity from the handle that was passed in by
the caller. Derived classes may override this to change the root
context of the traversal.
@param handle handle to the root context.
@return identity of the root of the subtree.
| DescendantTraverser::getSubtreeRoot | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
protected boolean isDescendant(int subtreeRootIdentity, int identity)
{
return _parent(identity) >= subtreeRootIdentity;
} |
Tell if this node identity is a descendant. Assumes that
the node info for the element has already been obtained.
%REVIEW% This is really parentFollowsRootInDocumentOrder ...
which fails if the parent starts after the root ends.
May be sufficient for this class's logic, but misleadingly named!
@param subtreeRootIdentity The root context of the subtree in question.
@param identity The index number of the node in question.
@return true if the index is a descendant of _startNode.
| DescendantTraverser::isDescendant | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
protected boolean isAfterAxis(int axisRoot, int identity)
{
// %REVIEW% Is there *any* cheaper way to do this?
// Yes. In ID space, compare to axisRoot's successor
// (next-sib or ancestor's-next-sib). Probably shallower search.
do
{
if(identity == axisRoot)
return false;
identity = m_parent.elementAt(identity);
}
while(identity >= axisRoot);
return true;
} |
Tell if a node is outside the axis being traversed. This method must be
implemented by derived classes, and must be robust enough to handle any
node that occurs after the axis root.
@param axisRoot The root identity of the axis.
@param identity The node in question.
@return true if the given node falls outside the axis being traversed.
| DescendantTraverser::isAfterAxis | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int first(int context, int expandedTypeID)
{
if (isIndexed(expandedTypeID))
{
int identity = getSubtreeRoot(context);
int firstPotential = getFirstPotential(identity);
return makeNodeHandle(getNextIndexed(identity, firstPotential, expandedTypeID));
}
return next(context, context, expandedTypeID);
} |
By the nature of the stateless traversal, the context node can not be
returned or the iteration will go into an infinate loop. So to traverse
an axis, the first function must be used to get the first node.
<p>This method needs to be overloaded only by those axis that process
the self node. <\p>
@param context The context node of this traversal. This is the point
of origin for the traversal -- its "root node" or starting point.
@param expandedTypeID The expanded type ID that must match.
@return the first node in the traversal.
| DescendantTraverser::first | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int next(int context, int current)
{
int subtreeRootIdent = getSubtreeRoot(context);
for (current = makeNodeIdentity(current) + 1; ; current++)
{
int type = _type(current); // may call nextNode()
if (!isDescendant(subtreeRootIdent, current))
return NULL;
if (ATTRIBUTE_NODE == type || NAMESPACE_NODE == type)
continue;
return makeNodeHandle(current); // make handle.
}
} |
Traverse to the next node after the current node.
@param context The context node of this iteration.
@param current The current node of the iteration.
@return the next node in the iteration, or DTM.NULL.
| DescendantTraverser::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int next(int context, int current, int expandedTypeID)
{
int subtreeRootIdent = getSubtreeRoot(context);
current = makeNodeIdentity(current) + 1;
if (isIndexed(expandedTypeID))
{
return makeNodeHandle(getNextIndexed(subtreeRootIdent, current, expandedTypeID));
}
for (; ; current++)
{
int exptype = _exptype(current); // may call nextNode()
if (!isDescendant(subtreeRootIdent, current))
return NULL;
if (exptype != expandedTypeID)
continue;
return makeNodeHandle(current); // make handle.
}
} |
Traverse to the next node after the current node that is matched
by the expanded type ID.
@param context The context node of this iteration.
@param current The current node of the iteration.
@param expandedTypeID The expanded type ID that must match.
@return the next node in the iteration, or DTM.NULL.
| DescendantTraverser::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
protected int getFirstPotential(int identity)
{
return identity;
} |
Get the first potential identity that can be returned, which is the
axis context, in this case.
@param identity The node identity of the root context of the traversal.
@return The axis context.
| DescendantOrSelfTraverser::getFirstPotential | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int first(int context)
{
return context;
} |
By the nature of the stateless traversal, the context node can not be
returned or the iteration will go into an infinate loop. To see if
the self node should be processed, use this function.
@param context The context node of this traversal.
@return the first node in the traversal.
| DescendantOrSelfTraverser::first | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int next(int context, int current)
{
int subtreeRootIdent = makeNodeIdentity(context);
for (current = makeNodeIdentity(current) + 1; ; current++)
{
// Trickological code: _exptype() has the side-effect of
// running nextNode until the specified node has been loaded,
// and thus can be used to ensure that incremental construction of
// the DTM has gotten this far. Using it just for that side-effect
// is quite a kluge...
_exptype(current); // make sure it's here.
if (!isDescendant(subtreeRootIdent, current))
return NULL;
return makeNodeHandle(current); // make handle.
}
} |
Traverse to the next node after the current node.
@param context The context node of this iteration.
@param current The current node of the iteration.
@return the next node in the iteration, or DTM.NULL.
| AllFromNodeTraverser::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int first(int context)
{
// Compute in ID space
context=makeNodeIdentity(context);
int first;
int type = _type(context);
if ((DTM.ATTRIBUTE_NODE == type) || (DTM.NAMESPACE_NODE == type))
{
context = _parent(context);
first = _firstch(context);
if (NULL != first)
return makeNodeHandle(first);
}
do
{
first = _nextsib(context);
if (NULL == first)
context = _parent(context);
}
while (NULL == first && NULL != context);
return makeNodeHandle(first);
} |
Get the first of the following.
@param context The context node of this traversal. This is the point
that the traversal starts from.
@return the first node in the traversal.
| FollowingTraverser::first | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int first(int context, int expandedTypeID)
{
// %REVIEW% This looks like it might want shift into identity space
// to avoid repeated conversion in the individual functions
int first;
int type = getNodeType(context);
if ((DTM.ATTRIBUTE_NODE == type) || (DTM.NAMESPACE_NODE == type))
{
context = getParent(context);
first = getFirstChild(context);
if (NULL != first)
{
if (getExpandedTypeID(first) == expandedTypeID)
return first;
else
return next(context, first, expandedTypeID);
}
}
do
{
first = getNextSibling(context);
if (NULL == first)
context = getParent(context);
else
{
if (getExpandedTypeID(first) == expandedTypeID)
return first;
else
return next(context, first, expandedTypeID);
}
}
while (NULL == first && NULL != context);
return first;
} |
Get the first of the following.
@param context The context node of this traversal. This is the point
of origin for the traversal -- its "root node" or starting point.
@param expandedTypeID The expanded type ID that must match.
@return the first node in the traversal.
| FollowingTraverser::first | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int next(int context, int current)
{
// Compute in identity space
current=makeNodeIdentity(current);
while (true)
{
current++; // Only works on IDs, not handles.
// %REVIEW% Are we using handles or indexes?
int type = _type(current); // may call nextNode()
if (NULL == type)
return NULL;
if (ATTRIBUTE_NODE == type || NAMESPACE_NODE == type)
continue;
return makeNodeHandle(current); // make handle.
}
} |
Traverse to the next node after the current node.
@param context The context node of this iteration.
@param current The current node of the iteration.
@return the next node in the iteration, or DTM.NULL.
| FollowingTraverser::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int next(int context, int current, int expandedTypeID)
{
// Compute in ID space
current=makeNodeIdentity(current);
while (true)
{
current++;
int etype = _exptype(current); // may call nextNode()
if (NULL == etype)
return NULL;
if (etype != expandedTypeID)
continue;
return makeNodeHandle(current); // make handle.
}
} |
Traverse to the next node after the current node that is matched
by the expanded type ID.
@param context The context node of this iteration.
@param current The current node of the iteration.
@param expandedTypeID The expanded type ID that must match.
@return the next node in the iteration, or DTM.NULL.
| FollowingTraverser::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int next(int context, int current)
{
return getNextSibling(current);
} |
Traverse to the next node after the current node.
@param context The context node of this iteration.
@param current The current node of the iteration.
@return the next node in the iteration, or DTM.NULL.
| FollowingSiblingTraverser::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int next(int context, int current, int expandedTypeID)
{
while (DTM.NULL != (current = getNextSibling(current)))
{
if (getExpandedTypeID(current) == expandedTypeID)
return current;
}
return NULL;
} |
Traverse to the next node after the current node that is matched
by the expanded type ID.
@param context The context node of this iteration.
@param current The current node of the iteration.
@param expandedTypeID The expanded type ID that must match.
@return the next node in the iteration, or DTM.NULL.
| FollowingSiblingTraverser::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int next(int context, int current)
{
return (context == current)
? getFirstNamespaceNode(context, false)
: getNextNamespaceNode(context, current, false);
} |
Traverse to the next node after the current node.
@param context The context node of this iteration.
@param current The current node of the iteration.
@return the next node in the iteration, or DTM.NULL.
| NamespaceDeclsTraverser::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int next(int context, int current, int expandedTypeID)
{
current = (context == current)
? getFirstNamespaceNode(context, false)
: getNextNamespaceNode(context, current, false);
do
{
if (getExpandedTypeID(current) == expandedTypeID)
return current;
}
while (DTM.NULL
!= (current = getNextNamespaceNode(context, current, false)));
return NULL;
} |
Traverse to the next node after the current node that is matched
by the expanded type ID.
@param context The context node of this iteration.
@param current The current node of the iteration.
@param expandedTypeID The expanded type ID that must match.
@return the next node in the iteration, or DTM.NULL.
| NamespaceDeclsTraverser::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int next(int context, int current)
{
return (context == current)
? getFirstNamespaceNode(context, true)
: getNextNamespaceNode(context, current, true);
} |
Traverse to the next node after the current node.
@param context The context node of this iteration.
@param current The current node of the iteration.
@return the next node in the iteration, or DTM.NULL.
| NamespaceTraverser::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int next(int context, int current, int expandedTypeID)
{
current = (context == current)
? getFirstNamespaceNode(context, true)
: getNextNamespaceNode(context, current, true);
do
{
if (getExpandedTypeID(current) == expandedTypeID)
return current;
}
while (DTM.NULL
!= (current = getNextNamespaceNode(context, current, true)));
return NULL;
} |
Traverse to the next node after the current node that is matched
by the expanded type ID.
@param context The context node of this iteration.
@param current The current node of the iteration.
@param expandedTypeID The expanded type ID that must match.
@return the next node in the iteration, or DTM.NULL.
| NamespaceTraverser::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int first(int context)
{
return getParent(context);
} |
By the nature of the stateless traversal, the context node can not be
returned or the iteration will go into an infinate loop. So to traverse
an axis, the first function must be used to get the first node.
<p>This method needs to be overloaded only by those axis that process
the self node. <\p>
@param context The context node of this traversal. This is the point
that the traversal starts from.
@return the first node in the traversal.
| ParentTraverser::first | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int first(int current, int expandedTypeID)
{
// Compute in ID space
current = makeNodeIdentity(current);
while (NULL != (current = m_parent.elementAt(current)))
{
if (m_exptype.elementAt(current) == expandedTypeID)
return makeNodeHandle(current);
}
return NULL;
} |
By the nature of the stateless traversal, the context node can not be
returned or the iteration will go into an infinate loop. So to traverse
an axis, the first function must be used to get the first node.
<p>This method needs to be overloaded only by those axis that process
the self node. <\p>
@param context The context node of this traversal. This is the point
of origin for the traversal -- its "root node" or starting point.
@param expandedTypeID The expanded type ID that must match.
@return the first node in the traversal.
| ParentTraverser::first | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int next(int context, int current)
{
return NULL;
} |
Traverse to the next node after the current node.
@param context The context node of this iteration.
@param current The current node of the iteration.
@return the next node in the iteration, or DTM.NULL.
| ParentTraverser::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int next(int context, int current, int expandedTypeID)
{
return NULL;
} |
Traverse to the next node after the current node that is matched
by the expanded type ID.
@param context The context node of this iteration.
@param current The current node of the iteration.
@param expandedTypeID The expanded type ID that must match.
@return the next node in the iteration, or DTM.NULL.
| ParentTraverser::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
protected boolean isAncestor(int contextIdent, int currentIdent)
{
// %REVIEW% See comments in IsAfterAxis; using the "successor" of
// contextIdent is probably more efficient.
for (contextIdent = m_parent.elementAt(contextIdent); DTM.NULL != contextIdent;
contextIdent = m_parent.elementAt(contextIdent))
{
if (contextIdent == currentIdent)
return true;
}
return false;
} |
Tell if the current identity is an ancestor of the context identity.
This is an expensive operation, made worse by the stateless traversal.
But the preceding axis is used fairly infrequently.
@param contextIdent The context node of the axis traversal.
@param currentIdent The node in question.
@return true if the currentIdent node is an ancestor of contextIdent.
| PrecedingTraverser::isAncestor | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int next(int context, int current)
{
// compute in ID space
int subtreeRootIdent = makeNodeIdentity(context);
for (current = makeNodeIdentity(current) - 1; current >= 0; current--)
{
short type = _type(current);
if (ATTRIBUTE_NODE == type || NAMESPACE_NODE == type
|| isAncestor(subtreeRootIdent, current))
continue;
return makeNodeHandle(current); // make handle.
}
return NULL;
} |
Traverse to the next node after the current node.
@param context The context node of this iteration.
@param current The current node of the iteration.
@return the next node in the iteration, or DTM.NULL.
| PrecedingTraverser::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int next(int context, int current, int expandedTypeID)
{
// Compute in ID space
int subtreeRootIdent = makeNodeIdentity(context);
for (current = makeNodeIdentity(current) - 1; current >= 0; current--)
{
int exptype = m_exptype.elementAt(current);
if (exptype != expandedTypeID
|| isAncestor(subtreeRootIdent, current))
continue;
return makeNodeHandle(current); // make handle.
}
return NULL;
} |
Traverse to the next node after the current node that is matched
by the expanded type ID.
@param context The context node of this iteration.
@param current The current node of the iteration.
@param expandedTypeID The expanded type ID that must match.
@return the next node in the iteration, or DTM.NULL.
| PrecedingTraverser::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int next(int context, int current)
{
// Compute in ID space
int subtreeRootIdent = makeNodeIdentity(context );
for (current = makeNodeIdentity(current) - 1; current >= 0; current--)
{
short type = _type(current);
if (ATTRIBUTE_NODE == type || NAMESPACE_NODE == type)
continue;
return makeNodeHandle(current); // make handle.
}
return NULL;
} |
Traverse to the next node after the current node.
@param context The context node of this iteration.
@param current The current node of the iteration.
@return the next node in the iteration, or DTM.NULL.
| PrecedingAndAncestorTraverser::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int next(int context, int current, int expandedTypeID)
{
// Compute in ID space
int subtreeRootIdent = makeNodeIdentity(context);
for (current = makeNodeIdentity(current) - 1; current >= 0; current--)
{
int exptype = m_exptype.elementAt(current);
if (exptype != expandedTypeID)
continue;
return makeNodeHandle(current); // make handle.
}
return NULL;
} |
Traverse to the next node after the current node that is matched
by the expanded type ID.
@param context The context node of this iteration.
@param current The current node of the iteration.
@param expandedTypeID The expanded type ID that must match.
@return the next node in the iteration, or DTM.NULL.
| PrecedingAndAncestorTraverser::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int next(int context, int current)
{
return getPreviousSibling(current);
} |
Traverse to the next node after the current node.
@param context The context node of this iteration.
@param current The current node of the iteration.
@return the next node in the iteration, or DTM.NULL.
| PrecedingSiblingTraverser::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int next(int context, int current, int expandedTypeID)
{
while (DTM.NULL != (current = getPreviousSibling(current)))
{
if (getExpandedTypeID(current) == expandedTypeID)
return current;
}
return NULL;
} |
Traverse to the next node after the current node that is matched
by the expanded type ID.
@param context The context node of this iteration.
@param current The current node of the iteration.
@param expandedTypeID The expanded type ID that must match.
@return the next node in the iteration, or DTM.NULL.
| PrecedingSiblingTraverser::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int first(int context)
{
return context;
} |
By the nature of the stateless traversal, the context node can not be
returned or the iteration will go into an infinate loop. To see if
the self node should be processed, use this function.
@param context The context node of this traversal.
@return the first node in the traversal.
| SelfTraverser::first | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int first(int context, int expandedTypeID)
{
return (getExpandedTypeID(context) == expandedTypeID) ? context : NULL;
} |
By the nature of the stateless traversal, the context node can not be
returned or the iteration will go into an infinate loop. To see if
the self node should be processed, use this function. If the context
node does not match the expanded type ID, this function will return
false.
@param context The context node of this traversal.
@param expandedTypeID The expanded type ID that must match.
@return the first node in the traversal.
| SelfTraverser::first | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int next(int context, int current)
{
return NULL;
} |
Traverse to the next node after the current node.
@param context The context node of this iteration.
@param current The current node of the iteration.
@return Always return NULL for this axis.
| SelfTraverser::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int next(int context, int current, int expandedTypeID)
{
return NULL;
} |
Traverse to the next node after the current node that is matched
by the expanded type ID.
@param context The context node of this iteration.
@param current The current node of the iteration.
@param expandedTypeID The expanded type ID that must match.
@return the next node in the iteration, or DTM.NULL.
| SelfTraverser::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int first(int context)
{
return getDocumentRoot(context);
} |
Return the root.
@param context The context node of this traversal.
@return the first node in the traversal.
| AllFromRootTraverser::first | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int first(int context, int expandedTypeID)
{
return (getExpandedTypeID(getDocumentRoot(context)) == expandedTypeID)
? context : next(context, context, expandedTypeID);
} |
Return the root if it matches the expanded type ID.
@param context The context node of this traversal.
@param expandedTypeID The expanded type ID that must match.
@return the first node in the traversal.
| AllFromRootTraverser::first | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int next(int context, int current)
{
// Compute in ID space
int subtreeRootIdent = makeNodeIdentity(context);
for (current = makeNodeIdentity(current) + 1; ; current++)
{
// Kluge test: Just make sure +1 yielded a real node
int type = _type(current); // may call nextNode()
if (type == NULL)
return NULL;
return makeNodeHandle(current); // make handle.
}
} |
Traverse to the next node after the current node.
@param context The context node of this iteration.
@param current The current node of the iteration.
@return the next node in the iteration, or DTM.NULL.
| AllFromRootTraverser::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int next(int context, int current, int expandedTypeID)
{
// Compute in ID space
int subtreeRootIdent = makeNodeIdentity(context);
for (current = makeNodeIdentity(current) + 1; ; current++)
{
int exptype = _exptype(current); // may call nextNode()
if (exptype == NULL)
return NULL;
if (exptype != expandedTypeID)
continue;
return makeNodeHandle(current); // make handle.
}
} |
Traverse to the next node after the current node that is matched
by the expanded type ID.
@param context The context node of this iteration.
@param current The current node of the iteration.
@param expandedTypeID The expanded type ID that must match.
@return the next node in the iteration, or DTM.NULL.
| AllFromRootTraverser::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int first(int context, int expandedTypeID)
{
int root=getDocumentRoot(context);
return (getExpandedTypeID(root) == expandedTypeID)
? root : NULL;
} |
Return the root if it matches the expanded type ID,
else return null (nothing found)
@param context The context node of this traversal.
@param expandedTypeID The expanded type ID that must match.
@return the first node in the traversal.
| RootTraverser::first | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int next(int context, int current)
{
return NULL;
} |
Traverse to the next node after the current node.
@param context The context node of this iteration.
@param current The current node of the iteration.
@return Always return NULL for this axis.
| RootTraverser::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
public int next(int context, int current, int expandedTypeID)
{
return NULL;
} |
Traverse to the next node after the current node that is matched
by the expanded type ID.
@param context The context node of this iteration.
@param current The current node of the iteration.
@param expandedTypeID The expanded type ID that must match.
@return the next node in the iteration, or DTM.NULL.
| RootTraverser::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
protected int getFirstPotential(int identity)
{
return identity;
} |
Get the first potential identity that can be returned, which is the axis
root context in this case.
@param identity The node identity of the root context of the traversal.
@return The identity argument.
| DescendantOrSelfFromRootTraverser::getFirstPotential | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | Apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.