com.ldodds.foaf.thinlet.model
Class FOAFObject
java.lang.Object
|
+--com.ldodds.foaf.thinlet.model.AnnotableObject
|
+--com.ldodds.foaf.thinlet.model.FOAFObject
- All Implemented Interfaces:
- Annotable, Exportable, Validatable
- Direct Known Subclasses:
- Document, Person
- public abstract class FOAFObject
- extends AnnotableObject
- implements Validatable, Exportable
This code is Public Domain
- Author:
- ccslrd
Method Summary |
protected void |
addValidationError(ValidationError error)
Convenience method for sub-classes allowing validation messages
to be added to an internal list. |
protected boolean |
doValidation()
Should be overridden by sub-classes to provide validation
behaviour |
abstract void |
export(Exporter exporter)
Indicates the object should export itself using the given Exporter. |
java.util.List |
getErrors()
Asks the object for validation errors. |
boolean |
validate()
Asks the object to validate itself. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FOAFObject
public FOAFObject()
addValidationError
protected void addValidationError(ValidationError error)
- Convenience method for sub-classes allowing validation messages
to be added to an internal list.
getErrors
public java.util.List getErrors()
- Description copied from interface:
Validatable
- Asks the object for validation errors.
- Specified by:
getErrors
in interface Validatable
- See Also:
com.ldodds.foaf.thinlet.Validatable#getErrors()
validate
public final boolean validate()
- Description copied from interface:
Validatable
- Asks the object to validate itself. No indication of
validation errors are returned. These should be inspected
with @see #getErrors.
- Specified by:
validate
in interface Validatable
- See Also:
com.ldodds.foaf.thinlet.Validatable#validate()
doValidation
protected boolean doValidation()
- Should be overridden by sub-classes to provide validation
behaviour
export
public abstract void export(Exporter exporter)
throws java.io.IOException
- Description copied from interface:
Exportable
- Indicates the object should export itself using the given
Exporter.
- Specified by:
export
in interface Exportable
- Following copied from interface:
com.ldodds.foaf.thinlet.save.Exportable
- Parameters:
exporter
- the exporter to use