Class MetadataSet.Builder
java.lang.Object
com.adobe.epubcheck.opf.MetadataSet.Builder
- Enclosing class:
MetadataSet
A builder for sets of metadata expressions.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.google.common.collect.Multimap<Property, MetadataSet.Metadata> private final com.google.common.collect.Multimap<Property, MetadataSet.Metadata> private final com.google.common.collect.Multimap<String, MetadataSet.Metadata> private final Map<MetadataSet.Metadata, MetadataSet.Metadata> private final LinkedList<MetadataSet.Metadata> private final Map<MetadataSet.Metadata, MetadataSet.Builder.Visit> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the set.private MetadataSet.Metadatabuild(MetadataSet.Metadata meta) Adds a metadata expression to the set being built.
-
Field Details
-
-
all
-
tempMetas
-
refinersMap
-
refines
-
visits
-
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
Builds the set. Must be called after all metadata expressions have been added.- Returns:
- an immutable metadata set
- Throws:
IllegalStateException- if a cycle is found in the graph of refining expressions
-
build
-
meta
Adds a metadata expression to the set being built.- Parameters:
id- the ID of the element holding the expression, can be null.property- the property representing the statement of the expression (must not be null)value- the value representing the assertion of the expression (can, but should not, be null)refines- the ID of the expression or resource refined by this expression. If the given string starts with the character '#' (relative fragment URI), it is stripped to get the ID. Can be null- Returns:
- this builder
-