Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.acs.damsel.srvr.schema
Class Schema  view Schema download Schema.java

java.lang.Object
  extended byorg.acs.damsel.srvr.schema.Schema
All Implemented Interfaces:
java.io.Serializable

public class Schema
extends java.lang.Object
implements java.io.Serializable

Title: Schema

Description: Schema holds a name for the schema (i.e., "Dublin Core", "Realia", etc) and a list of MetaDataTags that compose the Schema. Random access to tags is provided by isInSchema() and getTag(), sequential access by using the Iterator from tagsIterator(). Like MetaDataTags, Schemas are uniquely identified by name, even if their other properties are different.

Version:
1.0

Field Summary
private  java.lang.String groupName
           
private static org.apache.log4j.Logger log
           
private  java.lang.String name
           
private  java.lang.String ownerName
           
private  java.lang.String permissionID
           
private  java.util.Vector tags
           
 
Constructor Summary
Schema()
          Default constructor.
 
Method Summary
 void addTag(MetaDataTag tag)
          Method adds a MetaDataTag to the schema.
 boolean equals(java.lang.Object sch)
          Determine whether this Object is semantically equal to another Object.
 java.lang.String getGroupName()
           
 java.lang.String getName()
           
 java.lang.String getOwnerName()
           
 java.lang.String getPermissionID()
           
 MetaDataTag getTag(java.lang.String tagName)
          Method returns the MetaDataTag with the given name.
 java.util.Vector getTags()
           
 boolean isEmpty()
          Method returns true if there are no tags in the schema, false otherwise
 boolean isInSchema(java.lang.String tagName)
          Method returns true if the specified metadata tag is included in the current schema object, false otherwise.
 void removeTag(java.lang.String tagName)
          Method removes a MetaDataTag from the schema.
 void setGroupName(java.lang.String groupName)
           
 void setName(java.lang.String name)
           
 void setOwnerName(java.lang.String ownerName)
           
 void setPermissionID(java.lang.String permissionID)
           
 void setTags(java.util.Vector tags)
           
 java.util.Iterator tagsIterator()
          Method returns an iterator of all tags in the schema.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tags

private java.util.Vector tags

name

private java.lang.String name

ownerName

private java.lang.String ownerName

permissionID

private java.lang.String permissionID

groupName

private java.lang.String groupName

log

private static org.apache.log4j.Logger log
Constructor Detail

Schema

public Schema()
Default constructor. Initializes the vector of schema tags.

Method Detail

addTag

public void addTag(MetaDataTag tag)
            throws SchemaException
Method adds a MetaDataTag to the schema. A SchemaException is thrown if a tag with the same name already exists in the Schema.


removeTag

public void removeTag(java.lang.String tagName)
               throws SchemaException
Method removes a MetaDataTag from the schema. A SchemaException is thrown if a tag with the same name does not exist in the Schema.


getTag

public MetaDataTag getTag(java.lang.String tagName)
                   throws SchemaException
Method returns the MetaDataTag with the given name. If no such MetaDataTag exists in the Schema, a SchemaException is thrown.


isInSchema

public boolean isInSchema(java.lang.String tagName)
Method returns true if the specified metadata tag is included in the current schema object, false otherwise.


isEmpty

public boolean isEmpty()
Method returns true if there are no tags in the schema, false otherwise


tagsIterator

public java.util.Iterator tagsIterator()
Method returns an iterator of all tags in the schema.


getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

equals

public boolean equals(java.lang.Object sch)
Description copied from class: java.lang.Object
Determine whether this Object is semantically equal to another Object.

There are some fairly strict requirements on this method which subclasses must follow:

  • It must be transitive. If a.equals(b) and b.equals(c), then a.equals(c) must be true as well.
  • It must be symmetric. a.equals(b) and b.equals(a) must have the same value.
  • It must be reflexive. a.equals(a) must always be true.
  • It must be consistent. Whichever value a.equals(b) returns on the first invocation must be the value returned on all later invocations.
  • a.equals(null) must be false.
  • It must be consistent with hashCode(). That is, a.equals(b) must imply a.hashCode() == b.hashCode(). The reverse is not true; two objects that are not equal may have the same hashcode, but that has the potential to harm hashing performance.

This is typically overridden to throw a java.lang.ClassCastException if the argument is not comparable to the class performing the comparison, but that is not a requirement. It is legal for a.equals(b) to be true even though a.getClass() != b.getClass(). Also, it is typical to never cause a java.lang.NullPointerException.

In general, the Collections API (java.util) use the equals method rather than the == operator to compare objects. However, java.util.IdentityHashMap is an exception to this rule, for its own good reasons.

The default implementation returns this == o.


getTags

public java.util.Vector getTags()

setTags

public void setTags(java.util.Vector tags)

getGroupName

public java.lang.String getGroupName()

setGroupName

public void setGroupName(java.lang.String groupName)

getOwnerName

public java.lang.String getOwnerName()

getPermissionID

public java.lang.String getPermissionID()

setOwnerName

public void setOwnerName(java.lang.String ownerName)

setPermissionID

public void setPermissionID(java.lang.String permissionID)