java.lang.Object
org.apache.jena.enhanced.Personality<org.apache.jena.rdf.model.RDFNode>
org.apache.jena.ontapi.common.OntPersonalityImpl
- All Implemented Interfaces:
OntPersonality
public class OntPersonalityImpl
extends org.apache.jena.enhanced.Personality<org.apache.jena.rdf.model.RDFNode>
implements OntPersonality
A default implementation of
OntPersonality
.
Mappings from [interface] Class objects of RDFNode to Implementation
factories.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.jena.ontapi.common.OntPersonality
OntPersonality.Builtins, OntPersonality.Punnings, OntPersonality.Reserved
-
Constructor Summary
ConstructorsConstructorDescriptionOntPersonalityImpl
(String name, OntConfig config, OntPersonality.Punnings punnings, OntPersonality.Builtins builtins, OntPersonality.Reserved reserved) -
Method Summary
Modifier and TypeMethodDescriptionadd
(org.apache.jena.enhanced.Personality<org.apache.jena.rdf.model.RDFNode> other) copy()
Makes a full copy of this configuration.Gets system resources for the specified type.Returns a builtins vocabulary.Returns the config.getName()
Returns personality name, language profile.getObjectFactory
(Class<? extends org.apache.jena.rdf.model.RDFNode> type) Gets factory forOntObject
.Returns a punnings' vocabulary.Returns a reserved vocabulary.void
register
(Class<? extends OntObject> type, EnhNodeFactory factory) Registers new OntObject if neededvoid
register
(Class<? extends org.apache.jena.rdf.model.RDFNode> type, org.apache.jena.enhanced.Implementation factory) boolean
Answers if a type is supported.types()
Lists all object-types, which are supported by this personality configuration.void
unregister
(Class<? extends OntObject> view) Removes the factory.Methods inherited from class org.apache.jena.enhanced.Personality
add, getImplementation, newInstance
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.jena.ontapi.common.OntPersonality
types
-
Constructor Details
-
OntPersonalityImpl
public OntPersonalityImpl(String name, OntConfig config, OntPersonality.Punnings punnings, OntPersonality.Builtins builtins, OntPersonality.Reserved reserved)
-
-
Method Details
-
getName
Description copied from interface:OntPersonality
Returns personality name, language profile.- Specified by:
getName
in interfaceOntPersonality
- Returns:
- String
-
getBuiltins
Description copied from interface:OntPersonality
Returns a builtins vocabulary.- Specified by:
getBuiltins
in interfaceOntPersonality
- Returns:
OntPersonality.Builtins
-
getPunnings
Description copied from interface:OntPersonality
Returns a punnings' vocabulary.- Specified by:
getPunnings
in interfaceOntPersonality
- Returns:
OntPersonality.Punnings
-
getReserved
Description copied from interface:OntPersonality
Returns a reserved vocabulary.- Specified by:
getReserved
in interfaceOntPersonality
- Returns:
OntPersonality.Reserved
-
getConfig
Description copied from interface:OntPersonality
Returns the config. Config holds various settings to control model behaviour.- Specified by:
getConfig
in interfaceOntPersonality
- Returns:
OntConfig
-
forbidden
Description copied from interface:OntPersonality
Gets system resources for the specified type. An entity of the giventype
cannot be created with any of the URIs, which this method returns.- Specified by:
forbidden
in interfaceOntPersonality
- Parameters:
type
-OntObject
- Returns:
- Set of URIs
-
register
Registers new OntObject if needed- Parameters:
type
- Interface (OntObject)factory
- Factory to crete object
-
register
public void register(Class<? extends org.apache.jena.rdf.model.RDFNode> type, org.apache.jena.enhanced.Implementation factory) -
unregister
Removes the factory.- Parameters:
view
- Interface (OntObject)
-
types
Description copied from interface:OntPersonality
Lists all object-types, which are supported by this personality configuration. Each of the class-types are associated with eitherEnhNodeFactory
(if it isOntObject
type) or withImplementation
(if it is a standard jena resource object).- Specified by:
types
in interfaceOntPersonality
- Returns:
- Stream of
Class
es, subclasses ofRDFNode
.
-
getObjectFactory
Gets factory forOntObject
.- Specified by:
getObjectFactory
in interfaceOntPersonality
- Parameters:
type
- Interface (OntObject type)- Returns:
EnhNodeFactory
factory
-
supports
Description copied from interface:OntPersonality
Answers if a type is supported.- Specified by:
supports
in interfaceOntPersonality
- Parameters:
type
-Class
- Returns:
boolean
-
add
public OntPersonalityImpl add(org.apache.jena.enhanced.Personality<org.apache.jena.rdf.model.RDFNode> other) - Overrides:
add
in classorg.apache.jena.enhanced.Personality<org.apache.jena.rdf.model.RDFNode>
-
copy
Description copied from interface:OntPersonality
Makes a full copy of this configuration.- Specified by:
copy
in interfaceOntPersonality
- Overrides:
copy
in classorg.apache.jena.enhanced.Personality<org.apache.jena.rdf.model.RDFNode>
- Returns:
OntPersonality
a new instance identical to this
-