public class PrimitiveSchema extends TermSchema
Modifier and Type | Field and Description |
---|---|
static String |
BASE_NAME |
private static PrimitiveSchema |
baseSchema |
RESULT_SLOT_NAME
encodingByOrder, MANDATORY, OPTIONAL, UNLIMITED
Modifier | Constructor and Description |
---|---|
private |
PrimitiveSchema()
Construct a schema that vinculates an entity to be a generic
primitive element
|
|
PrimitiveSchema(String typeName)
Creates a
PrimitiveSchema with a given type-name. |
Modifier and Type | Method and Description |
---|---|
protected boolean |
descendsFrom(ObjectSchema s)
Return true if
- s is the base schema for the XXXSchema class this schema is
an instance of (e.g.
|
static ObjectSchema |
getBaseSchema()
Retrieve the generic base schema for all primitives.
|
boolean |
isAssignableFrom(ObjectSchema s)
This method checks whether or not an abstract object that is an instance
of schema s can be used in place of an abstract object that is an instance
of this schema.
|
AbsObject |
newInstance()
Creates an Abstract descriptor to hold a primitive of
the proper type.
|
void |
validate(AbsObject abs,
Ontology onto)
Check whether a given abstract descriptor complies with this
schema.
|
add, add, add, add, addFacet, addSuperSchema, containsSlot, equals, getAllFacets, getFacets, getNames, getOwnNames, getSchema, getSuperSchemas, getTypeName, isCompatibleWith, isMandatory, isOwnSlot, toString, validateSlots
getEncodingByOrder, setEncodingByOrder
public static final String BASE_NAME
private static PrimitiveSchema baseSchema
private PrimitiveSchema()
public PrimitiveSchema(String typeName)
PrimitiveSchema
with a given type-name.typeName
- The name of this PrimitiveSchema
.public static ObjectSchema getBaseSchema()
public AbsObject newInstance() throws OntologyException
newInstance
in class TermSchema
OntologyException
public void validate(AbsObject abs, Ontology onto) throws OntologyException
validate
in class ObjectSchemaImpl
abs
- The abstract descriptor to be checkedOntologyException
- If the abstract descriptor does not
complies with this schemaprotected boolean descendsFrom(ObjectSchema s)
descendsFrom
in class TermSchema
public boolean isAssignableFrom(ObjectSchema s)
ObjectSchema
isAssignableFrom
in class ObjectSchemaImpl