Points.Impl
Modifier and Type | Field and Description |
---|---|
static String |
RVPF_SCHEME
RVPF URI scheme.
|
Constructor and Description |
---|
Metadata(Config config)
Constructs an instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addContentEntity(Optional<ContentEntity> contentEntity)
Adds a content entity to this metadata.
|
void |
addEngineEntity(Optional<EngineEntity> engineEntity)
Adds an engine entity to this metadata.
|
void |
addGroupEntity(Optional<GroupEntity> groupEntity)
Adds a group entity to this metadata.
|
void |
addOriginEntity(Optional<OriginEntity> originEntity)
Adds an origin entity to this metadata.
|
void |
addPointAlias(PointEntity pointEntity,
String alias)
Adds an alias for a point.
|
void |
addPointEntity(Optional<PointEntity> pointEntity)
Adds a point entity to this metadata.
|
void |
addStoreEntity(Optional<StoreEntity> storeEntity)
Adds a store entity to this metadata.
|
void |
addSyncEntity(Optional<SyncEntity> syncEntity)
Adds a sync entity to this metadata.
|
void |
addTransformEntity(Optional<TransformEntity> transformEntity)
Adds a transform entity to this metadata.
|
boolean |
adjustPointsLevel()
Adjusts points level.
|
void |
anchor(Entity entity)
Anchors an entity.
|
void |
cleanUp()
Cleans up unreferenced entities.
|
boolean |
equals(Object other)
The execution of this method is potentially expensive in CPU and
memory.
|
KeyedGroups |
getAttributes()
Gets the attributes.
|
Optional<Attributes> |
getAttributes(String usage)
Gets the attributes for an usage.
|
Config |
getConfig()
Gets the configuration.
|
Collection<ContentEntity> |
getContentEntities()
Gets the content entities registered in this metadata.
|
Optional<ContentEntity> |
getContentEntity(Optional<String> name)
Gets the content entity with the specified name.
|
Optional<BehaviorEntity> |
getDefaultBehavior(Class<?> behaviorClass)
Gets a default behavior entity wrapping the specified class.
|
String |
getDomain()
Gets the domain of this metadata.
|
Collection<EngineEntity> |
getEngineEntities()
Gets the engine entities registered in this metadata.
|
Optional<EngineEntity> |
getEngineEntity(Optional<String> name)
Gets the engine entity with the specified name.
|
MetadataFilter |
getFilter()
Gets the filter.
|
Collection<GroupEntity> |
getGroupEntities()
Gets the group entities registered in this metadata.
|
Optional<GroupEntity> |
getGroupEntity(Optional<String> name)
Gets the group entity with the specified name.
|
Collection<OriginEntity> |
getOriginEntities()
Gets the origin entities registered in this metadata.
|
Optional<OriginEntity> |
getOriginEntity(Optional<String> name)
Gets the origin entity with the specified name.
|
Optional<Point> |
getPoint(String key)
Gets the point with the specified key.
|
Set<String> |
getPointAliases(Point point)
Gets the aliases for a point.
|
Optional<Point> |
getPointByName(String name)
Gets the point with the specified name.
|
Optional<Point> |
getPointByUUID(UUID uuid)
Gets the point with the specified UUID.
|
Collection<Point> |
getPointsCollection()
Gets a collection of the registered points.
|
Collection<StoreEntity> |
getStoreEntities()
Gets the store entities registered in this metadata.
|
Optional<StoreEntity> |
getStoreEntity(Optional<String> name)
Gets the store entity with the specified name.
|
Collection<SyncEntity> |
getSyncEntities()
Gets the sync entities registered in this metadata.
|
Optional<SyncEntity> |
getSyncEntity(Optional<String> name)
Gets the sync entity with the specified name.
|
Collection<TransformEntity> |
getTransformEntities()
Gets the transform entities registered in this metadata.
|
Optional<TransformEntity> |
getTransformEntity(Optional<String> name)
Gets the transform entity with the specified name.
|
URI |
getURI(Entity entity)
Gets a URI for an entity.
|
URL |
getURL()
Gets the URL from which this Config was loaded.
|
int |
hashCode()
Overrides
Object.hashCode() . |
boolean |
isAnchored(Entity entity)
Asks if an entity is anchored.
|
boolean |
isIncluded(URL url)
Asks if the supplied URL is already included.
|
boolean |
registerClassLib(String classLibName)
Registers a ClassLib.
|
void |
setAttributes(KeyedGroups attributes)
Sets attributes.
|
void |
setDefaultBehavior(Class<?> behaviorClass,
BehaviorEntity behaviorEntity)
Sets the default behavior entity wrapping the specified class.
|
void |
setDomain(String domain)
Sets the domain of this metadata.
|
void |
setFilter(MetadataFilter filter)
Sets the filter.
|
void |
setURL(URL url)
Sets the URL from which this Config was loaded.
|
void |
tearDown()
Tears down what has been set up.
|
void |
tearDownPoints()
Tears down points.
|
String |
toString() |
XMLDocument |
toXML()
Converts to XML.
|
boolean |
validatePointsRelationships()
Validates points relationships.
|
addClassDefEntity, addClassLibEntity, addServiceContext, containsProperties, containsProperty, createURL, dataDir, fetchSystemProperties, getBooleanValue, getBooleanValue, getCacheDir, getClassDef, getClassDefEntity, getClassDefs, getClassLibEntity, getClassLoader, getConfigDir, getDataDir, getDoubleValue, getElapsedValue, getEntities, getFile, getIntValue, getPasswordValue, getProperties, getPropertiesGroup, getPropertiesGroups, getRootName, getService, getServiceContext, getServiceContexts, getServiceName, getServiceName, getServiceProperties, getServiceUUID, getStamp, getStringValue, getStringValue, getStringValues, getThisLogger, hasService, keepEntities, registerClassLoader, restoreState, returnEntities, saveState, setClassLoader, setConfigDir, setRootName, setService, setServiceProperties, setUpService, substitute, substitute, updateStamp
public static final String RVPF_SCHEME
public Metadata(@Nonnull Config config)
RVPF processes using the metadata are also provided with a configuration file which may augment or override some parts included in the metadata resource. The Metadata constructor is thus informed of this configuration file to allow the override during properties access.
config
- The process configuration.public void addContentEntity(@Nonnull Optional<ContentEntity> contentEntity)
contentEntity
- The optional content entity.public void addEngineEntity(@Nonnull Optional<EngineEntity> engineEntity)
engineEntity
- The optional engine entity.public void addGroupEntity(@Nonnull Optional<GroupEntity> groupEntity)
groupEntity
- The optional group entity.public void addOriginEntity(@Nonnull Optional<OriginEntity> originEntity)
originEntity
- The optional origin entity.public void addPointAlias(@Nonnull PointEntity pointEntity, @Nonnull String alias)
pointEntity
- The point entity.alias
- The alias.public void addPointEntity(@Nonnull Optional<PointEntity> pointEntity)
pointEntity
- The optional point entity.public void addStoreEntity(@Nonnull Optional<StoreEntity> storeEntity)
storeEntity
- The optional store entity.public void addSyncEntity(@Nonnull Optional<SyncEntity> syncEntity)
syncEntity
- The optional sync entity.public void addTransformEntity(@Nonnull Optional<TransformEntity> transformEntity)
transformEntity
- The optional transform entity.@CheckReturnValue public boolean adjustPointsLevel()
public void anchor(@Nonnull Entity entity)
entity
- The entity.public void cleanUp()
public boolean equals(Object other)
The execution of this method is potentially expensive in CPU and
memory. Together with the corresponding method in Entity classes, it is
intended as a support for validation tests of the
MetadataExporter
.
equals
in class Object
@Nonnull @CheckReturnValue public KeyedGroups getAttributes()
@Nonnull @CheckReturnValue public Optional<Attributes> getAttributes(@Nonnull String usage)
usage
- The usage.@Nonnull @CheckReturnValue public Config getConfig()
Although the metadata is itself a Config instance, this method returns a different object: the overriding configuration supplied to the constructor.
@Nonnull @CheckReturnValue public Collection<ContentEntity> getContentEntities()
@Nonnull @CheckReturnValue public Optional<ContentEntity> getContentEntity(@Nonnull Optional<String> name)
name
- The optional name.@Nonnull @CheckReturnValue public Optional<BehaviorEntity> getDefaultBehavior(@Nonnull Class<?> behaviorClass)
behaviorClass
- The wrapped class of the requested behavior entity.@Nonnull @CheckReturnValue public String getDomain()
@Nonnull @CheckReturnValue public Collection<EngineEntity> getEngineEntities()
@Nonnull @CheckReturnValue public Optional<EngineEntity> getEngineEntity(@Nonnull Optional<String> name)
name
- The optional name.@Nonnull @CheckReturnValue public MetadataFilter getFilter()
@Nonnull @CheckReturnValue public Collection<GroupEntity> getGroupEntities()
@Nonnull @CheckReturnValue public Optional<GroupEntity> getGroupEntity(@Nonnull Optional<String> name)
name
- The optional name.@Nonnull @CheckReturnValue public Collection<OriginEntity> getOriginEntities()
@Nonnull @CheckReturnValue public Optional<OriginEntity> getOriginEntity(@Nonnull Optional<String> name)
name
- The optional name.public Optional<Point> getPoint(String key)
@Nonnull @CheckReturnValue public Set<String> getPointAliases(@Nonnull Point point)
point
- The point.public Optional<Point> getPointByName(String name)
getPointByName
in interface Points
name
- The name.public Optional<Point> getPointByUUID(UUID uuid)
getPointByUUID
in interface Points
uuid
- The UUID.public Collection<Point> getPointsCollection()
getPointsCollection
in interface Points
@Nonnull @CheckReturnValue public Collection<StoreEntity> getStoreEntities()
@Nonnull @CheckReturnValue public Optional<StoreEntity> getStoreEntity(@Nonnull Optional<String> name)
name
- The optional name (empty or unknown returns empty).@Nonnull @CheckReturnValue public Collection<SyncEntity> getSyncEntities()
@Nonnull @CheckReturnValue public Optional<SyncEntity> getSyncEntity(@Nonnull Optional<String> name)
name
- The optional name.@Nonnull @CheckReturnValue public Collection<TransformEntity> getTransformEntities()
@Nonnull @CheckReturnValue public Optional<TransformEntity> getTransformEntity(@Nonnull Optional<String> name)
name
- The optional name.@Nonnull @CheckReturnValue public URI getURI(@Nonnull Entity entity)
entity
- The entity.public URL getURL()
public int hashCode()
Object.hashCode()
.
The metadata objects are not designed to be used as keys in any map object.
hashCode
in class Object
@CheckReturnValue public boolean isAnchored(@Nonnull Entity entity)
entity
- The entity.public boolean isIncluded(URL url)
A subsequent call with an URL which is equal to the supplied URL will return true. This is used while loading the documents to avoid multiple inclusions of the same document.
isIncluded
in class Config
url
- The supplied URL.public boolean registerClassLib(String classLibName)
registerClassLib
in class Config
classLibName
- The name of the ClassLib.public final void setAttributes(@Nonnull KeyedGroups attributes)
attributes
- The attributes.public void setDefaultBehavior(@Nonnull Class<?> behaviorClass, @Nonnull BehaviorEntity behaviorEntity)
behaviorClass
- The wrapped class of the behavior entity.behaviorEntity
- The behavior entity.public void setDomain(@Nonnull String domain)
domain
- The domain of this metadata.public void setFilter(@Nonnull MetadataFilter filter)
filter
- The filter.public void setURL(URL url)
public void tearDown()
public void tearDownPoints()
public XMLDocument toXML()
@CheckReturnValue public boolean validatePointsRelationships()
Copyright © 2003-2019 Serge Brisson. All Rights Reserved.