org.eaglei.model
Class EIInstance

java.lang.Object
  extended by org.eaglei.model.EIInstance
All Implemented Interfaces:
java.io.Serializable

public class EIInstance
extends java.lang.Object
implements java.io.Serializable

Author:
Daniela Bourges-Waldegg Container for eagle-i resource instances. Objects of this class represent a full instance of an eagle-i ontology class, with embedded instances (hasEmbeddedInstances = true) and optionally, additional metadata and non-onntology properties (isExtendedInstance = true) The container contains: - an EIBasicInstance to hold the properties of the main instance - a NonOntologyProperties object to hold metadata and anything that was not recognized as conforming to the eagle-i ontology when reading repository data - a map of embedded instances (EIInstance objects) EIInstance objects are created only with minimal information (uri, type and label), other properties are set by an EIInstanceFactory (when creating from repository data) or by repository client code (e.g. when creating/updating from user input)
See Also:
Serialized Form

Field Summary
static EIInstance NULL_INSTANCE
           
 
Method Summary
 void addDatattypeProperty(EIEntity property, java.lang.String value)
           
 void addEIType(EIEntity eiType)
           
 void addEmbeddedInstance(EIEntity property, EIInstance instance)
           
 void addMaterializedInverseProperty(EIEntity property, EIInstanceMinimal instance)
           
 void addNonOntologyLiteralProperty(EIEntity property, java.lang.String literal)
           
 void addNonOntologyResourceProperty(EIEntity property, EIEntity resource)
           
 void addObjectProperty(EIEntity property, EIEntity value)
           
 int compareTo(java.lang.Object o)
           
static EIInstance createEmptyInstance(EIClass instanceClass, EIEntity instanceEntity)
           
static EIInstance createEmptyInstance(EIEntity instanceType, EIEntity instanceEntity)
          Deprecated. 
 EIEntity findPropertyForInstance(EIEntity instanceEntity)
           
 java.lang.String getCreationDate()
           
 java.util.Map<EIEntity,java.util.Set<java.lang.String>> getDatatypeProperties()
           
 java.util.Set<java.lang.String> getDatatypeProperty(EIEntity property)
           
 EIInstance getEmbeddedInstance(EIEntity instanceEntity)
           
 java.util.List<EIInstance> getEmbeddedInstanceList()
           
 java.util.Map<EIEntity,EIInstance> getEmbeddedInstances()
           
 java.util.List<EIURI> getEmbeddedInstanceUriList()
           
 EIEntity getEntity()
           
 EIClass getInstanceClass()
           
 java.lang.String getInstanceLabel()
           
 EIEntity getInstanceType()
           
 EIURI getInstanceURI()
           
 java.util.Map<EIEntity,java.util.List<EIInstanceMinimal>> getMaterializedInverseProperties()
           
 java.lang.String getModificationDate()
           
 java.util.Map<EIEntity,java.util.Set<java.lang.String>> getNonOntologyLiteralProperties()
           
 java.util.Set<java.lang.String> getNonOntologyLiteralProperty(EIEntity property)
           
 java.util.Map<EIEntity,java.util.Set<EIEntity>> getNonOntologyResourceProperties()
           
 java.util.Set<EIEntity> getNonOntologyResourceProperty(EIEntity property)
           
 java.util.Map<EIEntity,java.util.Set<EIEntity>> getObjectProperties()
           
 java.util.Set<EIEntity> getObjectProperty(EIEntity property)
           
 java.util.List<EIEntity> getOtherEITypes()
           
 java.util.Map<EIEntity,java.lang.String> getReadOnlyLiteralProperties()
           
 java.util.Map<EIEntity,EIEntity> getReadOnlyResourceProperties()
           
 java.util.List<EIInstanceMinimal> getReferencedByList()
           
 EIClass getRootSuperType()
           
 java.util.Set<EIEntity> getStubs()
           
 EIEntity getWFOwner()
           
 EIEntity getWFState()
           
 boolean hasAllRequiredProperties()
           
 boolean hasEmbeddedInstances()
           
 boolean hasReferencingResources()
           
 boolean hasStubs()
           
 boolean isEmbeddedInstance()
           
 boolean isExtendedInstance()
           
 boolean isPropertyValueAnEmbeddedInstance(EIEntity propertyEntity)
          Returns true if the property points to an embedded instance.
 boolean isPropertyValueAStub(EIEntity propertyEntity, EIEntity propertyValue)
           
 boolean isStub()
           
 void removeEmbeddedInstance(EIEntity instanceEntity)
           
 void replaceDatatypePropertyAllValues(EIEntity property, java.util.Set<java.lang.String> values)
           
 void replaceDatatypePropertyValue(EIEntity property, java.lang.String oldValue, java.lang.String newValue)
           
 void replaceNonOntologyLiteralProperty(EIEntity property, java.lang.String oldValue, java.lang.String newValue)
           
 void replaceNonOntologyLiteralPropertyAllValues(EIEntity property, java.util.Set<java.lang.String> values)
           
 void replaceNonOntologyResourcePropertyAllValues(EIEntity property, java.util.Set<EIEntity> values)
           
 void replaceNonOntologyResourcePropertyValue(EIEntity property, EIURI oldValue, EIEntity newValue)
           
 void replaceObjectPropertyAllValues(EIEntity property, java.util.Set<EIEntity> values)
           
 void replaceObjectPropertyValue(EIEntity property, EIURI oldValue, EIEntity newValue)
           
 void setCreationDate(java.lang.String date)
           
 void setEmbedded(boolean isEmbedded)
           
 void setHasAllRequiredProperties(boolean instanceHasAllRequiredProperties)
           
 void setInstanceClass(EIClass instanceClass)
           
 void setInstanceLabel(java.lang.String instanceLabel)
           
 void setInstanceType(EIEntity instanceType)
           
 void setModificationDate(java.lang.String date)
           
 void setOtherEITypes(java.util.List<EIEntity> eiTypes)
           
 void setReadOnlyLiteralProperties(java.util.Map<EIEntity,java.lang.String> readOnlyLiteralProperties)
           
 void setReadOnlyLiteralProperty(EIEntity property, java.lang.String value)
           
 void setReadOnlyResourceProperty(EIEntity property, EIEntity value)
           
 void setReferencedByList(java.util.List<EIInstanceMinimal> resources)
           
 void setRootSuperType(EIClass rootSuperType)
           
 void setStubs(java.util.Set<EIEntity> stubs)
           
 void setWFOwner(EIEntity ownerUri)
           
 void setWFState(EIEntity state)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NULL_INSTANCE

public static EIInstance NULL_INSTANCE
Method Detail

createEmptyInstance

@Deprecated
public static EIInstance createEmptyInstance(EIEntity instanceType,
                                                        EIEntity instanceEntity)
Deprecated. 


createEmptyInstance

public static EIInstance createEmptyInstance(EIClass instanceClass,
                                             EIEntity instanceEntity)

getEntity

public EIEntity getEntity()

getInstanceClass

public EIClass getInstanceClass()

setInstanceClass

public void setInstanceClass(EIClass instanceClass)

getInstanceURI

public EIURI getInstanceURI()

setInstanceLabel

public void setInstanceLabel(java.lang.String instanceLabel)

getInstanceLabel

public java.lang.String getInstanceLabel()

getInstanceType

public EIEntity getInstanceType()

setInstanceType

public void setInstanceType(EIEntity instanceType)

getObjectProperties

public java.util.Map<EIEntity,java.util.Set<EIEntity>> getObjectProperties()

addObjectProperty

public void addObjectProperty(EIEntity property,
                              EIEntity value)

getObjectProperty

public java.util.Set<EIEntity> getObjectProperty(EIEntity property)

replaceObjectPropertyValue

public void replaceObjectPropertyValue(EIEntity property,
                                       EIURI oldValue,
                                       EIEntity newValue)

replaceObjectPropertyAllValues

public void replaceObjectPropertyAllValues(EIEntity property,
                                           java.util.Set<EIEntity> values)

getDatatypeProperties

public java.util.Map<EIEntity,java.util.Set<java.lang.String>> getDatatypeProperties()

addDatattypeProperty

public void addDatattypeProperty(EIEntity property,
                                 java.lang.String value)

getDatatypeProperty

public java.util.Set<java.lang.String> getDatatypeProperty(EIEntity property)

replaceDatatypePropertyValue

public void replaceDatatypePropertyValue(EIEntity property,
                                         java.lang.String oldValue,
                                         java.lang.String newValue)

replaceDatatypePropertyAllValues

public void replaceDatatypePropertyAllValues(EIEntity property,
                                             java.util.Set<java.lang.String> values)

addEIType

public void addEIType(EIEntity eiType)

setOtherEITypes

public void setOtherEITypes(java.util.List<EIEntity> eiTypes)

getOtherEITypes

public java.util.List<EIEntity> getOtherEITypes()

compareTo

public int compareTo(java.lang.Object o)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setHasAllRequiredProperties

public void setHasAllRequiredProperties(boolean instanceHasAllRequiredProperties)

hasAllRequiredProperties

public boolean hasAllRequiredProperties()

getWFState

public EIEntity getWFState()

setWFState

public void setWFState(EIEntity state)

getWFOwner

public EIEntity getWFOwner()

setWFOwner

public void setWFOwner(EIEntity ownerUri)

getCreationDate

public java.lang.String getCreationDate()

setCreationDate

public void setCreationDate(java.lang.String date)

getModificationDate

public java.lang.String getModificationDate()

setModificationDate

public void setModificationDate(java.lang.String date)

getNonOntologyResourceProperties

public java.util.Map<EIEntity,java.util.Set<EIEntity>> getNonOntologyResourceProperties()

addNonOntologyResourceProperty

public void addNonOntologyResourceProperty(EIEntity property,
                                           EIEntity resource)

getNonOntologyResourceProperty

public java.util.Set<EIEntity> getNonOntologyResourceProperty(EIEntity property)

replaceNonOntologyResourcePropertyValue

public void replaceNonOntologyResourcePropertyValue(EIEntity property,
                                                    EIURI oldValue,
                                                    EIEntity newValue)

replaceNonOntologyResourcePropertyAllValues

public void replaceNonOntologyResourcePropertyAllValues(EIEntity property,
                                                        java.util.Set<EIEntity> values)

getNonOntologyLiteralProperties

public java.util.Map<EIEntity,java.util.Set<java.lang.String>> getNonOntologyLiteralProperties()

addNonOntologyLiteralProperty

public void addNonOntologyLiteralProperty(EIEntity property,
                                          java.lang.String literal)

getNonOntologyLiteralProperty

public java.util.Set<java.lang.String> getNonOntologyLiteralProperty(EIEntity property)

replaceNonOntologyLiteralProperty

public void replaceNonOntologyLiteralProperty(EIEntity property,
                                              java.lang.String oldValue,
                                              java.lang.String newValue)

replaceNonOntologyLiteralPropertyAllValues

public void replaceNonOntologyLiteralPropertyAllValues(EIEntity property,
                                                       java.util.Set<java.lang.String> values)

getReadOnlyResourceProperties

public java.util.Map<EIEntity,EIEntity> getReadOnlyResourceProperties()

setReadOnlyResourceProperty

public void setReadOnlyResourceProperty(EIEntity property,
                                        EIEntity value)

getReadOnlyLiteralProperties

public java.util.Map<EIEntity,java.lang.String> getReadOnlyLiteralProperties()

setReadOnlyLiteralProperties

public void setReadOnlyLiteralProperties(java.util.Map<EIEntity,java.lang.String> readOnlyLiteralProperties)

setReadOnlyLiteralProperty

public void setReadOnlyLiteralProperty(EIEntity property,
                                       java.lang.String value)

addEmbeddedInstance

public void addEmbeddedInstance(EIEntity property,
                                EIInstance instance)

removeEmbeddedInstance

public void removeEmbeddedInstance(EIEntity instanceEntity)

findPropertyForInstance

public EIEntity findPropertyForInstance(EIEntity instanceEntity)

getEmbeddedInstance

public EIInstance getEmbeddedInstance(EIEntity instanceEntity)

getEmbeddedInstances

public java.util.Map<EIEntity,EIInstance> getEmbeddedInstances()

getEmbeddedInstanceList

public java.util.List<EIInstance> getEmbeddedInstanceList()

getEmbeddedInstanceUriList

public java.util.List<EIURI> getEmbeddedInstanceUriList()

hasEmbeddedInstances

public boolean hasEmbeddedInstances()

isExtendedInstance

public boolean isExtendedInstance()

isEmbeddedInstance

public boolean isEmbeddedInstance()

setEmbedded

public void setEmbedded(boolean isEmbedded)

getRootSuperType

public EIClass getRootSuperType()

setRootSuperType

public void setRootSuperType(EIClass rootSuperType)

isStub

public boolean isStub()

isPropertyValueAnEmbeddedInstance

public boolean isPropertyValueAnEmbeddedInstance(EIEntity propertyEntity)
Returns true if the property points to an embedded instance. Note that a property with multiple values will contain either no embedded instances, or all its values will be embedded instances (i.e. we assume embedded classes are not part of a multi range range specification)

Parameters:
propertyEntity -
Returns:

setStubs

public void setStubs(java.util.Set<EIEntity> stubs)

getStubs

public java.util.Set<EIEntity> getStubs()

isPropertyValueAStub

public boolean isPropertyValueAStub(EIEntity propertyEntity,
                                    EIEntity propertyValue)

hasStubs

public boolean hasStubs()

hasReferencingResources

public boolean hasReferencingResources()

addMaterializedInverseProperty

public void addMaterializedInverseProperty(EIEntity property,
                                           EIInstanceMinimal instance)

getMaterializedInverseProperties

public java.util.Map<EIEntity,java.util.List<EIInstanceMinimal>> getMaterializedInverseProperties()

setReferencedByList

public void setReferencedByList(java.util.List<EIInstanceMinimal> resources)

getReferencedByList

public java.util.List<EIInstanceMinimal> getReferencedByList()


Copyright © 2009-2011 Eagle-I. All Rights Reserved.