public enum Capability extends Enum<Capability>
Defined values are resourcelist, changelist, resourcedump, changedump, resourcedump-manifest,
changedump-manifest, capabilitylist, and description
.
Enum Constant and Description |
---|
CAPABILITYLIST
A Capability List is a document that enumerates all capabilities supported by a Source for a specific set of resources.
|
CHANGEDUMP
A Change Dump is a document that points to packages containing bitstreams for the Source's changed resources.
|
CHANGEDUMP_MANIFEST
Each ZIP package referred to from a Change Dump must contain a Change Dump Manifest file that
describes the constituent bitstreams of the package.
|
CHANGELIST
A Change List is a document that contains a description of changes to a Source's resources.
|
DESCRIPTION
A Source Description is a mandatory document that enumerates the Capability Lists offered by a Source.
|
RESOURCEDUMP
A Source may publish a Resource Dump, which provides links to packages of the resources' bitstreams.
|
RESOURCEDUMP_MANIFEST
Each ZIP package referred to from a Resource Dump must contain a Resource Dump Manifest file
that describes the package's constituent bitstreams.
|
RESOURCELIST
A Resource List is introduced to list and describe the resources that a Source makes available for synchronization.
|
Modifier and Type | Field and Description |
---|---|
int |
level
The level of the Capability.
|
String |
xmlValue
The value as present in xml on the element
rs:md on the attribute capability . |
Modifier and Type | Method and Description |
---|---|
static Capability |
forString(String xmlValue)
Get the Capability corresponding to the given
xmlValue . |
Capability[] |
getChildRelations()
The capability of possible child documents as expressed in the <loc> element of <url> and
<sitemap>.
|
String[] |
getChildRelationsXmlValues()
The xmlValues of possible child documents as expressed in the <loc> element of <url> and
<sitemap>.
|
Capability |
getIndexRelation()
The capability of a parent document expressed with a link with relation type 'index'.
|
int |
getLevel()
Get the
level of this Capability. |
Capability |
getUpRelation()
The capability of a parent document expressed with a link with relation type 'up'.
|
String |
getXmlValue()
Get the
xmlValue of this Capability. |
static int |
levelfor(String xmlValue)
Get the level of the Capability corresponding to the given
xmlValue . |
static Capability |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Capability[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
boolean |
verifyChildRelation(Capability relation)
Verify that the given Capability is a valid value for possible child documents as expressed in
the <loc> element of <url> and <sitemap>.
|
boolean |
verifyIndexRelation(Capability relation)
Verify that the given Capability is a valid value for the
index relation in a document
of this Capability. |
boolean |
verifyUpRelation(Capability relation)
Verify that the given Capability is a valid value for the
up relation in a document
of this Capability. |
public static final Capability DESCRIPTION
public static final Capability CAPABILITYLIST
public static final Capability RESOURCELIST
public static final Capability RESOURCEDUMP
public static final Capability RESOURCEDUMP_MANIFEST
public static final Capability CHANGELIST
public static final Capability CHANGEDUMP
public static final Capability CHANGEDUMP_MANIFEST
public final String xmlValue
rs:md
on the attribute capability
.public final int level
description
as the highest level (3)
and the resourcedump-manifest
and changedump-manifest
at the lowest level (0).public static Capability[] values()
for (Capability c : Capability.values()) System.out.println(c);
public static Capability valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static Capability forString(String xmlValue) throws IllegalArgumentException
xmlValue
.xmlValue
- String as present in xmlIllegalArgumentException
- if the given string does not correspond to any Capabilitypublic static int levelfor(String xmlValue)
xmlValue
.
The hierarchy of sitemap documents has 4 levels, with description
as the highest level (3)
and resourcedump-manifest
and changedump-manifest
at the lowest level (0).xmlValue
- String as present in xmlpublic String getXmlValue()
xmlValue
of this Capability.public int getLevel()
level
of this Capability.public Capability getUpRelation()
null
if such a
relation does not exist.public Capability getIndexRelation()
null
if such a
relation does not exist.public Capability[] getChildRelations()
public String[] getChildRelationsXmlValues()
getChildRelations()
public boolean verifyUpRelation(Capability relation)
up
relation in a document
of this Capability.relation
- the Capability to testtrue
if the up
relation is valid, false
otherwise.getUpRelation()
public boolean verifyIndexRelation(Capability relation)
index
relation in a document
of this Capability.relation
- the Capability to testtrue
if the index
relation is valid, false
otherwise.getIndexRelation()
public boolean verifyChildRelation(Capability relation)
relation
- the Capability to testtrue
if the child relation is valid, false
otherwise.getChildRelations()
Copyright © 2017. All rights reserved.