[−][src]Struct graphannis::Graph
A representation of a graph including node annotations and edges. Edges are partioned into components and each component is implemented by specialized graph storage implementation.
Use the CorpusStorage struct to create and manage instances of a Graph
.
Graphs can have an optional location on the disk. In this case, changes to the graph via the apply_update(...) function are automatically persisted to this location.
Methods
impl Graph
[src]
pub fn get_graphstorage(&self, c: &Component) -> Option<Arc<dyn GraphStorage>>
[src]
Get a read-only graph storage reference for the given component c
.
pub fn get_all_components(
&self,
ctype: Option<ComponentType>,
name: Option<&str>
) -> Vec<Component>
[src]
&self,
ctype: Option<ComponentType>,
name: Option<&str>
) -> Vec<Component>
Returns all components of the graph given an optional type (ctype
) and name
.
This allows to filter which components to recieve.
If you want to retrieve all components, use None
as value for both arguments.
pub fn get_node_type_key(&self) -> AnnoKey
[src]
Return the annotation key which is used for the special annis::node_type
annotation which every node must have to mark its existance.
pub fn size_of_cached(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
Trait Implementations
impl AnnotationStorage<u64> for Graph
[src]
fn get_annotations_for_item(&self, item: &NodeID) -> Vec<Annotation>
[src]
fn number_of_annotations(&self) -> usize
[src]
fn number_of_annotations_by_name(
&self,
ns: Option<String>,
name: String
) -> usize
[src]
&self,
ns: Option<String>,
name: String
) -> usize
fn exact_anno_search<'a>(
&'a self,
namespace: Option<String>,
name: String,
value: ValueSearch<String>
) -> Box<dyn Iterator<Item = Match> + 'a>
[src]
&'a self,
namespace: Option<String>,
name: String,
value: ValueSearch<String>
) -> Box<dyn Iterator<Item = Match> + 'a>
fn regex_anno_search<'a>(
&'a self,
namespace: Option<String>,
name: String,
pattern: &str,
negated: bool
) -> Box<dyn Iterator<Item = Match> + 'a>
[src]
&'a self,
namespace: Option<String>,
name: String,
pattern: &str,
negated: bool
) -> Box<dyn Iterator<Item = Match> + 'a>
fn guess_max_count(
&self,
ns: Option<String>,
name: String,
lower_val: &str,
upper_val: &str
) -> usize
[src]
&self,
ns: Option<String>,
name: String,
lower_val: &str,
upper_val: &str
) -> usize
fn guess_max_count_regex(
&self,
ns: Option<String>,
name: String,
pattern: &str
) -> usize
[src]
&self,
ns: Option<String>,
name: String,
pattern: &str
) -> usize
fn get_all_values(&self, key: &AnnoKey, most_frequent_first: bool) -> Vec<&str>
[src]
fn annotation_keys(&self) -> Vec<AnnoKey>
[src]
impl MallocSizeOf for Graph
[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,