com.sun.xml.xsom.util
Class NameGetter

java.lang.Object
  extended by com.sun.xml.xsom.util.NameGetter
All Implemented Interfaces:
XSContentTypeFunction<String>, XSFunction<String>, XSTermFunction<String>

public class NameGetter
extends Object
implements XSFunction<String>

Gets the human-readable name of a schema component.

This is a function object that returns String.

Author:
Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)

Field Summary
static XSFunction theInstance
          An instance that gets names in the default locale.
 
Constructor Summary
NameGetter(Locale _locale)
          Initializes a NameGetter so that it will return messages in the specified locale.
 
Method Summary
 String annotation(XSAnnotation ann)
           
 String attGroupDecl(XSAttGroupDecl decl)
           
 String attributeDecl(XSAttributeDecl decl)
           
 String attributeUse(XSAttributeUse use)
           
 String complexType(XSComplexType type)
           
 String elementDecl(XSElementDecl decl)
           
 String empty(XSContentType empty)
           
 String facet(XSFacet facet)
           
static String get(XSComponent comp)
          Gets the name of the specified component in the default locale.
 String identityConstraint(XSIdentityConstraint decl)
           
 String modelGroup(XSModelGroup group)
           
 String modelGroupDecl(XSModelGroupDecl decl)
           
 String notation(XSNotation n)
           
 String particle(XSParticle particle)
           
 String schema(XSSchema schema)
           
 String simpleType(XSSimpleType simpleType)
           
 String wildcard(XSWildcard wc)
           
 String xpath(XSXPath xpath)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theInstance

public static final XSFunction theInstance
An instance that gets names in the default locale. This instance is provided just for convenience.

Constructor Detail

NameGetter

public NameGetter(Locale _locale)
Initializes a NameGetter so that it will return messages in the specified locale.

Method Detail

get

public static String get(XSComponent comp)
Gets the name of the specified component in the default locale. This method is just a wrapper.


annotation

public String annotation(XSAnnotation ann)
Specified by:
annotation in interface XSFunction<String>

attGroupDecl

public String attGroupDecl(XSAttGroupDecl decl)
Specified by:
attGroupDecl in interface XSFunction<String>

attributeUse

public String attributeUse(XSAttributeUse use)
Specified by:
attributeUse in interface XSFunction<String>

attributeDecl

public String attributeDecl(XSAttributeDecl decl)
Specified by:
attributeDecl in interface XSFunction<String>

complexType

public String complexType(XSComplexType type)
Specified by:
complexType in interface XSFunction<String>

schema

public String schema(XSSchema schema)
Specified by:
schema in interface XSFunction<String>

facet

public String facet(XSFacet facet)
Specified by:
facet in interface XSFunction<String>

simpleType

public String simpleType(XSSimpleType simpleType)
Specified by:
simpleType in interface XSContentTypeFunction<String>

particle

public String particle(XSParticle particle)
Specified by:
particle in interface XSContentTypeFunction<String>

empty

public String empty(XSContentType empty)
Specified by:
empty in interface XSContentTypeFunction<String>

wildcard

public String wildcard(XSWildcard wc)
Specified by:
wildcard in interface XSTermFunction<String>

modelGroupDecl

public String modelGroupDecl(XSModelGroupDecl decl)
Specified by:
modelGroupDecl in interface XSTermFunction<String>

modelGroup

public String modelGroup(XSModelGroup group)
Specified by:
modelGroup in interface XSTermFunction<String>

elementDecl

public String elementDecl(XSElementDecl decl)
Specified by:
elementDecl in interface XSTermFunction<String>

notation

public String notation(XSNotation n)
Specified by:
notation in interface XSFunction<String>

identityConstraint

public String identityConstraint(XSIdentityConstraint decl)
Specified by:
identityConstraint in interface XSFunction<String>

xpath

public String xpath(XSXPath xpath)
Specified by:
xpath in interface XSFunction<String>


Copyright © 2012 Oracle. All Rights Reserved.