ro.isdc.wro.model
Class WroModelInspector
java.lang.Object
ro.isdc.wro.model.WroModelInspector
public class WroModelInspector
- extends Object
Helper for querying a snapshot of a model. Any changes of the model performed after model inspector instantiation
will not be reflected.
- Since:
- 1.5.0
- Author:
- Alex Objelean
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WroModelInspector
public WroModelInspector(WroModel model)
getGroupByName
public Group getGroupByName(String name)
- Parameters:
name
- of group to find.
- Returns:
- group with searched name (if available) or null otherwise.
getGroupNamesContainingResource
public Collection<String> getGroupNamesContainingResource(String resourceUri)
- Parameters:
resource
- the Resource
to search in all available groups.
- Returns:
- t collection of group names containing provided resource. If the resource is not availalbe, an empty collection
will be returned.
getGroupNames
public final List<String> getGroupNames()
- Returns:
- a set of group names.
hasGroup
public boolean hasGroup(String groupName)
- Parameters:
groupName
- the nam of the group to check.
- Returns:
- true if the provided groupName is available.
getGroupNamesAsString
public String getGroupNamesAsString()
- This implementation would be simpler if java would have closures :).
- Returns:
- a comma separated list of group names.
getAllUniqueResources
public Collection<Resource> getAllUniqueResources()
- Returns:
- the set of all unique resources from all the groups of the model (no particular order).
getAllResources
public Collection<Resource> getAllResources()
- Returns:
- the set of all resources from all the groups of the model (no particular order).
Copyright © 2008-2013. All Rights Reserved.