public class Action extends Object implements Identifiable, Comparable<Action>
Constructor and Description |
---|
Action(URI scheme,
String term)
Constructor.
|
Action(URI scheme,
String term,
String title,
Collection<Attribute> attributes)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addAttribute(Attribute attribute)
Adds attribute to the action.
|
int |
compareTo(Action a)
Comapres two actions lexicographically based on their identifier.
|
boolean |
containsAttribute(Attribute attribute)
Checks whether action has the attribute.
|
boolean |
containsAttribute(String attributeName)
Checks whether action has the attribute.
|
boolean |
equals(Object obj) |
Attribute |
getAttribute(String attributeName)
Retrieves an attribute from the action.
|
Set<Attribute> |
getAttributes()
Returns all action's attribute in form of set.
|
String |
getIdentifier()
Returns action's identifier.
|
URI |
getScheme()
Returns action's scheme.
|
URI |
getSchemeDefault()
Returns action's default scheme 'http://schemas.ogf.org/occi/core#'
|
String |
getTerm()
Returns action's term.
|
String |
getTermDefault()
Returns action's default term 'term'
|
String |
getTitle()
Returns action's title.
|
int |
hashCode() |
boolean |
removeAttribute(Attribute attribute)
Removes attribute from the action.
|
void |
setScheme(URI scheme)
Sets action's scheme.
|
void |
setTerm(String term)
Sets action's term.
|
void |
setTitle(String title)
Sets action's title.
|
com.sun.net.httpserver.Headers |
toHeaders(String resourceLocation)
Returns an occi text representation of action link as described in OCCI
standard in form of headers.
|
String |
toString()
Resturns string representation of the action
|
String |
toText(String resourceLocation)
Returns a text representation of action link as described in OCCI
standard.
|
public Action(URI scheme, String term, String title, Collection<Attribute> attributes)
scheme
- action's scheme. Cannot be null.term
- action's term. Cannot be null nor empty.title
- action's titleattributes
- set of action's attributespublic URI getScheme()
public void setScheme(URI scheme)
scheme
- action's scheme. Cannot be null.public String getTerm()
public void setTerm(String term)
term
- action's term. Cannot be null nor empty.public String getIdentifier()
getIdentifier
in interface Identifiable
public String getTitle()
public void setTitle(String title)
title
- action's titlepublic boolean containsAttribute(Attribute attribute)
attribute
- attribute to be looked uppublic boolean containsAttribute(String attributeName)
attributeName
- name of the attribute to be looked uppublic boolean addAttribute(Attribute attribute)
attribute
- attribute to be addedpublic Attribute getAttribute(String attributeName)
attributeName
- name of the attribute to be retrievedpublic boolean removeAttribute(Attribute attribute)
attribute
- attribute to be removedpublic Set<Attribute> getAttributes()
public URI getSchemeDefault()
public String getTermDefault()
public int hashCode()
hashCode
in class Object
Object.hashCode()
public boolean equals(Object obj)
equals
in class Object
obj
- object to compare action withObject.equals(java.lang.Object)
public String toString()
toString
in class Object
Object.toString()
public String toText(String resourceLocation)
resourceLocation
- public com.sun.net.httpserver.Headers toHeaders(String resourceLocation)
resourceLocation
- public int compareTo(Action a)
compareTo
in interface Comparable<Action>
Comparable.compareTo(java.lang.Object)
Copyright © 2016. All Rights Reserved.