usefulinc.com/doap
This class is immutable in practice; its instances can therefore be shared freely and concurrently. Instances are created using a builder to allow optional named constructor parameters and ensure consistent state during creation. E.g. to create a service description with only the required arguments, you'd use:
{@code ServiceDescription d = new ServiceDescription.Builder(name,type).build();}
You can cascade additional calls for optional arguments:
{@code ServiceDescription d = new ServiceDescription.Builder(name,type).paths(path1,path2).logo(logo).build();}
ServiceDescription instances can be serialized to XML. Given such an XML representation, a service description can be instantiated using a static factory method:
{@code ServiceDescription d = ServiceDescription.of(xml);}
To use a given service description (either as an object or as XML) as a template for your service description, you can give it to the builder and add or override values:
{@code ServiceDescription d = newServiceDescription.Builder(xml).paths(path1, path2).logo(logo).build();}
A corresponding XML schema can be generated from this class by running this class as a Java application, see {@link #main(String[])}.
For usage examples, see the tests in {@link ServiceDescriptionTest}.
@see ServiceDescriptionTest
@author
Andy Jackson,
Fabian Steeg