.. java:import:: java.util ArrayList .. java:import:: java.util HashMap .. java:import:: java.util HashSet .. java:import:: java.util LinkedList .. java:import:: java.util List .. java:import:: java.util Set .. java:import:: org.apache.shiro SecurityUtils .. java:import:: org.apache.shiro.authz AuthorizationException .. java:import:: org.apache.shiro.authz Permission .. java:import:: org.apache.shiro.subject Subject .. java:import:: org.caosdb.server CaosDBException .. java:import:: org.caosdb.server.accessControl Principal .. java:import:: org.caosdb.server.database.proto SparseEntity .. java:import:: org.caosdb.server.database.proto VerySparseEntity .. java:import:: org.caosdb.server.datatype AbstractCollectionDatatype .. java:import:: org.caosdb.server.datatype AbstractDatatype .. java:import:: org.caosdb.server.datatype CollectionValue .. java:import:: org.caosdb.server.datatype GenericValue .. java:import:: org.caosdb.server.datatype ReferenceDatatype .. java:import:: org.caosdb.server.datatype Value .. java:import:: org.caosdb.server.entity Message.MessageType .. java:import:: org.caosdb.server.entity.container ParentContainer .. java:import:: org.caosdb.server.entity.container PropertyContainer .. java:import:: org.caosdb.server.entity.wrapper Parent .. java:import:: org.caosdb.server.entity.wrapper Property .. java:import:: org.caosdb.server.entity.xml EntityToElementStrategy .. java:import:: org.caosdb.server.entity.xml SerializeFieldStrategy .. java:import:: org.caosdb.server.entity.xml ToElementStrategy .. java:import:: org.caosdb.server.entity.xml ToElementable .. java:import:: org.caosdb.server.permissions EntityACL .. java:import:: org.caosdb.server.query Query.Selection .. java:import:: org.caosdb.server.utils AbstractObservable .. java:import:: org.caosdb.server.utils EntityStatus .. java:import:: org.caosdb.server.utils ServerMessages .. java:import:: org.caosdb.server.utils TransactionLogMessage .. java:import:: org.caosdb.unit Unit .. java:import:: org.jdom2 Element Entity ====== .. java:package:: org.caosdb.server.entity :noindex: .. java:type:: public abstract class Entity extends AbstractObservable implements EntityInterface Abstract base class for all the important entity classes. This is the central data class of the server. It represents Records, RecordTypes, Properties, and Files. This class holds the messages and other transient information as well as the actual data that is being retrieved from or written to the back-end during a transaction. :author: Timm Fitschen Fields ------ DATATYPE_CHANGED_EVENT ^^^^^^^^^^^^^^^^^^^^^^ .. java:field:: public static final String DATATYPE_CHANGED_EVENT :outertype: Entity ENTITY_STATUS_CHANGED_EVENT ^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:field:: public static final String ENTITY_STATUS_CHANGED_EVENT :outertype: Entity isParsed ^^^^^^^^ .. java:field:: boolean isParsed :outertype: Entity Constructors ------------ Entity ^^^^^^ .. java:constructor:: public Entity() :outertype: Entity Entity ^^^^^^ .. java:constructor:: public Entity(EntityID id) :outertype: Entity Entity ^^^^^^ .. java:constructor:: public Entity(EntityID id, Role role) :outertype: Entity Entity ^^^^^^ .. java:constructor:: public Entity(String name, Role role) :outertype: Entity Entity ^^^^^^ .. java:constructor:: public Entity(Element e, Role role) throws Exception :outertype: Entity Entity ^^^^^^ .. java:constructor:: public Entity(String name) :outertype: Entity Entity ^^^^^^ .. java:constructor:: public Entity(Element e) :outertype: Entity Methods ------- addError ^^^^^^^^ .. java:method:: @Override public final void addError(Message m) :outertype: Entity addInfo ^^^^^^^ .. java:method:: @Override public void addInfo(String description) :outertype: Entity addInfo ^^^^^^^ .. java:method:: @Override public void addInfo(Message m) :outertype: Entity addMessage ^^^^^^^^^^ .. java:method:: @Override public final void addMessage(ToElementable m) :outertype: Entity addParent ^^^^^^^^^ .. java:method:: @Override public void addParent(Parent parent) :outertype: Entity addProperty ^^^^^^^^^^^ .. java:method:: @Override public void addProperty(Property property) :outertype: Entity addProperty ^^^^^^^^^^^ .. java:method:: @Override public void addProperty(List properties) :outertype: Entity addSelections ^^^^^^^^^^^^^ .. java:method:: public EntityInterface addSelections(List selections) :outertype: Entity addToElement ^^^^^^^^^^^^ .. java:method:: @Override public final void addToElement(Element element) :outertype: Entity addToElement ^^^^^^^^^^^^ .. java:method:: @Override public void addToElement(Element element, SerializeFieldStrategy strategy) :outertype: Entity addTransactionLog ^^^^^^^^^^^^^^^^^ .. java:method:: @Override public void addTransactionLog(TransactionLogMessage transactionLogMessage) :outertype: Entity addWarning ^^^^^^^^^^ .. java:method:: @Override public void addWarning(Message m) :outertype: Entity checkPermission ^^^^^^^^^^^^^^^ .. java:method:: @Override public void checkPermission(Subject subject, Permission permission) :outertype: Entity checkPermission ^^^^^^^^^^^^^^^ .. java:method:: @Override public void checkPermission(Permission permission) :outertype: Entity getCuid ^^^^^^^ .. java:method:: @Override public final String getCuid() :outertype: Entity cuid getter. :return: cuid. getDatatype ^^^^^^^^^^^ .. java:method:: @Override public final AbstractDatatype getDatatype() :outertype: Entity getDescription ^^^^^^^^^^^^^^ .. java:method:: @Override public final String getDescription() :outertype: Entity getDomain ^^^^^^^^^ .. java:method:: @Override public EntityID getDomain() :outertype: Entity getEntityACL ^^^^^^^^^^^^ .. java:method:: @Override public EntityACL getEntityACL() :outertype: Entity getEntityStatus ^^^^^^^^^^^^^^^ .. java:method:: @Override public final EntityStatus getEntityStatus() :outertype: Entity getFileProperties ^^^^^^^^^^^^^^^^^ .. java:method:: @Override public final FileProperties getFileProperties() :outertype: Entity getFlag ^^^^^^^ .. java:method:: @Override public String getFlag(String key) :outertype: Entity getFlags ^^^^^^^^ .. java:method:: @Override public HashMap getFlags() :outertype: Entity getId ^^^^^ .. java:method:: @Override public final EntityID getId() :outertype: Entity getIdVersion ^^^^^^^^^^^^ .. java:method:: @Override public String getIdVersion() :outertype: Entity Return "id@version" if there is versioning information, else only "id". getMessages ^^^^^^^^^^^ .. java:method:: @Override public final Set getMessages() :outertype: Entity getMessages ^^^^^^^^^^^ .. java:method:: @Override public final List getMessages(String type) :outertype: Entity getName ^^^^^^^ .. java:method:: @Override public final String getName() :outertype: Entity getParents ^^^^^^^^^^ .. java:method:: @Override public final ParentContainer getParents() :outertype: Entity getProperties ^^^^^^^^^^^^^ .. java:method:: @Override public final PropertyContainer getProperties() :outertype: Entity getQueryTemplateDefinition ^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: @Override public String getQueryTemplateDefinition() :outertype: Entity getRole ^^^^^^^ .. java:method:: @Override public final Role getRole() :outertype: Entity getSelections ^^^^^^^^^^^^^ .. java:method:: @Override public List getSelections() :outertype: Entity getSerializeFieldStrategy ^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: @Override public SerializeFieldStrategy getSerializeFieldStrategy() :outertype: Entity getSparseEntity ^^^^^^^^^^^^^^^ .. java:method:: @Override public SparseEntity getSparseEntity() :outertype: Entity getStatementStatus ^^^^^^^^^^^^^^^^^^ .. java:method:: @Override public StatementStatusInterface getStatementStatus() :outertype: Entity statementStatus getter. getToElementStrategy ^^^^^^^^^^^^^^^^^^^^ .. java:method:: @Override public ToElementStrategy getToElementStrategy() :outertype: Entity getTransactionLogMessages ^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: @Override public List getTransactionLogMessages() :outertype: Entity getUnit ^^^^^^^ .. java:method:: @Override public Unit getUnit() :outertype: Entity getValue ^^^^^^^^ .. java:method:: @Override public final Value getValue() :outertype: Entity getVersion ^^^^^^^^^^ .. java:method:: @Override public Version getVersion() :outertype: Entity getVerySparseEntity ^^^^^^^^^^^^^^^^^^^ .. java:method:: @Override public VerySparseEntity getVerySparseEntity() :outertype: Entity hasCuid ^^^^^^^ .. java:method:: @Override public final boolean hasCuid() :outertype: Entity cuid hasser. Does this wrapped entity have a cuid? :return: true if cuid != null, false otherwise. hasDatatype ^^^^^^^^^^^ .. java:method:: @Override public boolean hasDatatype() :outertype: Entity hasDescription ^^^^^^^^^^^^^^ .. java:method:: @Override public final boolean hasDescription() :outertype: Entity hasEntityACL ^^^^^^^^^^^^ .. java:method:: @Override public boolean hasEntityACL() :outertype: Entity hasEntityStatus ^^^^^^^^^^^^^^^ .. java:method:: @Override public final boolean hasEntityStatus() :outertype: Entity hasFileProperties ^^^^^^^^^^^^^^^^^ .. java:method:: @Override public final boolean hasFileProperties() :outertype: Entity hasId ^^^^^ .. java:method:: @Override public final boolean hasId() :outertype: Entity hasMessage ^^^^^^^^^^ .. java:method:: @Override public final boolean hasMessage(String type) :outertype: Entity hasMessages ^^^^^^^^^^^ .. java:method:: @Override public boolean hasMessages() :outertype: Entity hasName ^^^^^^^ .. java:method:: @Override public final boolean hasName() :outertype: Entity hasParents ^^^^^^^^^^ .. java:method:: @Override public final boolean hasParents() :outertype: Entity hasPermission ^^^^^^^^^^^^^ .. java:method:: @Override public boolean hasPermission(Permission permission) :outertype: Entity hasPermission ^^^^^^^^^^^^^ .. java:method:: @Override public boolean hasPermission(Subject subject, Permission permission) :outertype: Entity hasProperties ^^^^^^^^^^^^^ .. java:method:: @Override public final boolean hasProperties() :outertype: Entity hasRole ^^^^^^^ .. java:method:: @Override public final boolean hasRole() :outertype: Entity hasStatementStatus ^^^^^^^^^^^^^^^^^^ .. java:method:: @Override public final boolean hasStatementStatus() :outertype: Entity statementStatus hasser. :return: true id statementStatus!= null, false otherwise. hasTransactionLogMessages ^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: @Override public boolean hasTransactionLogMessages() :outertype: Entity hasUnit ^^^^^^^ .. java:method:: @Override public boolean hasUnit() :outertype: Entity hasValue ^^^^^^^^ .. java:method:: @Override public final boolean hasValue() :outertype: Entity hasVersion ^^^^^^^^^^ .. java:method:: @Override public boolean hasVersion() :outertype: Entity isDatatypeOverride ^^^^^^^^^^^^^^^^^^ .. java:method:: @Override public boolean isDatatypeOverride() :outertype: Entity isDescOverride ^^^^^^^^^^^^^^ .. java:method:: @Override public boolean isDescOverride() :outertype: Entity isNameOverride ^^^^^^^^^^^^^^ .. java:method:: @Override public boolean isNameOverride() :outertype: Entity isReference ^^^^^^^^^^^ .. java:method:: @Override public boolean isReference() :outertype: Entity isReferenceList ^^^^^^^^^^^^^^^ .. java:method:: @Override public boolean isReferenceList() :outertype: Entity linkIdToEntity ^^^^^^^^^^^^^^ .. java:method:: @Override public EntityInterface linkIdToEntity(EntityInterface link) :outertype: Entity parseFromElement ^^^^^^^^^^^^^^^^ .. java:method:: @Override public void parseFromElement(Element element) :outertype: Entity parseSparseEntity ^^^^^^^^^^^^^^^^^ .. java:method:: @Override public final EntityInterface parseSparseEntity(SparseEntity spe) :outertype: Entity parseValue ^^^^^^^^^^ .. java:method:: @Override public void parseValue() throws Message :outertype: Entity removeMessage ^^^^^^^^^^^^^ .. java:method:: @Override public void removeMessage(Message m) :outertype: Entity setCuid ^^^^^^^ .. java:method:: @Override public final void setCuid(String cuid) :outertype: Entity cuid setter. :param cuid: :throws CaosDBException: if one tried to set it once again. setDatatype ^^^^^^^^^^^ .. java:method:: @Override public final void setDatatype(AbstractDatatype datatype) :outertype: Entity setDatatype ^^^^^^^^^^^ .. java:method:: @Override public void setDatatype(String datatype) :outertype: Entity setDatatypeOverride ^^^^^^^^^^^^^^^^^^^ .. java:method:: @Override public EntityInterface setDatatypeOverride(boolean b) :outertype: Entity setDescOverride ^^^^^^^^^^^^^^^ .. java:method:: @Override public EntityInterface setDescOverride(boolean b) :outertype: Entity setDescription ^^^^^^^^^^^^^^ .. java:method:: @Override public final void setDescription(String description) :outertype: Entity setEntityACL ^^^^^^^^^^^^ .. java:method:: @Override public void setEntityACL(EntityACL acl) :outertype: Entity setEntityACL ^^^^^^^^^^^^ .. java:method:: public void setEntityACL(String acl) :outertype: Entity setEntityStatus ^^^^^^^^^^^^^^^ .. java:method:: @Override public final void setEntityStatus(EntityStatus entityStatus) :outertype: Entity setFileProperties ^^^^^^^^^^^^^^^^^ .. java:method:: @Override public final void setFileProperties(FileProperties fileProperties) :outertype: Entity setFlag ^^^^^^^ .. java:method:: @Override public void setFlag(String key, String value) :outertype: Entity setId ^^^^^ .. java:method:: @Override public void setId(EntityID id) :outertype: Entity setName ^^^^^^^ .. java:method:: @Override public final void setName(String name) :outertype: Entity setNameOverride ^^^^^^^^^^^^^^^ .. java:method:: @Override public EntityInterface setNameOverride(boolean b) :outertype: Entity setProperties ^^^^^^^^^^^^^ .. java:method:: @Override public void setProperties(PropertyContainer properties) :outertype: Entity setQueryTemplateDefinition ^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: @Override public void setQueryTemplateDefinition(String query) :outertype: Entity setRole ^^^^^^^ .. java:method:: @Override public final void setRole(Role role) :outertype: Entity setRole ^^^^^^^ .. java:method:: @Override public final void setRole(String role) :outertype: Entity setSerializeFieldStrategy ^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: @Override public void setSerializeFieldStrategy(SerializeFieldStrategy s) :outertype: Entity setStatementStatus ^^^^^^^^^^^^^^^^^^ .. java:method:: @Override public void setStatementStatus(StatementStatusInterface statementStatus) :outertype: Entity statementStatus setter. setStatementStatus ^^^^^^^^^^^^^^^^^^ .. java:method:: @Override public void setStatementStatus(String statementStatus) :outertype: Entity setToElementStragegy ^^^^^^^^^^^^^^^^^^^^ .. java:method:: @Override public void setToElementStragegy(ToElementStrategy s) :outertype: Entity setUnit ^^^^^^^ .. java:method:: @Override public void setUnit(Unit unit) :outertype: Entity setValue ^^^^^^^^ .. java:method:: @Override public final void setValue(Value value) :outertype: Entity setVersion ^^^^^^^^^^ .. java:method:: @Override public void setVersion(Version version) :outertype: Entity skipJob ^^^^^^^ .. java:method:: @Override public boolean skipJob() :outertype: Entity toElement ^^^^^^^^^ .. java:method:: @Override public final Element toElement() :outertype: Entity toString ^^^^^^^^ .. java:method:: @Override public String toString() :outertype: Entity