|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.common.resources.DefaultResource
public final class DefaultResource
Default Resource implementation.
| Method Summary | ||
|---|---|---|
void |
afterUnmarshal(Unmarshaller u,
Object parent)
Invoked after resource unmarshalling, validates generic constraints on the resource |
|
void |
bumpVersion()
|
|
String |
description()
Returns the description of the resource. |
|
boolean |
equals(Object obj)
|
|
|
facet(Class<T> type)
Returns a facet bound to a given type. |
|
Facet |
facet(QName name)
Returns a facet with a given name. |
|
Set<Facet> |
facets()
Returns the facets of the resource. |
|
|
hasFacet(Class<T> type)
Returns true if the resource has a facet bound to a given type. |
|
boolean |
hasFacet(QName name)
Returns true if the resource has a facet with a given name. |
|
int |
hashCode()
|
|
String |
id()
Returns the identifier of the resource |
|
QName |
name()
Returns the name of the resource. |
|
void |
removeFacet(QName name)
Removes a facet with a given name. |
|
void |
setDescription(String description)
Sets the description of the resource. |
|
void |
setFacet(Element facet)
Adds a UntypedFacet with a given data to the resource |
|
void |
setFacet(Facet facet)
Adds a facet to the resource. |
|
void |
setId(String id)
|
|
void |
setName(QName name)
Sets the name of the resource. |
|
long |
version()
Returns the edit version of the resource. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public String id()
Resource
id in interface Resourcepublic void setId(String id)
public long version()
Resource
version in interface Resourcepublic void bumpVersion()
public QName name()
Resource
name in interface Resourcepublic void setName(QName name)
Resource
setName in interface Resourcename - the namepublic String description()
Resource
description in interface Resourcepublic void setDescription(String description)
Resource
setDescription in interface Resourcedescription - the descriptionpublic Set<Facet> facets()
Resource
facets in interface Resourcepublic boolean hasFacet(QName name)
Resourcetrue if the resource has a facet with a given name.
hasFacet in interface Resourcename - the name
true if the resource has a facet with the given name, false otherwisepublic <T extends TypedFacet> boolean hasFacet(Class<T> type)
Resourcetrue if the resource has a facet bound to a given type.
hasFacet in interface Resourcetype - the type
true if the resource has a facet bound to the given type, false otherwise
public Facet facet(QName name)
throws IllegalArgumentException
Resource
facet in interface Resourcename - the name
IllegalArgumentException - if the resource does not have a facet with the given name
public <T extends TypedFacet> T facet(Class<T> type)
throws IllegalArgumentException
Resource
facet in interface Resourcetype - the type
IllegalArgumentException - if the resource does not have a facet bound to the given type
public void removeFacet(QName name)
throws IllegalArgumentException
Resource
removeFacet in interface Resourcename - the name
IllegalArgumentException - if the resource does not have a facet with the given namepublic void setFacet(Facet facet)
Resource
setFacet in interface Resourcefacet - the facetpublic void setFacet(Element facet)
ResourceUntypedFacet with a given data to the resource
setFacet in interface Resourcefacet - the facet's data
public void afterUnmarshal(Unmarshaller u,
Object parent)
throws UnmarshalException
u - the unmarshallerparent - the parent
UnmarshalExceptionpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||