/** * 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
/** * 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
/** Returns the facets of this type (without the parent's facets) */ public Enumeration getLocalFacets() { if (facets == null) return null; return facets.enumerate(); }