com.sun.xml.xsom.util
Class NameGetter

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

public class NameGetter
extends java.lang.Object
implements XSFunction<java.lang.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(java.util.Locale _locale)
          Initializes a NameGetter so that it will return messages in the specified locale.
 
Method Summary
 java.lang.String annotation(XSAnnotation ann)
           
 java.lang.String attGroupDecl(XSAttGroupDecl decl)
           
 java.lang.String attributeDecl(XSAttributeDecl decl)
           
 java.lang.String attributeUse(XSAttributeUse use)
           
 java.lang.String complexType(XSComplexType type)
           
 java.lang.String elementDecl(XSElementDecl decl)
           
 java.lang.String empty(XSContentType empty)
           
 java.lang.String facet(XSFacet facet)
           
static java.lang.String get(XSComponent comp)
          Gets the name of the specified component in the default locale.
 java.lang.String identityConstraint(XSIdentityConstraint decl)
           
 java.lang.String modelGroup(XSModelGroup group)
           
 java.lang.String modelGroupDecl(XSModelGroupDecl decl)
           
 java.lang.String notation(XSNotation n)
           
 java.lang.String particle(XSParticle particle)
           
 java.lang.String schema(XSSchema schema)
           
 java.lang.String simpleType(XSSimpleType simpleType)
           
 java.lang.String wildcard(XSWildcard wc)
           
 java.lang.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(java.util.Locale _locale)
Initializes a NameGetter so that it will return messages in the specified locale.

Method Detail

get

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


annotation

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

attGroupDecl

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

attributeUse

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

attributeDecl

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

complexType

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

schema

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

facet

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

simpleType

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

particle

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

empty

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

wildcard

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

modelGroupDecl

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

modelGroup

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

elementDecl

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

notation

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

identityConstraint

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

xpath

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


Copyright © 2005-2013 Oracle Corporation. All Rights Reserved.