- /**
- * QName Constructor.
- *
- * @param namespace
- * the namespace assigned to the YANG module
- * @param revision
- * the revision of the YANG module
- * @param localName
- * YANG schema identifier
- */
- public QName(final URI namespace, final Date revision, final String localName) {
- this(namespace, revision, null, localName);
- }
-
- public QName(final QName base, final String localName) {
- this(base.getNamespace(), base.getRevision(), base.getPrefix(), localName);
- }
-
- /**
- * @deprecated Use {@link #create(String)} instead.
- * This implementation is broken.
- */
- @Deprecated
- public QName(final String input) throws ParseException {
- Date revision = null;
- String nsAndRev = input.substring(input.indexOf("(") + 1, input.indexOf(")"));
- if (nsAndRev.contains("?")) {
- String[] splitted = nsAndRev.split("\\?");
- this.namespace = URI.create(splitted[0]);
- revision = getRevisionFormat().parse(splitted[1]);
- } else {
- this.namespace = URI.create(nsAndRev);
- }
-
- this.localName = checkLocalName(input.substring(input.indexOf(")") + 1));
- this.revision = revision;
- this.prefix = null;
- if (revision != null) {
- this.formattedRevision = getRevisionFormat().format(revision);
- } else {
- this.formattedRevision = null;
- }
- }
-