org.eclipse.higgins.idas.cp.jena2.impl
Class Context
java.lang.Object
org.eclipse.higgins.idas.cp.jena2.impl.Context
- All Implemented Interfaces:
- org.eclipse.higgins.idas.api.IContext, org.eclipse.higgins.idas.api.IHasAttributes, IJenaContext
public class Context
- extends Object
- implements IJenaContext
| Fields inherited from interface org.eclipse.higgins.idas.api.IContext |
defaultEntityType |
|
Constructor Summary |
Context(URI schemaURI,
URI contextId,
org.eclipse.higgins.idas.api.model.IContextModel contextModel,
ISharedContext sharedContext,
boolean performValidation)
|
|
Method Summary |
org.eclipse.higgins.idas.api.IAttribute |
addAttribute(org.eclipse.higgins.idas.api.IAttribute copyFrom)
|
org.eclipse.higgins.idas.api.IAttribute |
addAttribute(URI attrID)
|
org.eclipse.higgins.idas.api.IEntity |
addAttributeValue(URI attrType,
String entityId)
|
org.eclipse.higgins.idas.api.IEntity |
addEntity(org.eclipse.higgins.idas.api.IEntity copyFrom)
|
org.eclipse.higgins.idas.api.IEntity |
addEntity(URI type,
String id)
|
void |
applyUpdates()
|
org.eclipse.higgins.idas.api.IAttribute |
buildAttribute(URI attrID)
|
org.eclipse.higgins.idas.api.IFilterAttributeAssertion |
buildAttributeAssertion()
|
org.eclipse.higgins.idas.api.IAuthNAttributesMaterials |
buildAuthNAttributesMaterials()
|
org.eclipse.higgins.idas.api.IEntity |
buildComplexAttrValue(URI dataType)
|
org.eclipse.higgins.idas.api.IFilterEntityIDAssertion |
buildEntityIDAssertion()
|
org.eclipse.higgins.idas.api.IFilterEntityTypeAssertion |
buildEntityTypeAssertion()
|
org.eclipse.higgins.idas.api.IFilter |
buildFilter()
|
org.eclipse.higgins.idas.api.ISimpleValue |
buildSimpleAttrValue(URI dataType,
Object value)
|
void |
cancelUpdates()
|
void |
close()
|
org.eclipse.higgins.idas.api.model.IEntityModel |
ensureModelExists(URI entityType)
|
String |
exportData(String filter,
String representationFormat)
|
org.eclipse.higgins.idas.api.IAttribute |
getAttribute(URI attrID)
|
Iterator<org.eclipse.higgins.idas.api.IAttribute> |
getAttributes()
|
URI |
getContextID()
|
org.eclipse.higgins.idas.api.model.IContextModel |
getContextModel()
|
Iterator |
getEntities(org.eclipse.higgins.idas.api.IFilter filter)
|
Iterator |
getEntities(org.eclipse.higgins.idas.api.IFilter filter,
Iterator attrSelectionList)
|
Iterator |
getEntities(org.eclipse.higgins.idas.api.IFilter filter,
Iterator attrSelectionList,
org.eclipse.higgins.idas.api.IExtension[] extensions)
|
Iterator<org.eclipse.higgins.idas.api.IEntity> |
getEntities(String query)
|
Iterator<org.eclipse.higgins.idas.api.IEntity> |
getEntities(String query,
Iterator attrSelectionList)
|
Iterator<org.eclipse.higgins.idas.api.IEntity> |
getEntities(String query,
Iterator attrSelectionList,
org.eclipse.higgins.idas.api.IExtension[] extensions)
|
org.eclipse.higgins.idas.api.IEntity |
getEntity(String entityID)
|
org.eclipse.higgins.idas.api.IEntity |
getEntity(String entityID,
Iterator attrSelectionList)
|
String |
getSchema()
|
String |
getSchemaURI()
|
ISharedContext |
getSharedContext()
|
org.eclipse.higgins.idas.api.ISingleValuedAttribute |
getSingleValuedAttribute(URI attrID)
|
void |
importData(String filter,
String representationFormat)
|
boolean |
isModelSupported()
|
boolean |
isOpen(Object identity)
|
String |
open(org.eclipse.higgins.idas.api.IAuthNMaterials authentication)
|
String |
open(org.eclipse.higgins.idas.api.IAuthNMaterials authentication,
org.eclipse.higgins.idas.api.IExtension[] extensions)
|
void |
registerChangedObject(IStatefulObject obj)
|
void |
removeAttribute(URI attrID)
|
void |
removeAttributeValue(org.eclipse.higgins.idas.api.IAttribute attr)
|
void |
removeAttributeValue(URI attrID,
Object value)
|
void |
reopen()
|
void |
setComponentSetting(String key,
Object value)
|
void |
setComponentSetting(String key,
Object value,
boolean failUnsupported)
|
void |
setSchema(String schema)
|
void |
setValidationMode(boolean performValidation)
|
void |
unregisterChangedObject(IStatefulObject obj)
|
boolean |
verifyEntityAttributes(String entityID,
Iterator attributes)
|
Context
public Context(URI schemaURI,
URI contextId,
org.eclipse.higgins.idas.api.model.IContextModel contextModel,
ISharedContext sharedContext,
boolean performValidation)
registerChangedObject
public void registerChangedObject(IStatefulObject obj)
- Specified by:
registerChangedObject in interface IJenaContext
unregisterChangedObject
public void unregisterChangedObject(IStatefulObject obj)
- Specified by:
unregisterChangedObject in interface IJenaContext
addEntity
public org.eclipse.higgins.idas.api.IEntity addEntity(URI type,
String id)
throws org.eclipse.higgins.idas.api.IdASException,
org.eclipse.higgins.idas.api.InvalidTypeException,
org.eclipse.higgins.idas.api.InvalidEntityIDException,
org.eclipse.higgins.idas.api.EntityExistsException
- Specified by:
addEntity in interface org.eclipse.higgins.idas.api.IContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
org.eclipse.higgins.idas.api.InvalidTypeException
org.eclipse.higgins.idas.api.InvalidEntityIDException
org.eclipse.higgins.idas.api.EntityExistsException
addEntity
public org.eclipse.higgins.idas.api.IEntity addEntity(org.eclipse.higgins.idas.api.IEntity copyFrom)
throws org.eclipse.higgins.idas.api.IdASException,
org.eclipse.higgins.idas.api.EntityExistsException
- Specified by:
addEntity in interface org.eclipse.higgins.idas.api.IContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
org.eclipse.higgins.idas.api.EntityExistsException
applyUpdates
public void applyUpdates()
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
applyUpdates in interface org.eclipse.higgins.idas.api.IContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
cancelUpdates
public void cancelUpdates()
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
cancelUpdates in interface org.eclipse.higgins.idas.api.IContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
close
public void close()
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
close in interface org.eclipse.higgins.idas.api.IContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
exportData
public String exportData(String filter,
String representationFormat)
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
exportData in interface org.eclipse.higgins.idas.api.IContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
getContextID
public URI getContextID()
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
getContextID in interface org.eclipse.higgins.idas.api.IContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
getEntities
public Iterator<org.eclipse.higgins.idas.api.IEntity> getEntities(String query)
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
getEntities in interface org.eclipse.higgins.idas.api.IContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
ensureModelExists
public org.eclipse.higgins.idas.api.model.IEntityModel ensureModelExists(URI entityType)
throws org.eclipse.higgins.idas.api.IdASException
- Throws:
org.eclipse.higgins.idas.api.IdASException
getEntity
public org.eclipse.higgins.idas.api.IEntity getEntity(String entityID)
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
getEntity in interface org.eclipse.higgins.idas.api.IContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
importData
public void importData(String filter,
String representationFormat)
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
importData in interface org.eclipse.higgins.idas.api.IContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
isOpen
public boolean isOpen(Object identity)
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
isOpen in interface org.eclipse.higgins.idas.api.IContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
open
public String open(org.eclipse.higgins.idas.api.IAuthNMaterials authentication,
org.eclipse.higgins.idas.api.IExtension[] extensions)
throws org.eclipse.higgins.idas.api.IdASException,
org.eclipse.higgins.idas.api.ContextOpenException
- Specified by:
open in interface org.eclipse.higgins.idas.api.IContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
org.eclipse.higgins.idas.api.ContextOpenException
open
public String open(org.eclipse.higgins.idas.api.IAuthNMaterials authentication)
throws org.eclipse.higgins.idas.api.IdASException,
org.eclipse.higgins.idas.api.ContextOpenException
- Specified by:
open in interface org.eclipse.higgins.idas.api.IContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
org.eclipse.higgins.idas.api.ContextOpenException
reopen
public void reopen()
throws org.eclipse.higgins.idas.api.IdASException,
org.eclipse.higgins.idas.api.AuthenticationException
- Specified by:
reopen in interface org.eclipse.higgins.idas.api.IContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
org.eclipse.higgins.idas.api.AuthenticationException
setComponentSetting
public void setComponentSetting(String key,
Object value,
boolean failUnsupported)
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
setComponentSetting in interface org.eclipse.higgins.idas.api.IContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
setComponentSetting
public void setComponentSetting(String key,
Object value)
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
setComponentSetting in interface org.eclipse.higgins.idas.api.IContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
verifyEntityAttributes
public boolean verifyEntityAttributes(String entityID,
Iterator attributes)
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
verifyEntityAttributes in interface org.eclipse.higgins.idas.api.IContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
getContextModel
public org.eclipse.higgins.idas.api.model.IContextModel getContextModel()
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
getContextModel in interface org.eclipse.higgins.idas.api.IContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
getEntities
public Iterator<org.eclipse.higgins.idas.api.IEntity> getEntities(String query,
Iterator attrSelectionList)
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
getEntities in interface org.eclipse.higgins.idas.api.IContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
getEntities
public Iterator<org.eclipse.higgins.idas.api.IEntity> getEntities(String query,
Iterator attrSelectionList,
org.eclipse.higgins.idas.api.IExtension[] extensions)
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
getEntities in interface org.eclipse.higgins.idas.api.IContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
getEntity
public org.eclipse.higgins.idas.api.IEntity getEntity(String entityID,
Iterator attrSelectionList)
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
getEntity in interface org.eclipse.higgins.idas.api.IContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
getSchema
public String getSchema()
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
getSchema in interface org.eclipse.higgins.idas.api.IContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
setSchema
public void setSchema(String schema)
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
setSchema in interface org.eclipse.higgins.idas.api.IContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
getSharedContext
public ISharedContext getSharedContext()
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
getSharedContext in interface IJenaContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
getSchemaURI
public String getSchemaURI()
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
getSchemaURI in interface IJenaContext
- Returns:
- schema URI that will be used as imported ontology
- Throws:
org.eclipse.higgins.idas.api.IdASException
isModelSupported
public boolean isModelSupported()
- Specified by:
isModelSupported in interface IJenaContext
setValidationMode
public void setValidationMode(boolean performValidation)
- Specified by:
setValidationMode in interface IJenaContext
- Parameters:
performValidation - if true then all changed subjects should be validated
before saving of the context. Default value is true. In case of JDBC Context, if
RDBMS does not support transactions, validation will not be performed
buildAttribute
public org.eclipse.higgins.idas.api.IAttribute buildAttribute(URI attrID)
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
buildAttribute in interface org.eclipse.higgins.idas.api.IContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
buildAttributeAssertion
public org.eclipse.higgins.idas.api.IFilterAttributeAssertion buildAttributeAssertion()
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
buildAttributeAssertion in interface org.eclipse.higgins.idas.api.IContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
buildAuthNAttributesMaterials
public org.eclipse.higgins.idas.api.IAuthNAttributesMaterials buildAuthNAttributesMaterials()
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
buildAuthNAttributesMaterials in interface org.eclipse.higgins.idas.api.IContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
buildComplexAttrValue
public org.eclipse.higgins.idas.api.IEntity buildComplexAttrValue(URI dataType)
throws org.eclipse.higgins.idas.api.IdASException,
org.eclipse.higgins.idas.api.InvalidTypeException
- Specified by:
buildComplexAttrValue in interface org.eclipse.higgins.idas.api.IContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
org.eclipse.higgins.idas.api.InvalidTypeException
buildEntityIDAssertion
public org.eclipse.higgins.idas.api.IFilterEntityIDAssertion buildEntityIDAssertion()
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
buildEntityIDAssertion in interface org.eclipse.higgins.idas.api.IContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
buildEntityTypeAssertion
public org.eclipse.higgins.idas.api.IFilterEntityTypeAssertion buildEntityTypeAssertion()
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
buildEntityTypeAssertion in interface org.eclipse.higgins.idas.api.IContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
buildFilter
public org.eclipse.higgins.idas.api.IFilter buildFilter()
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
buildFilter in interface org.eclipse.higgins.idas.api.IContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
buildSimpleAttrValue
public org.eclipse.higgins.idas.api.ISimpleValue buildSimpleAttrValue(URI dataType,
Object value)
throws org.eclipse.higgins.idas.api.IdASException,
org.eclipse.higgins.idas.api.InvalidTypeException
- Specified by:
buildSimpleAttrValue in interface org.eclipse.higgins.idas.api.IContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
org.eclipse.higgins.idas.api.InvalidTypeException
getEntities
public Iterator getEntities(org.eclipse.higgins.idas.api.IFilter filter)
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
getEntities in interface org.eclipse.higgins.idas.api.IContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
getEntities
public Iterator getEntities(org.eclipse.higgins.idas.api.IFilter filter,
Iterator attrSelectionList)
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
getEntities in interface org.eclipse.higgins.idas.api.IContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
getEntities
public Iterator getEntities(org.eclipse.higgins.idas.api.IFilter filter,
Iterator attrSelectionList,
org.eclipse.higgins.idas.api.IExtension[] extensions)
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
getEntities in interface org.eclipse.higgins.idas.api.IContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
addAttributeValue
public org.eclipse.higgins.idas.api.IEntity addAttributeValue(URI attrType,
String entityId)
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
addAttributeValue in interface org.eclipse.higgins.idas.api.IHasAttributes
- Throws:
org.eclipse.higgins.idas.api.IdASException
addAttribute
public org.eclipse.higgins.idas.api.IAttribute addAttribute(URI attrID)
throws org.eclipse.higgins.idas.api.IdASException,
org.eclipse.higgins.idas.api.InvalidTypeException
- Specified by:
addAttribute in interface org.eclipse.higgins.idas.api.IHasAttributes
- Throws:
org.eclipse.higgins.idas.api.IdASException
org.eclipse.higgins.idas.api.InvalidTypeException
addAttribute
public org.eclipse.higgins.idas.api.IAttribute addAttribute(org.eclipse.higgins.idas.api.IAttribute copyFrom)
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
addAttribute in interface org.eclipse.higgins.idas.api.IHasAttributes
- Throws:
org.eclipse.higgins.idas.api.IdASException
getAttribute
public org.eclipse.higgins.idas.api.IAttribute getAttribute(URI attrID)
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
getAttribute in interface org.eclipse.higgins.idas.api.IHasAttributes
- Throws:
org.eclipse.higgins.idas.api.IdASException
getAttributes
public Iterator<org.eclipse.higgins.idas.api.IAttribute> getAttributes()
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
getAttributes in interface org.eclipse.higgins.idas.api.IHasAttributes
- Throws:
org.eclipse.higgins.idas.api.IdASException
getSingleValuedAttribute
public org.eclipse.higgins.idas.api.ISingleValuedAttribute getSingleValuedAttribute(URI attrID)
throws org.eclipse.higgins.idas.api.IdASException,
org.eclipse.higgins.idas.api.NotSingleValuedAttributeException
- Specified by:
getSingleValuedAttribute in interface org.eclipse.higgins.idas.api.IHasAttributes
- Throws:
org.eclipse.higgins.idas.api.IdASException
org.eclipse.higgins.idas.api.NotSingleValuedAttributeException
removeAttribute
public void removeAttribute(URI attrID)
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
removeAttribute in interface org.eclipse.higgins.idas.api.IHasAttributes
- Throws:
org.eclipse.higgins.idas.api.IdASException
removeAttributeValue
public void removeAttributeValue(URI attrID,
Object value)
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
removeAttributeValue in interface org.eclipse.higgins.idas.api.IHasAttributes
- Throws:
org.eclipse.higgins.idas.api.IdASException
removeAttributeValue
public void removeAttributeValue(org.eclipse.higgins.idas.api.IAttribute attr)
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
removeAttributeValue in interface org.eclipse.higgins.idas.api.IHasAttributes
- Throws:
org.eclipse.higgins.idas.api.IdASException