|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.esdihumboldt.hale.common.schema.model.impl.AbstractDefinition<C>
C
- the supported constraint typepublic abstract class AbstractDefinition<C>
Basic definition implementation to be subclassed
Field Summary | |
---|---|
protected QName |
name
The qualified definition name |
Constructor Summary | |
---|---|
AbstractDefinition(QName name)
Creates a new definition with the given name. |
Method Summary | ||
---|---|---|
int |
compareTo(Definition<?> other)
|
|
boolean |
equals(Object obj)
Two definitions are equal if their name is equal (namespace and local part) |
|
|
getConstraint(Class<T> constraintType)
Get the constraint with the given constraint type. Should usually not be called while creating the model, exceptions can be getting mutable constraints where this is intended. |
|
String |
getDescription()
Get the definition description |
|
String |
getDisplayName()
Returns the local part of the qualified name. |
|
String |
getIdentifier()
Get the definitions identifier |
|
protected
|
getInheritedConstraint(Class<T> constraintType)
Get the inherited constraint of the given constraint type. This implementation returns null , as inheritance is not
supported generally for definitions. |
|
URI |
getLocation()
Get the location |
|
QName |
getName()
Get the definition's qualified name |
|
boolean |
hasConstraint(Class<? extends C> constraintType)
Determines if the constraint with the given type is set explicitly for the definition. |
|
int |
hashCode()
|
|
void |
setConstraint(C constraint)
Set a constraint on the definition |
|
void |
setConstraintIfNotSet(C constraint)
Set a constraint on the definition if none of the same type has been set yet. |
|
void |
setDescription(String description)
Set the definition description |
|
void |
setLocation(URI location)
Set the definition location |
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final QName name
Constructor Detail |
---|
public AbstractDefinition(QName name)
name
- the qualified definition nameMethod Detail |
---|
public <T extends C> T getConstraint(Class<T> constraintType)
Definition
getConstraint
in interface Definition<C>
T
- the constraint typeconstraintType
- the constraint type, see Constraint
Definition.getConstraint(Class)
protected <T extends C> T getInheritedConstraint(Class<T> constraintType)
null
, as inheritance is not
supported generally for definitions.
constraintType
- the constraint type
null
if there is none or
inheritance is not allowedpublic boolean hasConstraint(Class<? extends C> constraintType)
constraintType
- the constraint type
public void setConstraint(C constraint)
constraint
- the constraint to setpublic void setConstraintIfNotSet(C constraint)
constraint
- the constraint to setpublic void setDescription(String description)
description
- the description to setpublic void setLocation(URI location)
location
- the location to setpublic URI getLocation()
Locatable
getLocation
in interface Locatable
null
Locatable.getLocation()
public String getDisplayName()
getDisplayName
in interface Definition<C>
Definition.getDisplayName()
public QName getName()
Definition
getName
in interface Definition<C>
Definition.getName()
public String getDescription()
Definition
getDescription
in interface Definition<C>
null
Definition.getDescription()
public int hashCode()
hashCode
in class Object
Object.hashCode()
public boolean equals(Object obj)
equals
in class Object
Object.equals(Object)
public int compareTo(Definition<?> other)
compareTo
in interface Comparable<Definition<?>>
Comparable.compareTo(Object)
public String getIdentifier()
Definition
getIdentifier
in interface Definition<C>
Definition.getIdentifier()
public String toString()
toString
in class Object
Object.toString()
|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |