Class AbstractAttribute<X,Y>
- All Implemented Interfaces:
Attribute<X,
,Y> FieldSpecification<X,
Y>
- Direct Known Subclasses:
AbstractPluralAttribute
,SingularAttributeImpl
-
Nested Class Summary
Nested classes/interfaces inherited from interface cz.cvut.kbss.jopa.model.metamodel.Attribute
Attribute.PersistentAttributeType
-
Method Summary
Modifier and TypeMethodDescriptionReturn the set of cascade types specified for this attribute.Returns participation constraints specified for this attribute.Gets the explicitly specified identifier of the attribute datatype.Return the managed type representing the type in which the attribute was declared.Whether the association is lazily loaded or must be eagerly fetched.getIRI()
Returns theIRI
identifier of the property mapped by this attribute.Return the java.lang.reflect.Member for the represented attribute.Return the java.lang.reflect.Member for the represented attribute.Gets the language configured for this attribute.getName()
Return the name of the attribute.Return the persistent attribute type for the attribute.boolean
Indicates whether a language is specified for this attribute.boolean
If this field is inferred, can it contain explicit data as well?boolean
Whether this field can contain inferred data.boolean
Does the attribute contain values in lexical form.boolean
Whether the attribute can be without value.boolean
Does the attribute represent simple literals.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface cz.cvut.kbss.jopa.model.metamodel.Attribute
isAssociation, isMappedAttribute
Methods inherited from interface cz.cvut.kbss.jopa.model.metamodel.FieldSpecification
getJavaType, isCollection
-
Method Details
-
getPersistentAttributeType
Description copied from interface:Attribute
Return the persistent attribute type for the attribute.- Specified by:
getPersistentAttributeType
in interfaceAttribute<X,
Y> - Returns:
- persistent attribute type
-
getJavaMember
Description copied from interface:Attribute
Return the java.lang.reflect.Member for the represented attribute.- Specified by:
getJavaMember
in interfaceAttribute<X,
Y> - Returns:
- corresponding java.lang.reflect.Member
-
getIRI
Description copied from interface:Attribute
Returns theIRI
identifier of the property mapped by this attribute. -
getCascadeTypes
Description copied from interface:Attribute
Return the set of cascade types specified for this attribute.- Specified by:
getCascadeTypes
in interfaceAttribute<X,
Y> - Returns:
- corresponding array of cascade types. This method returns an empty array if no cascade type is specified.
-
isNonEmpty
public boolean isNonEmpty()Description copied from interface:Attribute
Whether the attribute can be without value.Note that if
Attribute.getConstraints()
containsParticipationConstraint
s, this property should be ignored.- Specified by:
isNonEmpty
in interfaceAttribute<X,
Y> - Returns:
- boolean indicating whether the attribute can be empty
-
getConstraints
Description copied from interface:Attribute
Returns participation constraints specified for this attribute.- Specified by:
getConstraints
in interfaceAttribute<X,
Y> - Returns:
- Array of participation constraints
-
getDeclaringType
Description copied from interface:FieldSpecification
Return the managed type representing the type in which the attribute was declared.- Specified by:
getDeclaringType
in interfaceFieldSpecification<X,
Y> - Returns:
- declaring type
-
getJavaField
Description copied from interface:FieldSpecification
Return the java.lang.reflect.Member for the represented attribute.- Specified by:
getJavaField
in interfaceFieldSpecification<X,
Y> - Returns:
- corresponding java.lang.reflect.Member
-
getFetchType
Description copied from interface:FieldSpecification
Whether the association is lazily loaded or must be eagerly fetched.- Specified by:
getFetchType
in interfaceFieldSpecification<X,
Y> - Returns:
- Fetch type of the field specification
-
isInferred
public boolean isInferred()Description copied from interface:FieldSpecification
Whether this field can contain inferred data.- Specified by:
isInferred
in interfaceFieldSpecification<X,
Y> - Returns:
- Whether field is inferred
- See Also:
-
includeExplicit
public boolean includeExplicit()Description copied from interface:FieldSpecification
If this field is inferred, can it contain explicit data as well?- Specified by:
includeExplicit
in interfaceFieldSpecification<X,
Y> - Returns:
- Whether inferred field can contain explicit knowledge
- See Also:
-
isLexicalForm
public boolean isLexicalForm()Description copied from interface:Attribute
Does the attribute contain values in lexical form.Applies only to datatype and annotation properties, object properties cannot be in lexical form.
- Specified by:
isLexicalForm
in interfaceAttribute<X,
Y> - Returns:
- Boolean indicating whether the attribute contains values in lexical form
-
isSimpleLiteral
public boolean isSimpleLiteral()Description copied from interface:Attribute
Does the attribute represent simple literals.Simple literals are stored as
xsd:string
, i.e., strings without language tag.Applies only to datatype and annotation properties, object properties cannot be simple literals.
- Specified by:
isSimpleLiteral
in interfaceAttribute<X,
Y> - Returns:
- Boolean indicating whether the attribute represents simple literals.
-
hasLanguage
public boolean hasLanguage()Description copied from interface:Attribute
Indicates whether a language is specified for this attribute.Note that language applies only to String-based data or annotation property attribute values, for which
rdfs:langString
values will be read and its language tag compared to the one required.Also note that if the attribute is a simple literal or in lexical form only, it has no language and this method will return false.
- Specified by:
hasLanguage
in interfaceAttribute<X,
Y> - Returns:
- Boolean indicating whether language is specified for this attribute
-
getLanguage
Description copied from interface:Attribute
Gets the language configured for this attribute.Note that language applies only to String-based data or annotation property attribute values, for which
rdfs:langString
values will be read and its language tag compared to the one required.If no language is specified directly for the attribute, persistence unit-level language setting is used.
- Specified by:
getLanguage
in interfaceAttribute<X,
Y> - Returns:
- Language configured for this attribute,
null
if none is set - See Also:
-
getName
Description copied from interface:FieldSpecification
Return the name of the attribute.- Specified by:
getName
in interfaceFieldSpecification<X,
Y> - Returns:
- name
-
getConverter
-
toString
-
getDatatype
Description copied from interface:Attribute
Gets the explicitly specified identifier of the attribute datatype.Note that the returned value may be
null
in case the datatype is not explicitly specified and automatic datatype resolution provided by the underlying OntoDriver is used.null
is also returned for object property attributes, as this does not apply to them.- Specified by:
getDatatype
in interfaceAttribute<X,
Y> - Returns:
- Datatype identifier, possibly
null
-