public interface Schema extends AnnotationHolder, Locatable
This is very much provisional; in the future will be more control for validation (i.e,
controlling the number of occurances), and support for analogs of W3C SChema sequence and choice.
The excess flexibility here forces some validation into element objects (the objects created from
the Rule
s within the
ElementModel
s).
Modifier and Type | Method and Description |
---|---|
boolean |
canInstancesBeKeyed()
Returns true if Elements conforming to this Schema can be indexed using a key.
|
Module |
getDefiningModule()
Return the Module in which the Schema was defined.
|
java.util.List |
getElementModel()
Returns a List of
ElementModel , identifing the elements which may be enclosed by the
modeled element. |
java.lang.String |
getId()
Returns the (unqualified) id of this schema.
|
boolean |
visibleToModule(java.lang.String moduleId)
Returns true if the schema is visible to the specified module, false otherwise.
|
getAnnotation, setAnnotation
getLocation
java.lang.String getId()
java.util.List getElementModel()
ElementModel
, identifing the elements which may be enclosed by the
modeled element.
The returned list is unmodifiabled and may be empty, but won't be null.
boolean canInstancesBeKeyed()
top-level ElementModel
must define a non-null
key attribute
.boolean visibleToModule(java.lang.String moduleId)
Module getDefiningModule()