
org.semanticwb.model.base.RoleBase Maven / Gradle / Ivy
package org.semanticwb.model.base;
/**
* Objeto que define un Role dentro de un repositorio de usuarios aplicable a un Usuario para filtrar componente, seccion, plantillas, etc.
*/
public abstract class RoleBase extends org.semanticwb.model.SWBClass implements org.semanticwb.model.Descriptiveable,org.semanticwb.model.Traceable,org.semanticwb.model.Undeleteable,org.semanticwb.model.FilterableClass,org.semanticwb.model.Filterable
{
/**
* Referencia a un objeto de tipo Role
*/
public static final org.semanticwb.platform.SemanticClass swb_RoleRef=org.semanticwb.SWBPlatform.getSemanticMgr().getVocabulary().getSemanticClass("http://www.semanticwebbuilder.org/swb4/ontology#RoleRef");
public static final org.semanticwb.platform.SemanticProperty swb_hasRoleRefInv=org.semanticwb.SWBPlatform.getSemanticMgr().getVocabulary().getSemanticProperty("http://www.semanticwebbuilder.org/swb4/ontology#hasRoleRefInv");
/**
* Objeto que define un Role dentro de un repositorio de usuarios aplicable a un Usuario para filtrar componente, seccion, plantillas, etc.
*/
public static final org.semanticwb.platform.SemanticClass swb_Role=org.semanticwb.SWBPlatform.getSemanticMgr().getVocabulary().getSemanticClass("http://www.semanticwebbuilder.org/swb4/ontology#Role");
public static final org.semanticwb.platform.SemanticProperty swb_roleParent=org.semanticwb.SWBPlatform.getSemanticMgr().getVocabulary().getSemanticProperty("http://www.semanticwebbuilder.org/swb4/ontology#roleParent");
public static final org.semanticwb.platform.SemanticProperty swb_hasRoleChild=org.semanticwb.SWBPlatform.getSemanticMgr().getVocabulary().getSemanticProperty("http://www.semanticwebbuilder.org/swb4/ontology#hasRoleChild");
/**
* The semantic class that represents the currentObject
*/
public static final org.semanticwb.platform.SemanticClass sclass=org.semanticwb.SWBPlatform.getSemanticMgr().getVocabulary().getSemanticClass("http://www.semanticwebbuilder.org/swb4/ontology#Role");
public static class ClassMgr
{
/**
* Returns a list of Role for a model
* @param model Model to find
* @return Iterator of org.semanticwb.model.Role
*/
public static java.util.Iterator listRoles(org.semanticwb.model.SWBModel model)
{
java.util.Iterator it=model.getSemanticObject().getModel().listInstancesOfClass(sclass);
return new org.semanticwb.model.GenericIterator(it, true);
}
/**
* Returns a list of org.semanticwb.model.Role for all models
* @return Iterator of org.semanticwb.model.Role
*/
public static java.util.Iterator listRoles()
{
java.util.Iterator it=sclass.listInstances();
return new org.semanticwb.model.GenericIterator(it, true);
}
/**
* Gets a org.semanticwb.model.Role
* @param id Identifier for org.semanticwb.model.Role
* @param model Model of the org.semanticwb.model.Role
* @return A org.semanticwb.model.Role
*/
public static org.semanticwb.model.Role getRole(String id, org.semanticwb.model.SWBModel model)
{
return (org.semanticwb.model.Role)model.getSemanticObject().getModel().getGenericObject(model.getSemanticObject().getModel().getObjectUri(id,sclass),sclass);
}
/**
* Create a org.semanticwb.model.Role
* @param id Identifier for org.semanticwb.model.Role
* @param model Model of the org.semanticwb.model.Role
* @return A org.semanticwb.model.Role
*/
public static org.semanticwb.model.Role createRole(String id, org.semanticwb.model.SWBModel model)
{
return (org.semanticwb.model.Role)model.getSemanticObject().getModel().createGenericObject(model.getSemanticObject().getModel().getObjectUri(id,sclass),sclass);
}
/**
* Remove a org.semanticwb.model.Role
* @param id Identifier for org.semanticwb.model.Role
* @param model Model of the org.semanticwb.model.Role
*/
public static void removeRole(String id, org.semanticwb.model.SWBModel model)
{
model.getSemanticObject().getModel().removeSemanticObject(model.getSemanticObject().getModel().getObjectUri(id,sclass));
}
/**
* Returns true if exists a org.semanticwb.model.Role
* @param id Identifier for org.semanticwb.model.Role
* @param model Model of the org.semanticwb.model.Role
* @return true if the org.semanticwb.model.Role exists, false otherwise
*/
public static boolean hasRole(String id, org.semanticwb.model.SWBModel model)
{
return (getRole(id, model)!=null);
}
/**
* Gets all org.semanticwb.model.Role with a determined ModifiedBy
* @param value ModifiedBy of the type org.semanticwb.model.User
* @param model Model of the org.semanticwb.model.Role
* @return Iterator with all the org.semanticwb.model.Role
*/
public static java.util.Iterator listRoleByModifiedBy(org.semanticwb.model.User value,org.semanticwb.model.SWBModel model)
{
org.semanticwb.model.GenericIterator it=new org.semanticwb.model.GenericIterator(model.getSemanticObject().getModel().listSubjectsByClass(swb_modifiedBy, value.getSemanticObject(),sclass));
return it;
}
/**
* Gets all org.semanticwb.model.Role with a determined ModifiedBy
* @param value ModifiedBy of the type org.semanticwb.model.User
* @return Iterator with all the org.semanticwb.model.Role
*/
public static java.util.Iterator listRoleByModifiedBy(org.semanticwb.model.User value)
{
org.semanticwb.model.GenericIterator it=new org.semanticwb.model.GenericIterator(value.getSemanticObject().getModel().listSubjectsByClass(swb_modifiedBy,value.getSemanticObject(),sclass));
return it;
}
/**
* Gets all org.semanticwb.model.Role with a determined RoleRefInv
* @param value RoleRefInv of the type org.semanticwb.model.RoleRef
* @param model Model of the org.semanticwb.model.Role
* @return Iterator with all the org.semanticwb.model.Role
*/
public static java.util.Iterator listRoleByRoleRefInv(org.semanticwb.model.RoleRef value,org.semanticwb.model.SWBModel model)
{
org.semanticwb.model.GenericIterator it=new org.semanticwb.model.GenericIterator(model.getSemanticObject().getModel().listSubjectsByClass(swb_hasRoleRefInv, value.getSemanticObject(),sclass));
return it;
}
/**
* Gets all org.semanticwb.model.Role with a determined RoleRefInv
* @param value RoleRefInv of the type org.semanticwb.model.RoleRef
* @return Iterator with all the org.semanticwb.model.Role
*/
public static java.util.Iterator listRoleByRoleRefInv(org.semanticwb.model.RoleRef value)
{
org.semanticwb.model.GenericIterator it=new org.semanticwb.model.GenericIterator(value.getSemanticObject().getModel().listSubjectsByClass(swb_hasRoleRefInv,value.getSemanticObject(),sclass));
return it;
}
/**
* Gets all org.semanticwb.model.Role with a determined Parent
* @param value Parent of the type org.semanticwb.model.Role
* @param model Model of the org.semanticwb.model.Role
* @return Iterator with all the org.semanticwb.model.Role
*/
public static java.util.Iterator listRoleByParent(org.semanticwb.model.Role value,org.semanticwb.model.SWBModel model)
{
org.semanticwb.model.GenericIterator it=new org.semanticwb.model.GenericIterator(model.getSemanticObject().getModel().listSubjectsByClass(swb_roleParent, value.getSemanticObject(),sclass));
return it;
}
/**
* Gets all org.semanticwb.model.Role with a determined Parent
* @param value Parent of the type org.semanticwb.model.Role
* @return Iterator with all the org.semanticwb.model.Role
*/
public static java.util.Iterator listRoleByParent(org.semanticwb.model.Role value)
{
org.semanticwb.model.GenericIterator it=new org.semanticwb.model.GenericIterator(value.getSemanticObject().getModel().listSubjectsByClass(swb_roleParent,value.getSemanticObject(),sclass));
return it;
}
/**
* Gets all org.semanticwb.model.Role with a determined Creator
* @param value Creator of the type org.semanticwb.model.User
* @param model Model of the org.semanticwb.model.Role
* @return Iterator with all the org.semanticwb.model.Role
*/
public static java.util.Iterator listRoleByCreator(org.semanticwb.model.User value,org.semanticwb.model.SWBModel model)
{
org.semanticwb.model.GenericIterator it=new org.semanticwb.model.GenericIterator(model.getSemanticObject().getModel().listSubjectsByClass(swb_creator, value.getSemanticObject(),sclass));
return it;
}
/**
* Gets all org.semanticwb.model.Role with a determined Creator
* @param value Creator of the type org.semanticwb.model.User
* @return Iterator with all the org.semanticwb.model.Role
*/
public static java.util.Iterator listRoleByCreator(org.semanticwb.model.User value)
{
org.semanticwb.model.GenericIterator it=new org.semanticwb.model.GenericIterator(value.getSemanticObject().getModel().listSubjectsByClass(swb_creator,value.getSemanticObject(),sclass));
return it;
}
/**
* Gets all org.semanticwb.model.Role with a determined Child
* @param value Child of the type org.semanticwb.model.Role
* @param model Model of the org.semanticwb.model.Role
* @return Iterator with all the org.semanticwb.model.Role
*/
public static java.util.Iterator listRoleByChild(org.semanticwb.model.Role value,org.semanticwb.model.SWBModel model)
{
org.semanticwb.model.GenericIterator it=new org.semanticwb.model.GenericIterator(model.getSemanticObject().getModel().listSubjectsByClass(swb_hasRoleChild, value.getSemanticObject(),sclass));
return it;
}
/**
* Gets all org.semanticwb.model.Role with a determined Child
* @param value Child of the type org.semanticwb.model.Role
* @return Iterator with all the org.semanticwb.model.Role
*/
public static java.util.Iterator listRoleByChild(org.semanticwb.model.Role value)
{
org.semanticwb.model.GenericIterator it=new org.semanticwb.model.GenericIterator(value.getSemanticObject().getModel().listSubjectsByClass(swb_hasRoleChild,value.getSemanticObject(),sclass));
return it;
}
}
public static RoleBase.ClassMgr getRoleClassMgr()
{
return new RoleBase.ClassMgr();
}
/**
* Constructs a RoleBase with a SemanticObject
* @param base The SemanticObject with the properties for the Role
*/
public RoleBase(org.semanticwb.platform.SemanticObject base)
{
super(base);
}
/**
* Sets the value for the property ModifiedBy
* @param value ModifiedBy to set
*/
public void setModifiedBy(org.semanticwb.model.User value)
{
if(value!=null)
{
getSemanticObject().setObjectProperty(swb_modifiedBy, value.getSemanticObject());
}else
{
removeModifiedBy();
}
}
/**
* Remove the value for ModifiedBy property
*/
public void removeModifiedBy()
{
getSemanticObject().removeProperty(swb_modifiedBy);
}
/**
* Gets the ModifiedBy
* @return a org.semanticwb.model.User
*/
public org.semanticwb.model.User getModifiedBy()
{
org.semanticwb.model.User ret=null;
org.semanticwb.platform.SemanticObject obj=getSemanticObject().getObjectProperty(swb_modifiedBy);
if(obj!=null)
{
ret=(org.semanticwb.model.User)obj.createGenericInstance();
}
return ret;
}
/**
* Gets all the org.semanticwb.model.RoleRef
* @return A GenericIterator with all the org.semanticwb.model.RoleRef
*/
public org.semanticwb.model.GenericIterator listRoleRefInvs()
{
return new org.semanticwb.model.GenericIterator(getSemanticObject().listObjectProperties(swb_hasRoleRefInv));
}
/**
* Gets true if has a RoleRefInv
* @param value org.semanticwb.model.RoleRef to verify
* @return true if the org.semanticwb.model.RoleRef exists, false otherwise
*/
public boolean hasRoleRefInv(org.semanticwb.model.RoleRef value)
{
boolean ret=false;
if(value!=null)
{
ret=getSemanticObject().hasObjectProperty(swb_hasRoleRefInv,value.getSemanticObject());
}
return ret;
}
/**
* Gets the RoleRefInv
* @return a org.semanticwb.model.RoleRef
*/
public org.semanticwb.model.RoleRef getRoleRefInv()
{
org.semanticwb.model.RoleRef ret=null;
org.semanticwb.platform.SemanticObject obj=getSemanticObject().getObjectProperty(swb_hasRoleRefInv);
if(obj!=null)
{
ret=(org.semanticwb.model.RoleRef)obj.createGenericInstance();
}
return ret;
}
/**
* Gets the Updated property
* @return java.util.Date with the Updated
*/
public java.util.Date getUpdated()
{
return getSemanticObject().getDateProperty(swb_updated);
}
/**
* Sets the Updated property
* @param value long with the Updated
*/
public void setUpdated(java.util.Date value)
{
getSemanticObject().setDateProperty(swb_updated, value);
}
/**
* Gets the Created property
* @return java.util.Date with the Created
*/
public java.util.Date getCreated()
{
return getSemanticObject().getDateProperty(swb_created);
}
/**
* Sets the Created property
* @param value long with the Created
*/
public void setCreated(java.util.Date value)
{
getSemanticObject().setDateProperty(swb_created, value);
}
/**
* Gets the Description property
* @return String with the Description
*/
public String getDescription()
{
return getSemanticObject().getProperty(swb_description);
}
/**
* Sets the Description property
* @param value long with the Description
*/
public void setDescription(String value)
{
getSemanticObject().setProperty(swb_description, value);
}
public String getDescription(String lang)
{
return getSemanticObject().getProperty(swb_description, null, lang);
}
public String getDisplayDescription(String lang)
{
return getSemanticObject().getLocaleProperty(swb_description, lang);
}
public void setDescription(String description, String lang)
{
getSemanticObject().setProperty(swb_description, description, lang);
}
/**
* Sets the value for the property Parent
* @param value Parent to set
*/
public void setParent(org.semanticwb.model.Role value)
{
if(value!=null)
{
getSemanticObject().setObjectProperty(swb_roleParent, value.getSemanticObject());
}else
{
removeParent();
}
}
/**
* Remove the value for Parent property
*/
public void removeParent()
{
getSemanticObject().removeProperty(swb_roleParent);
}
/**
* Gets the Parent
* @return a org.semanticwb.model.Role
*/
public org.semanticwb.model.Role getParent()
{
org.semanticwb.model.Role ret=null;
org.semanticwb.platform.SemanticObject obj=getSemanticObject().getObjectProperty(swb_roleParent);
if(obj!=null)
{
ret=(org.semanticwb.model.Role)obj.createGenericInstance();
}
return ret;
}
/**
* Sets the value for the property Creator
* @param value Creator to set
*/
public void setCreator(org.semanticwb.model.User value)
{
if(value!=null)
{
getSemanticObject().setObjectProperty(swb_creator, value.getSemanticObject());
}else
{
removeCreator();
}
}
/**
* Remove the value for Creator property
*/
public void removeCreator()
{
getSemanticObject().removeProperty(swb_creator);
}
/**
* Gets the Creator
* @return a org.semanticwb.model.User
*/
public org.semanticwb.model.User getCreator()
{
org.semanticwb.model.User ret=null;
org.semanticwb.platform.SemanticObject obj=getSemanticObject().getObjectProperty(swb_creator);
if(obj!=null)
{
ret=(org.semanticwb.model.User)obj.createGenericInstance();
}
return ret;
}
/**
* Gets all the org.semanticwb.model.Role
* @return A GenericIterator with all the org.semanticwb.model.Role
*/
public org.semanticwb.model.GenericIterator listChilds()
{
return new org.semanticwb.model.GenericIterator(getSemanticObject().listObjectProperties(swb_hasRoleChild));
}
/**
* Gets true if has a Child
* @param value org.semanticwb.model.Role to verify
* @return true if the org.semanticwb.model.Role exists, false otherwise
*/
public boolean hasChild(org.semanticwb.model.Role value)
{
boolean ret=false;
if(value!=null)
{
ret=getSemanticObject().hasObjectProperty(swb_hasRoleChild,value.getSemanticObject());
}
return ret;
}
/**
* Gets the Child
* @return a org.semanticwb.model.Role
*/
public org.semanticwb.model.Role getChild()
{
org.semanticwb.model.Role ret=null;
org.semanticwb.platform.SemanticObject obj=getSemanticObject().getObjectProperty(swb_hasRoleChild);
if(obj!=null)
{
ret=(org.semanticwb.model.Role)obj.createGenericInstance();
}
return ret;
}
/**
* Gets the Title property
* @return String with the Title
*/
public String getTitle()
{
return getSemanticObject().getProperty(swb_title);
}
/**
* Sets the Title property
* @param value long with the Title
*/
public void setTitle(String value)
{
getSemanticObject().setProperty(swb_title, value);
}
public String getTitle(String lang)
{
return getSemanticObject().getProperty(swb_title, null, lang);
}
public String getDisplayTitle(String lang)
{
return getSemanticObject().getLocaleProperty(swb_title, lang);
}
public void setTitle(String title, String lang)
{
getSemanticObject().setProperty(swb_title, title, lang);
}
/**
* Gets the Undeleteable property
* @return boolean with the Undeleteable
*/
public boolean isUndeleteable()
{
return getSemanticObject().getBooleanProperty(swb_undeleteable);
}
/**
* Sets the Undeleteable property
* @param value long with the Undeleteable
*/
public void setUndeleteable(boolean value)
{
getSemanticObject().setBooleanProperty(swb_undeleteable, value);
}
/**
* Gets the UserRepository
* @return a instance of org.semanticwb.model.UserRepository
*/
public org.semanticwb.model.UserRepository getUserRepository()
{
return (org.semanticwb.model.UserRepository)getSemanticObject().getModel().getModelObject().createGenericInstance();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy