|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.maven.plugin.doap.DoapUtil
public class DoapUtil
Utility class for DoapMojo
class.
Nested Class Summary | |
---|---|
static class |
DoapUtil.Organization
Utility class for keeping track of DOAP organizations in the DoaP mojo. |
Field Summary | |
---|---|
static int |
DEFAULT_TIMEOUT
The default timeout used when fetching url, i.e. |
protected static java.lang.String |
RDF_NODE_ID
RDF nodeID attribute |
protected static java.lang.String |
RDF_RESOURCE
RDF resource attribute |
Constructor Summary | |
---|---|
DoapUtil()
|
Method Summary | |
---|---|
static DoapUtil.Organization |
addOrganization(java.lang.String name,
java.lang.String url)
put an organization from the pom file in the organization list. |
static void |
fetchURL(org.apache.maven.settings.Settings settings,
java.net.URL url)
Fetch an URL |
static java.util.List<org.apache.maven.model.Contributor> |
getContributorsWithDeveloperRole(org.codehaus.plexus.i18n.I18N i18n,
java.util.List<org.apache.maven.model.Contributor> developersOrContributors)
|
static java.util.List<org.apache.maven.model.Contributor> |
getContributorsWithDocumenterRole(org.codehaus.plexus.i18n.I18N i18n,
java.util.List<org.apache.maven.model.Contributor> developersOrContributors)
|
static java.util.List<org.apache.maven.model.Contributor> |
getContributorsWithHelperRole(org.codehaus.plexus.i18n.I18N i18n,
java.util.List<org.apache.maven.model.Contributor> developersOrContributors)
|
static java.util.List<org.apache.maven.model.Contributor> |
getContributorsWithMaintainerRole(org.codehaus.plexus.i18n.I18N i18n,
java.util.List<org.apache.maven.model.Contributor> developersOrContributors)
|
static java.util.List<org.apache.maven.model.Contributor> |
getContributorsWithTesterRole(org.codehaus.plexus.i18n.I18N i18n,
java.util.List<org.apache.maven.model.Contributor> developersOrContributors)
|
static java.util.List<org.apache.maven.model.Contributor> |
getContributorsWithTranslatorRole(org.codehaus.plexus.i18n.I18N i18n,
java.util.List<org.apache.maven.model.Contributor> developersOrContributors)
|
static java.util.List<org.apache.maven.model.Contributor> |
getContributorsWithUnknownRole(org.codehaus.plexus.i18n.I18N i18n,
java.util.List<org.apache.maven.model.Contributor> developersOrContributors)
|
static java.lang.String |
getNodeId()
get a unique (within the DoaP file) RDF blank node ID |
static java.util.Set<java.util.Map.Entry<java.lang.String,DoapUtil.Organization>> |
getOrganizations()
get the set of Organizations that people are members of |
static java.lang.String |
interpolate(java.lang.String value,
org.apache.maven.project.MavenProject project,
org.apache.maven.settings.Settings settings)
Interpolate a string with project and settings. |
static boolean |
isValidEmail(java.lang.String str)
|
static java.util.List<java.lang.String> |
validate(java.io.File doapFile)
Validate the given DOAP file. |
static void |
writeComment(org.codehaus.plexus.util.xml.XMLWriter writer,
java.lang.String comment)
Write comment. |
static void |
writeElement(org.codehaus.plexus.util.xml.XMLWriter writer,
java.lang.String xmlnsPrefix,
java.lang.String name,
java.lang.String value)
|
static void |
writeElement(org.codehaus.plexus.util.xml.XMLWriter writer,
java.lang.String xmlnsPrefix,
java.lang.String name,
java.lang.String value,
java.lang.String lang)
|
static void |
writeHeader(org.codehaus.plexus.util.xml.XMLWriter writer)
Write comments in the DOAP file header |
static void |
writeRdfNodeIdElement(org.codehaus.plexus.util.xml.XMLWriter writer,
java.lang.String xmlnsPrefix,
java.lang.String name,
java.lang.String value)
|
static void |
writeRdfResourceElement(org.codehaus.plexus.util.xml.XMLWriter writer,
java.lang.String xmlnsPrefix,
java.lang.String name,
java.lang.String value)
|
static void |
writeStartElement(org.codehaus.plexus.util.xml.XMLWriter writer,
java.lang.String xmlnsPrefix,
java.lang.String name)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_TIMEOUT
protected static final java.lang.String RDF_RESOURCE
protected static final java.lang.String RDF_NODE_ID
Constructor Detail |
---|
public DoapUtil()
Method Detail |
---|
public static void writeHeader(org.codehaus.plexus.util.xml.XMLWriter writer)
writer
- not nullpublic static void writeComment(org.codehaus.plexus.util.xml.XMLWriter writer, java.lang.String comment) throws java.lang.IllegalArgumentException
writer
- not nullcomment
- not null
java.lang.IllegalArgumentException
- if comment is null or emptypublic static void writeElement(org.codehaus.plexus.util.xml.XMLWriter writer, java.lang.String xmlnsPrefix, java.lang.String name, java.lang.String value) throws java.lang.IllegalArgumentException
writer
- not nullxmlnsPrefix
- could be nullname
- not nullvalue
- could be null. In this case, the element is not written.
java.lang.IllegalArgumentException
- if name is null or emptypublic static void writeElement(org.codehaus.plexus.util.xml.XMLWriter writer, java.lang.String xmlnsPrefix, java.lang.String name, java.lang.String value, java.lang.String lang) throws java.lang.IllegalArgumentException
writer
- not nullxmlnsPrefix
- could be nullname
- not nulllang
- not nullvalue
- could be null. In this case, the element is not written.
java.lang.IllegalArgumentException
- if name is null or emptypublic static void writeStartElement(org.codehaus.plexus.util.xml.XMLWriter writer, java.lang.String xmlnsPrefix, java.lang.String name) throws java.lang.IllegalArgumentException
writer
- not nullxmlnsPrefix
- could be nullname
- not null
java.lang.IllegalArgumentException
- if name is null or emptypublic static void writeRdfResourceElement(org.codehaus.plexus.util.xml.XMLWriter writer, java.lang.String xmlnsPrefix, java.lang.String name, java.lang.String value) throws java.lang.IllegalArgumentException
writer
- not nullxmlnsPrefix
- could be nullname
- not nullvalue
- could be null. In this case, the element is not written.
java.lang.IllegalArgumentException
- if name is null or emptypublic static void writeRdfNodeIdElement(org.codehaus.plexus.util.xml.XMLWriter writer, java.lang.String xmlnsPrefix, java.lang.String name, java.lang.String value) throws java.lang.IllegalArgumentException
writer
- not nullname
- not nullvalue
- could be null. In this case, the element is not written.
java.lang.IllegalArgumentException
- if name is null or emptypublic static java.util.List<org.apache.maven.model.Contributor> getContributorsWithDeveloperRole(org.codehaus.plexus.i18n.I18N i18n, java.util.List<org.apache.maven.model.Contributor> developersOrContributors)
i18n
- the internationalization componentdevelopersOrContributors
- list of Contributor
Contributor
which have a developer
DOAP role.public static java.util.List<org.apache.maven.model.Contributor> getContributorsWithDocumenterRole(org.codehaus.plexus.i18n.I18N i18n, java.util.List<org.apache.maven.model.Contributor> developersOrContributors)
i18n
- the internationalization componentdevelopersOrContributors
- list of Contributor
Contributor
which have a documenter
DOAP role.public static java.util.List<org.apache.maven.model.Contributor> getContributorsWithHelperRole(org.codehaus.plexus.i18n.I18N i18n, java.util.List<org.apache.maven.model.Contributor> developersOrContributors)
i18n
- the internationalization componentdevelopersOrContributors
- list of Contributor
Contributor
which have an helper
DOAP role.public static java.util.List<org.apache.maven.model.Contributor> getContributorsWithMaintainerRole(org.codehaus.plexus.i18n.I18N i18n, java.util.List<org.apache.maven.model.Contributor> developersOrContributors)
i18n
- the internationalization componentdevelopersOrContributors
- list of Contributor
Contributor
which have a maintainer
DOAP role.public static java.util.List<org.apache.maven.model.Contributor> getContributorsWithTesterRole(org.codehaus.plexus.i18n.I18N i18n, java.util.List<org.apache.maven.model.Contributor> developersOrContributors)
i18n
- the internationalization componentdevelopersOrContributors
- list of Contributor
Contributor
which have a tester
DOAP role.public static java.util.List<org.apache.maven.model.Contributor> getContributorsWithTranslatorRole(org.codehaus.plexus.i18n.I18N i18n, java.util.List<org.apache.maven.model.Contributor> developersOrContributors)
i18n
- the internationalization componentdevelopersOrContributors
- list of Contributor
Contributor
which have a translator
DOAP role.public static java.util.List<org.apache.maven.model.Contributor> getContributorsWithUnknownRole(org.codehaus.plexus.i18n.I18N i18n, java.util.List<org.apache.maven.model.Contributor> developersOrContributors)
i18n
- the internationalization componentdevelopersOrContributors
- list of Contributor
Contributor
which have an unknown
DOAP role.public static DoapUtil.Organization addOrganization(java.lang.String name, java.lang.String url)
name
- from the pom file (e.g. Yoyodyne)url
- from the pom file (e.g. http://yoyodyne.example.org/about)
public static java.lang.String getNodeId()
public static java.util.Set<java.util.Map.Entry<java.lang.String,DoapUtil.Organization>> getOrganizations()
public static java.util.List<java.lang.String> validate(java.io.File doapFile)
doapFile
- not null and should exists.
public static boolean isValidEmail(java.lang.String str)
str
- not null
true
if the str parameter is a valid email, false
otherwise.public static void fetchURL(org.apache.maven.settings.Settings settings, java.net.URL url) throws java.io.IOException
settings
- the user settings used to fetch the url with an active proxy, if defined.url
- the url to fetch
java.io.IOException
- if anyDEFAULT_TIMEOUT
public static java.lang.String interpolate(java.lang.String value, org.apache.maven.project.MavenProject project, org.apache.maven.settings.Settings settings)
value
- could be nullproject
- not nullsettings
- could be null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |