[jbosstools-commits] JBoss Tools SVN: r17742 - trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Fri Sep 25 10:07:02 EDT 2009


Author: scabanovich
Date: 2009-09-25 10:07:01 -0400 (Fri, 25 Sep 2009)
New Revision: 17742

Added:
   trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/TaglibData.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4913


Added: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/TaglibData.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/TaglibData.java	                        (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/TaglibData.java	2009-09-25 14:07:01 UTC (rev 17742)
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/ 
+package org.jboss.tools.jst.web.tld;
+
+import java.util.Iterator;
+import java.util.List;
+
+public class TaglibData {
+	private int id;
+	private String uri;
+	private String prefix;
+	private boolean ns;
+
+	public TaglibData(int id, String uri, String prefix, boolean ns) {
+		this.id = id;
+		this.uri = uri;
+		this.prefix = prefix;
+		this.ns = ns;
+	}
+
+	public TaglibData(int id, String uri, String prefix) {
+		this.id = id;
+		this.uri = uri;
+		this.prefix = prefix;
+		this.ns = true;
+	}
+
+	public int getId() {
+		return id;
+	}
+
+	public String getUri() {
+		return uri;
+	}
+
+	public String getPrefix() {
+		return prefix;
+	}
+
+	public boolean isNs() {
+		return ns;
+	}
+
+	public boolean isEquals(TaglibData another) {
+		return this == another ||
+			uri.equals(another.getUri()) && prefix.equals(another.getPrefix());
+	}
+
+	public boolean inList(List taglibs) {
+		if (taglibs == null) {
+			return false;
+		}
+		Iterator iter = taglibs.iterator();
+		while (iter.hasNext()) {
+			if (isEquals((TaglibData)iter.next())) {
+				return true;
+			}
+		}
+		return false;
+	}
+}
\ No newline at end of file



More information about the jbosstools-commits mailing list