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, IJenaContext
- Direct Known Subclasses:
- FileContext, JDBCContext
- public abstract class Context
- extends Object
- implements IJenaContext
| Methods inherited from interface org.eclipse.higgins.idas.api.IContext |
cancelUpdates |
Context
public Context()
addRelationship
public void addRelationship(org.eclipse.higgins.idas.api.IContextRelation relationship)
throws org.eclipse.higgins.idas.api.IdASException
- Throws:
org.eclipse.higgins.idas.api.IdASException
addEntity
public org.eclipse.higgins.idas.api.IEntity addEntity(URI type,
String entityID)
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
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
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
buildComplexAttrValue
public org.eclipse.higgins.idas.api.IComplexAttrValue buildComplexAttrValue(URI type)
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
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
buildMetadataAssertion
public org.eclipse.higgins.idas.api.IFilterMetadataAssertion buildMetadataAssertion()
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
buildMetadataAssertion in interface org.eclipse.higgins.idas.api.IContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
buildRelationship
public org.eclipse.higgins.idas.api.IContextRelation buildRelationship(URI type)
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
buildRelationship in interface org.eclipse.higgins.idas.api.IContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
buildSimpleAttrValue
public org.eclipse.higgins.idas.api.ISimpleAttrValue buildSimpleAttrValue(URI type,
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
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
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
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
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
getRelationships
public Iterator getRelationships()
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
getRelationships 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
getEntity
public org.eclipse.higgins.idas.api.IEntity getEntity(String cuid)
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
getEntity
public org.eclipse.higgins.idas.api.IEntity getEntity(String cuid,
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
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
getNodeIndividuals
public ArrayList getNodeIndividuals(org.eclipse.higgins.idas.api.IFilter filter,
boolean ignoreUserToken)
throws org.eclipse.higgins.idas.api.IdASException
- 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
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(Object 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
removeRelationship
public void removeRelationship(org.eclipse.higgins.idas.api.IContextRelation relationship)
throws org.eclipse.higgins.idas.api.IdASException
- Throws:
org.eclipse.higgins.idas.api.IdASException
removeSubject
public void removeSubject(String cuid)
throws org.eclipse.higgins.idas.api.IdASException
- 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
verifyEntityAttributes
public boolean verifyEntityAttributes(String subjectID,
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
getModel
public com.hp.hpl.jena.ontology.OntModel getModel()
throws org.eclipse.higgins.idas.api.IdASException
- Description copied from interface:
IJenaContext
- return jena ontology model of the context
- Specified by:
getModel in interface IJenaContext
- Throws:
org.eclipse.higgins.idas.api.IdASException - If the context is not open or its ontology model is not
initialized
getModelNoException
public com.hp.hpl.jena.ontology.OntModel getModelNoException()
- Returns:
getNS
public String getNS()
- Description copied from interface:
IJenaContext
- return namespace of context
- Specified by:
getNS in interface IJenaContext
getUserAccount
public IUserAccount getUserAccount()
- Returns:
getDatatypeProperty
public com.hp.hpl.jena.ontology.DatatypeProperty getDatatypeProperty(String uri)
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
getDatatypeProperty in interface IJenaContext
- Parameters:
uri -
- Returns:
-
- Throws:
org.eclipse.higgins.idas.api.IdASException
getObjectProperty
public com.hp.hpl.jena.ontology.ObjectProperty getObjectProperty(String uri)
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
getObjectProperty in interface IJenaContext
- Parameters:
uri -
- Returns:
-
- Throws:
org.eclipse.higgins.idas.api.IdASException
getOntProperty
public com.hp.hpl.jena.ontology.OntProperty getOntProperty(String uri)
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
getOntProperty in interface IJenaContext
- Parameters:
uri -
- Returns:
-
- Throws:
org.eclipse.higgins.idas.api.IdASException
getOntClass
public com.hp.hpl.jena.ontology.OntClass getOntClass(String uri)
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
getOntClass in interface IJenaContext
- Parameters:
uri -
- Returns:
-
- 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
init
public void init(Properties props)
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
init in interface IJenaContext
- Parameters:
props -
- Throws:
org.eclipse.higgins.idas.api.IdASException
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
registerChangedSubject
public void registerChangedSubject(Entity subj)
- Register the subject which was changed and should be validated (optionally) before saving
- Specified by:
registerChangedSubject in interface IJenaContext
- Parameters:
subj -
- Throws:
org.eclipse.higgins.idas.api.IdASException
unregisterChangedSubject
public void unregisterChangedSubject(Entity subj)
- Description copied from interface:
IJenaContext
- When some Entity was removed it should be also removed from changed subjects list
to prevent validation of non-existent subject
- Specified by:
unregisterChangedSubject in interface IJenaContext
- Parameters:
subj -
addRelationship
public org.eclipse.higgins.idas.api.IContextRelation addRelationship(URI relationshipType)
throws org.eclipse.higgins.idas.api.IdASException
- Specified by:
addRelationship in interface org.eclipse.higgins.idas.api.IContext
- Throws:
org.eclipse.higgins.idas.api.IdASException
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