Ejemplo n.º 1
0
 /**
  * Returns true if this Simpletype has a specified Facet with the given name.
  *
  * @param name the name of the Facet to look for
  * @return true if this Simpletype has a specified Facet with the given name
  */
 public boolean hasFacet(String name) {
   if (name == null) return false;
   for (int i = 0; i < facets.size(); i++) {
     Facet facet = (Facet) facets.get(i);
     if (name.equals(facet.getName())) return true;
   }
   return false;
 } // -- hasFacet
Ejemplo n.º 2
0
  /**
   * Adds the given Facet to this Simpletype.
   *
   * @param facet the Facet to add to this Simpletype
   */
  public void addFacet(Facet facet) {

    if (facet == null) return;

    String name = facet.getName();

    if (name == null) return;

    facets.add(facet);
  } // -- addFacet
Ejemplo n.º 3
0
 /** Returns the facets of this type (without the parent's facets) */
 public Enumeration getLocalFacets() {
   if (facets == null) return null;
   return facets.enumerate();
 }