/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* This class represents a vertex in the adjacency list. A
* vertex in the builder's view is just a distinguished name
* in the directory. The Vertex contains a certificate
* along an attempted certification path, along with a pointer
* to a list of certificates that followed this one in various
* attempted certification paths.
*
* @author Sean Mullan
* @since 1.4
*/
public class Vertex {
private int index;
/**
* Constructor; creates vertex with index of -1
* Use setIndex method to set another index.
*
* @param cert Certificate associated with vertex
*/
this.index = -1;
}
/**
* return the certificate for this vertex
*
* @returns Certificate
*/
return cert;
}
/**
* get the index for this vertex, where the index is the row of the
* adjacency list that contains certificates that could follow this
* certificate.
*
* @returns int index for this vertex, or -1 if no following certificates.
*/
public int getIndex() {
return index;
}
/**
* set the index for this vertex, where the index is the row of the
* adjacency list that contains certificates that could follow this
* certificate.
*
* @param ndx int index for vertex, or -1 if no following certificates.
*/
}
/**
* return the throwable associated with this vertex;
* returns null if none.
*
* @returns Throwable
*/
return throwable;
}
/**
* set throwable associated with this vertex; default value is null.
*
* @param throwable Throwable associated with this vertex
* (or null)
*/
}
/**
* Return full string representation of vertex
*
* @returns String representation of vertex
*/
}
/**
* Return string representation of this vertex's
* certificate information.
*
* @returns String representation of certificate info
*/
return "Cert: Not an X509Certificate\n";
try {
} catch (CertificateException ce) {
}
return out;
}
}
}
}
}
try {
}
} catch (Exception e) {
e.printStackTrace();
}
}
try {
}
} catch (Exception e) {
e.printStackTrace();
}
}
return out;
}
/**
* return Vertex throwable as String compatible with
* the way toString returns other information
*
* @returns String form of exception (or "none")
*/
else
return out;
}
/**
* return Vertex index as String compatible with
* the way other Vertex.xToString() methods display
* information.
*
*/
return out;
}
/**
* return Vertex index as String compatible with
* the way other Vertex.xToString() methods displays other information.
*
* @returns String form of index as "Index: [numeric index]"
*/
return out;
}
}