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.voidregister(Class<? extends OntObject> type, EnhNodeFactory factory) Registers new OntObject if neededvoidregister(Class<? extends org.apache.jena.rdf.model.RDFNode> type, org.apache.jena.enhanced.Implementation factory) booleanAnswers if a type is supported.types()Lists all object-types, which are supported by this personality configuration.voidunregister(Class<? extends OntObject> view) Removes the factory.Methods inherited from class org.apache.jena.enhanced.Personality
add, getImplementation, newInstanceMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:OntPersonalityReturns personality name, language profile.- Specified by:
getNamein interfaceOntPersonality- Returns:
- String
-
getBuiltins
Description copied from interface:OntPersonalityReturns a builtins vocabulary.- Specified by:
getBuiltinsin interfaceOntPersonality- Returns:
OntPersonality.Builtins
-
getPunnings
Description copied from interface:OntPersonalityReturns a punnings' vocabulary.- Specified by:
getPunningsin interfaceOntPersonality- Returns:
OntPersonality.Punnings
-
getReserved
Description copied from interface:OntPersonalityReturns a reserved vocabulary.- Specified by:
getReservedin interfaceOntPersonality- Returns:
OntPersonality.Reserved
-
getConfig
Description copied from interface:OntPersonalityReturns the config. Config holds various settings to control model behaviour.- Specified by:
getConfigin interfaceOntPersonality- Returns:
OntConfig
-
forbidden
Description copied from interface:OntPersonalityGets system resources for the specified type. An entity of the giventypecannot be created with any of the URIs, which this method returns.- Specified by:
forbiddenin 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:OntPersonalityLists all object-types, which are supported by this personality configuration. Each of the class-types are associated with eitherEnhNodeFactory(if it isOntObjecttype) or withImplementation(if it is a standard jena resource object).- Specified by:
typesin interfaceOntPersonality- Returns:
- Stream of
Classes, subclasses ofRDFNode.
-
getObjectFactory
Gets factory forOntObject.- Specified by:
getObjectFactoryin interfaceOntPersonality- Parameters:
type- Interface (OntObject type)- Returns:
EnhNodeFactoryfactory
-
supports
Description copied from interface:OntPersonalityAnswers if a type is supported.- Specified by:
supportsin interfaceOntPersonality- Parameters:
type-Class- Returns:
boolean
-
add
public OntPersonalityImpl add(org.apache.jena.enhanced.Personality<org.apache.jena.rdf.model.RDFNode> other) - Overrides:
addin classorg.apache.jena.enhanced.Personality<org.apache.jena.rdf.model.RDFNode>
-
copy
Description copied from interface:OntPersonalityMakes a full copy of this configuration.- Specified by:
copyin interfaceOntPersonality- Overrides:
copyin classorg.apache.jena.enhanced.Personality<org.apache.jena.rdf.model.RDFNode>- Returns:
OntPersonalitya new instance identical to this
-