public class Kind extends Category
SCHEME_CORE_DEFAULT, SCHEME_INFRASTRUCTURE_DEFAULT
Constructor and Description |
---|
Kind(URI scheme,
String term)
Constructor.
|
Kind(URI scheme,
String term,
String title,
URI location,
Collection<Attribute> attributes)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addRelation(Kind kind)
Creates a relation with given kind.
|
void |
clearRelations()
Remove all relations.
|
String |
getEntityType()
Returns kind's entity type.
|
Kind |
getParentKind()
Returns kind's parent kind.
|
Kind |
getRelatedKind(String kindIdentifier)
Creates a relation with given kind.
|
Set<Kind> |
getRelations()
Returns all related kinds in form of set.
|
boolean |
relatesTo(Kind kind)
Checks whether this kind is in relation with given kind.
|
boolean |
relatesTo(String kindIdentifier)
Checks whether this kind is in relation with given kind.
|
boolean |
removeRelation(Kind kind)
Removes relation with given kind.
|
void |
setEntityType(String entityType)
Sets kind's entity type.
|
void |
setParentKind(Kind parentKind)
Sets kind's parent kind.
|
String |
toString()
Resturns string representation of kind
|
addAction, addAttribute, addEntity, clearActions, clearAttributes, clearEntities, compareTo, containsAction, containsAction, containsAttribute, containsAttribute, containsEntity, containsEntity, equals, getAction, getActions, getAttribute, getAttributes, getEntities, getEntity, getIdentifier, getLocation, getScheme, getTerm, getTitle, hashCode, removeAction, removeAttribute, removeEntity, setLocation, setScheme, setTerm, setTitle, toHeaders, toHeaders, toText, toText
public Kind(URI scheme, String term, String title, URI location, Collection<Attribute> attributes)
scheme
- kind's scheme. Cannot be null.term
- kind's term. Cannot be null nor empty.title
- kind's titlelocation
- kind's locationattributes
- kind's attributespublic String getEntityType()
public void setEntityType(String entityType)
entityType
- kind's entity typepublic Kind getParentKind()
public void setParentKind(Kind parentKind)
parentKind
- kind's parent kindpublic boolean relatesTo(Kind kind)
kind
- kind to chcek relation withpublic boolean relatesTo(String kindIdentifier)
kindIdentifier
- identifier of kind to chcek relation withpublic boolean addRelation(Kind kind)
kind
- kind to create a relation withpublic Kind getRelatedKind(String kindIdentifier)
kindIdentifier
- identifier of kind to create a relation withpublic boolean removeRelation(Kind kind)
kind
- kind with which relation will be removedpublic void clearRelations()
public Set<Kind> getRelations()
public String toString()
toString
in class Category
Object.toString()
Copyright © 2016. All Rights Reserved.