de.tudresden.inf.lat.jcel.coreontology.datatype
Class IntegerEntityManagerImpl

java.lang.Object
  extended by de.tudresden.inf.lat.jcel.coreontology.datatype.IntegerEntityManagerImpl
All Implemented Interfaces:
IntegerEntityManager

public class IntegerEntityManagerImpl
extends Object
implements IntegerEntityManager

An object of this class generates new identification numbers for object properties and classes.

Author:
Julian Mendez

Field Summary
static String anonymousEntity
           
static String auxiliaryEntity
           
 
Fields inherited from interface de.tudresden.inf.lat.jcel.coreontology.datatype.IntegerEntityManager
bottomClassId, bottomDataPropertyId, bottomObjectPropertyId, firstUsableIdentifier, topClassId, topDataPropertyId, topObjectPropertyId
 
Constructor Summary
IntegerEntityManagerImpl()
          Constructs a new identifier generator.
 
Method Summary
 Integer createAnonymousEntity(IntegerEntityType type, boolean auxiliary)
          Creates a new entity of a certain type.
 Integer createNamedEntity(IntegerEntityType type, String name, boolean auxiliary)
          Creates a new entity of a certain type.
 Integer createOrGetClassIdForIndividual(Integer individual)
          Returns the class identifier corresponding to the given individual.
 Integer createOrGetInverseObjectPropertyOf(Integer propertyId)
          Returns the inverse object property of the given object property.
 boolean equals(Object o)
           
 Set<Integer> getAuxiliaryInverseObjectProperties()
          Returns the auxiliary inverse object properties.
 Integer getAuxiliaryNominal(Integer individual)
          This method gives the auxiliary nominal related to a specific individual.
 Set<Integer> getAuxiliaryNominals()
          Returns the set of auxiliary nominals.
 Set<Integer> getEntities(IntegerEntityType type, boolean auxiliary)
          Returns the set of identifiers of auxiliary entities of a certain type.
 Integer getIndividual(Integer auxNominal)
          This method gives the individual related to a specific auxiliary nominal.
 Set<Integer> getIndividuals()
          Returns the set of individuals.
 String getName(Integer identifier)
          Returns the name defined for a certain entity.
 IntegerEntityType getType(Integer identifier)
          Returns the entity type for the given identifier
 int hashCode()
           
 boolean isAuxiliary(Integer identifier)
          Tells whether the given identifier corresponds to an auxiliary entity.
 boolean proposeInverseObjectPropertyOf(Integer firstProperty, Integer secondProperty)
          Proposes the association of an object property to another object property as one the inverse object property of the other one.
 int size()
          Returns the number of created entities, either auxiliary or non-auxiliary.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

anonymousEntity

public static final String anonymousEntity
See Also:
Constant Field Values

auxiliaryEntity

public static final String auxiliaryEntity
See Also:
Constant Field Values
Constructor Detail

IntegerEntityManagerImpl

public IntegerEntityManagerImpl()
Constructs a new identifier generator.

Method Detail

createAnonymousEntity

public Integer createAnonymousEntity(IntegerEntityType type,
                                     boolean auxiliary)
Description copied from interface: IntegerEntityManager
Creates a new entity of a certain type.

Specified by:
createAnonymousEntity in interface IntegerEntityManager
Parameters:
type - type of the entity
auxiliary - true if and only if the created entity is an auxiliary entity
Returns:
a new auxiliary entity of a certain type

createNamedEntity

public Integer createNamedEntity(IntegerEntityType type,
                                 String name,
                                 boolean auxiliary)
Description copied from interface: IntegerEntityManager
Creates a new entity of a certain type.

Specified by:
createNamedEntity in interface IntegerEntityManager
Parameters:
type - type of the entity
name - name for this entity
auxiliary - true if and only if the created entity is an auxiliary entity
Returns:
a new auxiliary entity of a certain type

createOrGetClassIdForIndividual

public Integer createOrGetClassIdForIndividual(Integer individual)
Description copied from interface: IntegerEntityManager
Returns the class identifier corresponding to the given individual. If that class does not exist, it creates a new auxiliary class.

Specified by:
createOrGetClassIdForIndividual in interface IntegerEntityManager
Parameters:
individual - individual to get the class
Returns:
the class identifier for the given individual

createOrGetInverseObjectPropertyOf

public Integer createOrGetInverseObjectPropertyOf(Integer propertyId)
                                           throws IndexOutOfBoundsException
Description copied from interface: IntegerEntityManager
Returns the inverse object property of the given object property. If this property does not exist, it creates a new auxiliary object property.

Specified by:
createOrGetInverseObjectPropertyOf in interface IntegerEntityManager
Parameters:
propertyId - property identifier to create an inverse object property
Returns:
the inverse object property of the given object property
Throws:
IndexOutOfBoundsException - if the property identifier is greater than the last auxiliary property created

equals

public boolean equals(Object o)
Overrides:
equals in class Object

getAuxiliaryInverseObjectProperties

public Set<Integer> getAuxiliaryInverseObjectProperties()
Description copied from interface: IntegerEntityManager
Returns the auxiliary inverse object properties.

Specified by:
getAuxiliaryInverseObjectProperties in interface IntegerEntityManager
Returns:
the auxiliary inverse object properties

getAuxiliaryNominal

public Integer getAuxiliaryNominal(Integer individual)
Description copied from interface: IntegerEntityManager
This method gives the auxiliary nominal related to a specific individual.

Specified by:
getAuxiliaryNominal in interface IntegerEntityManager
Parameters:
individual - the individual
Returns:
the requested class or null if the individual does not have any related auxiliary nominal.

getAuxiliaryNominals

public Set<Integer> getAuxiliaryNominals()
Description copied from interface: IntegerEntityManager
Returns the set of auxiliary nominals.

Specified by:
getAuxiliaryNominals in interface IntegerEntityManager
Returns:
the set of auxiliary nominals

getEntities

public Set<Integer> getEntities(IntegerEntityType type,
                                boolean auxiliary)
Description copied from interface: IntegerEntityManager
Returns the set of identifiers of auxiliary entities of a certain type.

Specified by:
getEntities in interface IntegerEntityManager
Parameters:
type - type of the entity
auxiliary - true for auxiliary entities, false for non-auxiliary entities
Returns:
the set of identifiers of auxiliary entities of a certain type

getIndividual

public Integer getIndividual(Integer auxNominal)
Description copied from interface: IntegerEntityManager
This method gives the individual related to a specific auxiliary nominal.

Specified by:
getIndividual in interface IntegerEntityManager
Parameters:
auxNominal - the auxiliary nominal
Returns:
the requested individual or null if the auxiliary nominal does not have any related individual.

getIndividuals

public Set<Integer> getIndividuals()
Description copied from interface: IntegerEntityManager
Returns the set of individuals.

Specified by:
getIndividuals in interface IntegerEntityManager
Returns:
the set of individuals

getName

public String getName(Integer identifier)
Description copied from interface: IntegerEntityManager
Returns the name defined for a certain entity.

Specified by:
getName in interface IntegerEntityManager
Parameters:
identifier - entity to get the name
Returns:
the name defined for a certain entity

getType

public IntegerEntityType getType(Integer identifier)
Description copied from interface: IntegerEntityManager
Returns the entity type for the given identifier

Specified by:
getType in interface IntegerEntityManager
Parameters:
identifier - entity identifier
Returns:
the entity type for the given identifier

hashCode

public int hashCode()
Overrides:
hashCode in class Object

isAuxiliary

public boolean isAuxiliary(Integer identifier)
Description copied from interface: IntegerEntityManager
Tells whether the given identifier corresponds to an auxiliary entity.

Specified by:
isAuxiliary in interface IntegerEntityManager
Returns:
true if and only if the given identifier corresponds to an auxiliary entity

proposeInverseObjectPropertyOf

public boolean proposeInverseObjectPropertyOf(Integer firstProperty,
                                              Integer secondProperty)
                                       throws IndexOutOfBoundsException
Description copied from interface: IntegerEntityManager
Proposes the association of an object property to another object property as one the inverse object property of the other one. This association is accepted if and only if none of both object properties has already another inverse object property.

Specified by:
proposeInverseObjectPropertyOf in interface IntegerEntityManager
Parameters:
firstProperty - an object property
secondProperty - an object property
Returns:
true if and only if the proposal was accepted
Throws:
IndexOutOfBoundsException

size

public int size()
Description copied from interface: IntegerEntityManager
Returns the number of created entities, either auxiliary or non-auxiliary.

Specified by:
size in interface IntegerEntityManager
Returns:
the number of created entities, either auxiliary or non-auxiliary.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.