|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nz.ac.waikato.mcennis.rat.graph.model.ModelShell nz.ac.waikato.mcennis.rat.graph.UserIDList
public class UserIDList
Class that records only those users that initiate links. All other forms of adding a user are disabled. All other apsects of the graph are no-ops. Used to create a subset of all seen users that are represented by a FOAF page (i.e. have been crawled).
Field Summary |
---|
Fields inherited from class nz.ac.waikato.mcennis.rat.graph.model.ModelShell |
---|
listener |
Constructor Summary | |
---|---|
UserIDList()
Creates a new instance of UserIDList |
Method Summary | |
---|---|
void |
add(Actor u)
Add a user to the graph. |
void |
add(Graph g)
Add a graph (g) to the graph. |
void |
add(Link link)
Instead of adding a link, adds the source actor to the list of 'good' actors |
void |
add(PathSet pathSet)
Add a PathSet to this graph. |
void |
add(Property prop)
Add a property to this graph. |
void |
addChild(Graph g)
Set the given graph to be a child of the current graph. |
void |
anonymize()
Replaces all actor IDs with an anonymous numeric ID. |
void |
close()
Close database connections or write to file. |
void |
commit()
Commit the contents to database or storage. |
Actor[] |
getActor()
Retrieve an array of all actors of all types. |
Actor[] |
getActor(java.lang.String type)
Retrieve an array of all actors of a given type. |
Actor |
getActor(java.lang.String type,
java.lang.String ID)
Returns only actors that are present in the index of 'good' actors. |
int |
getActorCount(java.lang.String mode)
Returns the number of actors of the given type |
java.util.Iterator<Actor> |
getActorIterator(java.lang.String type)
Create a read only iterator over all actors. |
java.lang.String[] |
getActorTypes()
List all types - returns null if no actors exist. |
Graph[] |
getChildren()
Returns the children graphs of this object or null if none exist |
Graph |
getChildren(java.lang.String id)
Returns the children graph with the given id or null if there is not a child with that name. |
Graph[] |
getGraphs(java.util.regex.Pattern pattern)
Creates an array of graph objects. |
java.lang.String |
getID()
Return the ID associated with this Graph |
Link[] |
getLink()
Return all user to user links in this graph in an array. |
Link[] |
getLink(java.lang.String type)
Retrieve an array of all userlinks of the given type from this graph or null if no such links are in this graph. |
Link[] |
getLink(java.lang.String type,
Actor sourceActor,
Actor destActor)
Returns all links of the given type (relation) type going from actor sourceActor to actor destActor or null. |
Link[] |
getLinkByDestination(java.lang.String type,
Actor destActor)
Returns all links (edges, arcs) of type (relation) type that point to the given actor. |
Link[] |
getLinkBySource(java.lang.String type,
Actor sourceActor)
Returns all links (edges, arcs) of type (relation) type that go from the given actor to any destination. |
java.lang.String[] |
getLinkTypes()
Returns all link types currently in this graph or null if no links are present. |
Parameter[] |
getParameters()
Obtain a computer-readable description of the parameters and options this graph supports |
Graph |
getParent()
Returns the parent graph of this object or null if this is a root graph |
PathSet[] |
getPathSet()
Return all PathSets associated with this graph. |
PathSet |
getPathSet(java.lang.String id)
Return the named PathSet. |
Property[] |
getProperty()
Returns an array of all properties associated with this object or null if none exist |
Property |
getProperty(java.lang.String type)
Return a property named by the given string or null if no property by this name exists |
Graph |
getSubGraph(java.util.Properties props,
java.util.Set<Actor> actor)
Creates a new graph from the current graph using the Properties props containing the actors actor and all links that link between actors in actor. |
Graph[] |
getSubGraph(Query q)
Return newly created subgraphs that matches the given query FIXME: Currently not implemented in any graph. |
void |
init(java.util.Properties props)
Set the parameters of this graph from the following property object. |
void |
remove(Actor u)
Identifies the given user and removes it and all links involving it from the graph. |
void |
remove(Link ul)
remove all user links with the same type, user ID, and artist ID from the graph |
void |
setID(java.lang.String id)
Set this graph's ID to this value. |
void |
setSubGraph(Query q)
Same as getSubGraph but the resulting graphs are stored internally NOTE: this interface may be removed. |
Methods inherited from class nz.ac.waikato.mcennis.rat.graph.model.ModelShell |
---|
addListener, fireChange |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface nz.ac.waikato.mcennis.rat.graph.model.Model |
---|
addListener |
Constructor Detail |
---|
public UserIDList()
Method Detail |
---|
public void add(Actor u)
Graph
add
in interface Graph
u
- user to be included in the graph.public void add(Link link)
add
in interface Graph
link
- link (arc,edge) to be minedpublic void remove(Actor u)
Graph
remove
in interface Graph
u
- user to be removed from the graph.public void remove(Link ul)
Graph
remove
in interface Graph
ul
- link to be removed from the graph.public Actor getActor(java.lang.String type, java.lang.String ID)
getActor
in interface Graph
ID
- ID string identifying an user
public Actor[] getActor()
Graph
getActor
in interface Graph
public Actor[] getActor(java.lang.String type)
Graph
getActor
in interface Graph
type
- class of actor to return
public java.util.Iterator<Actor> getActorIterator(java.lang.String type)
Graph
getActorIterator
in interface Graph
type
- type (mode) of actor to return
public java.lang.String[] getActorTypes()
Graph
getActorTypes
in interface Graph
public Link[] getLink()
Graph
getLink
in interface Graph
public Link[] getLink(java.lang.String type)
Graph
getLink
in interface Graph
public Link[] getLinkBySource(java.lang.String type, Actor sourceActor)
Graph
getLinkBySource
in interface Graph
type
- type (relation) of link to returnsourceActor
- starting point of the link
public Link[] getLinkByDestination(java.lang.String type, Actor destActor)
Graph
getLinkByDestination
in interface Graph
type
- type (relation) of link to returndestActor
- actor pointed to by links
public Link[] getLink(java.lang.String type, Actor sourceActor, Actor destActor)
Graph
getLink
in interface Graph
type
- type (relation) of the link to returnsourceActor
- starting point of the linkdestActor
- actor pointed to by links
public java.lang.String[] getLinkTypes()
Graph
getLinkTypes
in interface Graph
public Graph[] getSubGraph(Query q)
Graph
getSubGraph
in interface Graph
q
- query object to be executed.
public void setSubGraph(Query q)
Graph
setSubGraph
in interface Graph
q
- Query to be executedpublic Property[] getProperty()
Graph
getProperty
in interface Graph
public Property getProperty(java.lang.String type)
Graph
getProperty
in interface Graph
type
- property's name
public void add(Property prop)
Graph
add
in interface Graph
prop
- property to be added.public PathSet[] getPathSet()
Graph
getPathSet
in interface Graph
public PathSet getPathSet(java.lang.String id)
Graph
getPathSet
in interface Graph
id
- ID of the PathSet to return
public void add(PathSet pathSet)
Graph
add
in interface Graph
pathSet
- PathSet to be added to this graphpublic void setID(java.lang.String id)
Graph
setID
in interface Graph
id
- graph IDpublic java.lang.String getID()
Graph
getID
in interface Graph
public void commit()
Graph
commit
in interface Graph
public void add(Graph g)
Graph
add
in interface Graph
g
- graph to be addedpublic void close()
Graph
close
in interface Graph
public void anonymize()
Graph
anonymize
in interface Graph
public Graph getParent()
Graph
getParent
in interface Graph
public Graph[] getChildren()
Graph
getChildren
in interface Graph
public Graph getChildren(java.lang.String id)
Graph
getChildren
in interface Graph
id
- ID of the graph to return
public void addChild(Graph g)
Graph
addChild
in interface Graph
g
- Child Graphpublic Graph getSubGraph(java.util.Properties props, java.util.Set<Actor> actor)
Graph
getSubGraph
in interface Graph
props
- Properties for creating a new Graphactor
- subset of graph's actors to make the subgraph from
public Graph[] getGraphs(java.util.regex.Pattern pattern)
Graph
getGraphs
in interface Graph
pattern
- Regular expression for identifying graphs
public Parameter[] getParameters()
Graph
getParameters
in interface Graph
public void init(java.util.Properties props)
Graph
init
in interface Graph
props
- properties to be setpublic int getActorCount(java.lang.String mode)
Graph
getActorCount
in interface Graph
mode
- type of actor to query
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |