Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: /antelope/src/ise/antelope/common/builder/

antelope
Discussion topic

Back to topic list

CVS update: /antelope/src/ise/antelope/common/builder/

Author danson
Full name Dale Anson
Date 2004-03-21 18:42:38 PST
Message User: danson
Date: 04/03/21 18:42:38

Added:
 /antelope/src/ise/an​telope/common/builde​r/
  NodeAttribute.java

Log:
 added to project
 

File Changes:

Directory: /antelope/src/ise/an​telope/common/builde​r/
====================​====================​=============

File [added]: NodeAttribute.java
Url: http://antelope.tigr​is.org/source/browse​/antelope/src/ise/an​telope/common/builde​r/NodeAttribute.java​?rev=1.1&content​-type=text/vnd.viewc​vs-markup
Added lines: 62
---------------

package ise.antelope.common.builder;

import com.wutka.dtd.*;

public class NodeAttribute implements java.io.Serializable {
   private String name = "";
   private String[] items = null;
   private String decl; // DTDDecl.toString
   private String value = "";

   public NodeAttribute() {}

   public NodeAttribute( DTDAttribute da ) {
      name = new String( da.getName() );
      if ( name == null )
         name = "";
      Object type = da.getType();
      if ( type != null && ( type instanceof DTDEnumeration || type instanceof DTDNotationList ) ) {
         String[] i = ( ( DTDEnumeration ) type ).getItem();
         items = new String[ i.length ];
         System.arraycopy( i, 0, items, 0, i.length );
      }
      decl = new String( da.getDecl().toString() );
      if ( da.getDefaultValue() != null )
         value = new String( da.getDefaultValue() );

   }

   public String getName() {
      return name;
   }

   public void setName( String n ) {
      name = n;
   }

   public String getValue() {
      return value;
   }

   public void setValue( String v ) {
      value = v;
   }

   public String[] getItems() {
      return items;
   }

   public String getDecl() {
      return decl;
   }

   public boolean isRequired() {
      if ( decl == null )
         return false;
      return decl.equals( DTDDecl.REQUIRED.name );
   }
   public String toString() {
      return "NodeAttribute, name=" + name + ", value=" + value;
   }
}




--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: cvs-unsubscribe@ante​lope.tigris.org
For additional commands, e-mail: cvs-help at antelope dot tigris dot org

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

CVS update: /antelope/src/ise/antelope/common/builder/ danson Dale Anson 2004-03-21 18:42:38 PST
Messages per page: