@ThreadSafe
public class MetadataFilter
extends Object
implements Cloneable
A subclass of this class is used to filter the content of the metadata for a process. When a metadata document is read, the appropriate element loader calls these methods to decide if the entity just built should be included in the process metadata.
Modifier and Type | Field and Description |
---|---|
static String |
AFTER_ATTRIBUTE
After attribute.
|
static String |
ATTRIBUTES_ELEMENT
Attributes element.
|
static String |
CONTENTS_ELEMENT
Contents element.
|
static String |
DOMAIN_ATTRIBUTE
Domain attribute.
|
static String |
ENGINE_ATTRIBUTE
Engine attribute.
|
static String |
ENGINE_ELEMENT
Engine element.
|
static String |
ENGINES_ELEMENT
Engines element.
|
static String |
GET_METADATA_ROOT
Root element.
|
static String |
GROUP_ELEMENT
Group element.
|
static String |
GROUPS_ELEMENT
Groups element.
|
static String |
INPUTS_ELEMENT
Inputs element.
|
static String |
ORIGIN_ATTRIBUTE
Origin attribute.
|
static String |
ORIGIN_ELEMENT
Origin element.
|
static String |
ORIGINS_ELEMENT
Origins element.
|
static String |
POINTS_ELEMENT
Points element.
|
static String |
PROPERTIES_ELEMENT
Properties element.
|
static String |
REPLICATES_ELEMENT
Replicates element.
|
static String |
RESULTS_ELEMENT
Results element.
|
static String |
STORE_ATTRIBUTE
Store attribute.
|
static String |
STORE_ELEMENT
Store element.
|
static String |
STORES_ELEMENT
Stores element.
|
static String |
SYNCS_ELEMENT
Syncs element.
|
static String |
TEXTS_ELEMENT
Texts element.
|
static String |
TRANSFORMS_ELEMENT
Transforms element.
|
Constructor and Description |
---|
MetadataFilter(boolean keepEntities)
Constructs an instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
areAttributesNeeded()
Asks if the attributes are needed.
|
boolean |
areAttributesNeeded(String usage)
Asks if the attributes are needed.
|
boolean |
areBehaviorsNeeded()
Asks if the behaviors are needed.
|
boolean |
areContentsNeeded()
Asks if the contents are needed.
|
boolean |
areContentsRequired()
Asks if the contents are required.
|
boolean |
areEnginesFiltered()
Asks if the engines are filtered.
|
boolean |
areEnginesNeeded()
Asks if the engines are needed.
|
boolean |
areEntitiesKept()
Asks if the entities should be kept.
|
boolean |
areGroupsNeeded()
Asks if the groups are needed.
|
boolean |
areOriginsFiltered()
Asks if the origins are filtered.
|
boolean |
areOriginsNeeded()
Asks if the origins are needed.
|
boolean |
areOriginsRequired()
Asks if the origins are required.
|
boolean |
arePermissionsNeeded()
Asks if the permissions are needed.
|
boolean |
arePointInputsFlagged()
Asks if the point's inputs should be flagged as having results.
|
boolean |
arePointInputsNeeded()
Asks if any point's inputs are needed.
|
boolean |
arePointInputsNeeded(PointEntity pointEntity)
Asks if a point's inputs are needed.
|
boolean |
arePointReplicatesNeeded()
Asks if point's replicates are needed.
|
boolean |
arePointsNeeded()
Asks if any point is needed.
|
boolean |
areStoresFiltered()
Asks if the stores are filtered.
|
boolean |
areStoresNeeded()
Asks if the stores are needed.
|
boolean |
areStoresRequired()
Asks if the stores are required.
|
boolean |
areSyncsNeeded()
Asks if the syncs are needed.
|
boolean |
areTextsNeeded()
Asks if the texts are needed.
|
boolean |
areTransformsNeeded()
Asks if the transforms are needed.
|
boolean |
areTransformsRequired()
Asks if the transforms are required.
|
protected MetadataFilter |
callBack()
Returns a child or this to call back.
|
MetadataFilter |
clone() |
Optional<String> |
getClientIdent()
Gets a client identification.
|
String |
getXML(Optional<String> domain,
Optional<DateTime> after)
Gets a XML String to send to a metadata server.
|
protected void |
includeAttributesXML(XMLElement root)
Includes attributes request XML if needed.
|
protected void |
includeContentsXML(XMLElement root)
Includes contents request XML if needed.
|
protected void |
includeEnginesXML(XMLElement root)
Includes engines request XML if needed.
|
protected void |
includeGroupsXML(XMLElement root)
Includes groups request XML if needed.
|
protected void |
includeInputsXML(XMLElement root)
Includes inputs request XML if needed.
|
protected void |
includeOriginsXML(XMLElement root)
Includes origins request XML if needed.
|
protected void |
includePointsXML(XMLElement root)
Includes points request XML if needed.
|
protected void |
includeReplicatesXML(XMLElement root)
Includes replicates request XML if needed.
|
protected void |
includeResultsXML(XMLElement root)
Includes results request XML if needed.
|
protected void |
includeStoresXML(XMLElement root)
Includes stores request XML if needed.
|
protected void |
includeSyncsXML(XMLElement root)
Includes syncs request XML if needed.
|
protected void |
includeTextsXML(XMLElement root)
Includes texts request XML if needed.
|
protected void |
includeTransformsXML(XMLElement root)
Includes transforms request XML if needed.
|
boolean |
isEngineNeeded(EngineEntity engineEntity)
Asks if an engine is needed.
|
boolean |
isOriginNeeded(OriginEntity originEntity)
Asks if an origin is needed.
|
boolean |
isPointNeeded(PointEntity pointEntity)
Asks if a point is needed.
|
boolean |
isPointTransformNeeded(PointEntity pointEntity)
Asks if a point's transform is needed.
|
boolean |
isStoreNeeded(StoreEntity storeEntity)
Asks if a store is needed.
|
protected void |
reset()
Resets to pristine state.
|
boolean |
tidy(Metadata metadata)
Tidies the metadata.
|
String |
toString() |
public static final String AFTER_ATTRIBUTE
public static final String ATTRIBUTES_ELEMENT
public static final String CONTENTS_ELEMENT
public static final String DOMAIN_ATTRIBUTE
public static final String ENGINES_ELEMENT
public static final String ENGINE_ATTRIBUTE
public static final String ENGINE_ELEMENT
public static final String GET_METADATA_ROOT
public static final String GROUPS_ELEMENT
public static final String GROUP_ELEMENT
public static final String INPUTS_ELEMENT
public static final String ORIGINS_ELEMENT
public static final String ORIGIN_ATTRIBUTE
public static final String ORIGIN_ELEMENT
public static final String POINTS_ELEMENT
public static final String PROPERTIES_ELEMENT
public static final String REPLICATES_ELEMENT
public static final String RESULTS_ELEMENT
public static final String STORES_ELEMENT
public static final String STORE_ATTRIBUTE
public static final String STORE_ELEMENT
public static final String SYNCS_ELEMENT
public static final String TEXTS_ELEMENT
public static final String TRANSFORMS_ELEMENT
public MetadataFilter(boolean keepEntities)
keepEntities
- True to keep entities.@CheckReturnValue public boolean areAttributesNeeded()
@CheckReturnValue public boolean areAttributesNeeded(@Nonnull String usage)
usage
- The usage.@CheckReturnValue public boolean areBehaviorsNeeded()
@CheckReturnValue public boolean areContentsNeeded()
@CheckReturnValue public boolean areContentsRequired()
@CheckReturnValue public boolean areEnginesFiltered()
This would be the case if isEngineNeeded(org.rvpf.metadata.entity.EngineEntity)
does not always
return true.
@CheckReturnValue public boolean areEnginesNeeded()
@CheckReturnValue public boolean areEntitiesKept()
@CheckReturnValue public boolean areGroupsNeeded()
@CheckReturnValue public boolean areOriginsFiltered()
This would be the case if isOriginNeeded(org.rvpf.metadata.entity.OriginEntity)
does not always
return true.
@CheckReturnValue public boolean areOriginsNeeded()
@CheckReturnValue public boolean areOriginsRequired()
@CheckReturnValue public boolean arePermissionsNeeded()
@CheckReturnValue public boolean arePointInputsFlagged()
@CheckReturnValue public boolean arePointInputsNeeded()
@CheckReturnValue public boolean arePointInputsNeeded(@Nonnull PointEntity pointEntity) throws ValidationException
pointEntity
- The point Entity.ValidationException
- When appropriate.@CheckReturnValue public boolean arePointReplicatesNeeded()
@CheckReturnValue public boolean arePointsNeeded()
@CheckReturnValue public boolean areStoresFiltered()
This would be the case if isStoreNeeded(org.rvpf.metadata.entity.StoreEntity)
does not always
return true.
@CheckReturnValue public boolean areStoresNeeded()
@CheckReturnValue public boolean areStoresRequired()
@CheckReturnValue public boolean areSyncsNeeded()
@CheckReturnValue public boolean areTextsNeeded()
@CheckReturnValue public boolean areTransformsNeeded()
@CheckReturnValue public boolean areTransformsRequired()
public final MetadataFilter clone()
clone
in class Object
@Nonnull @CheckReturnValue public Optional<String> getClientIdent()
@Nonnull @CheckReturnValue public String getXML(@Nonnull Optional<String> domain, @Nonnull Optional<DateTime> after)
domain
- The optional application domain.after
- The optional last update time.@CheckReturnValue public boolean isEngineNeeded(@Nonnull EngineEntity engineEntity) throws ValidationException
engineEntity
- The engine entity.ValidationException
- When appropriate.@CheckReturnValue public boolean isOriginNeeded(@Nonnull OriginEntity originEntity) throws ValidationException
originEntity
- The origin entity.ValidationException
- When appropriate.@CheckReturnValue public boolean isPointNeeded(@Nonnull PointEntity pointEntity) throws ValidationException
pointEntity
- The point entity.ValidationException
- When appropriate.@CheckReturnValue public boolean isPointTransformNeeded(@Nonnull PointEntity pointEntity) throws ValidationException
pointEntity
- The point entity.ValidationException
- When appropriate.@CheckReturnValue public boolean isStoreNeeded(@Nonnull StoreEntity storeEntity) throws ValidationException
storeEntity
- The store entity.ValidationException
- When appropriate.@CheckReturnValue public boolean tidy(@Nonnull Metadata metadata)
This is called after the document is loaded.
metadata
- The metadata.public String toString()
toString
in class Object
@CheckReturnValue protected MetadataFilter callBack()
protected void includeAttributesXML(@Nonnull XMLElement root)
root
- The root of the XML being built.protected void includeContentsXML(@Nonnull XMLElement root)
root
- The root of the XML being built.protected void includeEnginesXML(@Nonnull XMLElement root)
root
- The root of the XML being built.protected void includeGroupsXML(@Nonnull XMLElement root)
root
- The root of the XML being built.protected void includeInputsXML(@Nonnull XMLElement root)
root
- The root of the XML being built.protected void includeOriginsXML(@Nonnull XMLElement root)
root
- The root of the XML being built.protected void includePointsXML(@Nonnull XMLElement root)
root
- The root of the XML being built.protected void includeReplicatesXML(@Nonnull XMLElement root)
root
- The root of the XML being built.protected void includeResultsXML(@Nonnull XMLElement root)
root
- The root of the XML being built.protected void includeStoresXML(@Nonnull XMLElement root)
root
- The root of the XML being built.protected void includeSyncsXML(@Nonnull XMLElement root)
root
- The root of the XML being built.protected void includeTextsXML(@Nonnull XMLElement root)
root
- The root of the XML being built.protected void includeTransformsXML(@Nonnull XMLElement root)
root
- The root of the XML being built.protected void reset()
Note: when overriding, call super last to complete reset.
Copyright © 2003-2019 Serge Brisson. All Rights Reserved.