|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.okapi.common.resource.Property
public class Property
Represents a read-only or a modifiable property associated with a resource.
For example the HREF attribute of the element A in HTML would be a property.
Note that translatable data (such as the text of an attribute ALT of an IMG element in HTML)
must be stored in TextUnit rather that Property.
| Field Summary | |
|---|---|
protected Annotations |
annotations
|
static java.lang.String |
APPROVED
|
static java.lang.String |
COORDINATES
|
static java.lang.String |
ENCODING
|
static java.lang.String |
LANGUAGE
|
static java.lang.String |
NOTE
|
static java.lang.String |
TRANSNOTE
|
| Constructor Summary | |
|---|---|
Property(java.lang.String name,
java.lang.String value)
Creates a new read-only property object with a name and a value. |
|
Property(java.lang.String name,
java.lang.String value,
boolean isReadOnly)
Creates a new property object with a name, a vale and its read-only flag. |
|
| Method Summary | ||
|---|---|---|
Property |
clone()
Clones this property. |
|
|
getAnnotation(java.lang.Class<? extends IAnnotation> type)
Gets the annotation of a given type for this property. |
|
Annotations |
getAnnotations()
|
|
boolean |
getBoolean()
Gets the boolean value of this property. |
|
java.lang.String |
getName()
Gets the name of this property. |
|
java.lang.String |
getValue()
Gets the value of this property. |
|
boolean |
isReadOnly()
Indicates if this property is read-only. |
|
void |
setAnnotation(IAnnotation annotation)
Sets an annotation for this property. |
|
void |
setValue(java.lang.String value)
Sets a new value for this property. |
|
java.lang.String |
toString()
Gets the string representation of this property. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ENCODING
public static final java.lang.String LANGUAGE
public static final java.lang.String APPROVED
public static final java.lang.String NOTE
public static final java.lang.String TRANSNOTE
public static final java.lang.String COORDINATES
protected Annotations annotations
| Constructor Detail |
|---|
public Property(java.lang.String name,
java.lang.String value,
boolean isReadOnly)
name - the name of the property (case-sensitive).value - the value of the property.isReadOnly - true if the property cannot be modified using the filter, false if you
can modify the value in the output document.
public Property(java.lang.String name,
java.lang.String value)
name - the name of the property (case-sensitive)value - the value of the property.| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Objectpublic Property clone()
clone in class java.lang.Objectpublic java.lang.String getName()
public java.lang.String getValue()
public boolean getBoolean()
public void setValue(java.lang.String value)
value - the new value to set.public boolean isReadOnly()
All property can be changed, but the ones flagged as read-only cannot be modified when re-writing the document from where they have been extracted.
public <A> A getAnnotation(java.lang.Class<? extends IAnnotation> type)
type - the type of annotation to retrieve.
public void setAnnotation(IAnnotation annotation)
annotation - the annotation object to set.public Annotations getAnnotations()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||