BrightSide Workbench Full Report + Source Code
org.turro.documentation.DocumentDefinitions Class Reference
Inheritance diagram for org.turro.documentation.DocumentDefinitions:
Collaboration diagram for org.turro.documentation.DocumentDefinitions:

Public Member Functions

DocumentDefinition get (String name)
 
SortedSet< String > names ()
 
DocumentDefinitions filtered (String root)
 
void save ()
 
 DocumentDefinitions ()
 

Static Public Member Functions

static DocumentDefinitions instance ()
 
static void reset ()
 

Static Protected Member Functions

static DocumentDefinitions load ()
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 39 of file DocumentDefinitions.java.

Constructor & Destructor Documentation

◆ DocumentDefinitions()

org.turro.documentation.DocumentDefinitions.DocumentDefinitions ( )

Definition at line 101 of file DocumentDefinitions.java.

101  {
102  }
Here is the caller graph for this function:

Member Function Documentation

◆ filtered()

DocumentDefinitions org.turro.documentation.DocumentDefinitions.filtered ( String  root)

Definition at line 49 of file DocumentDefinitions.java.

49  {
50  return new DocumentDefinitions(stream().filter(dd -> dd.matches(root)).toList());
51  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get()

DocumentDefinition org.turro.documentation.DocumentDefinitions.get ( String  name)

Definition at line 41 of file DocumentDefinitions.java.

41  {
42  return stream().filter(dd -> dd.getName().equals(name)).findFirst().orElse(null);
43  }
Here is the caller graph for this function:

◆ instance()

static DocumentDefinitions org.turro.documentation.DocumentDefinitions.instance ( )
static

Definition at line 62 of file DocumentDefinitions.java.

62  {
63  return INIT.instance(() -> !watch.isNewer(), () -> load());
64  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ load()

static DocumentDefinitions org.turro.documentation.DocumentDefinitions.load ( )
staticprotected

Definition at line 72 of file DocumentDefinitions.java.

72  {
73  DocumentDefinitions definitions = null;
74  if(watch.exists()) try {
75  watch.reset();
76  JSONSerializer ser = new JSONSerializer(true);
77  definitions = ser.fromJson(FileUtil.getContent(watch.getFile()), DocumentDefinitions.class);
78  } catch (IOException ex) {
79  Logger.getLogger(DocumentDefinitions.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(null), ex);
80  }
81  if(definitions == null) {
82  definitions = new DocumentDefinitions();
83  save(definitions);
84  }
85  return definitions;
86  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ names()

SortedSet<String> org.turro.documentation.DocumentDefinitions.names ( )

Definition at line 45 of file DocumentDefinitions.java.

45  {
46  return new TreeSet(stream().map(dd -> dd.getName()).toList());
47  }
Here is the caller graph for this function:

◆ reset()

static void org.turro.documentation.DocumentDefinitions.reset ( )
static

Definition at line 66 of file DocumentDefinitions.java.

66  {
67  INIT.reset();
68  }
Here is the caller graph for this function:

◆ save()

void org.turro.documentation.DocumentDefinitions.save ( )

Definition at line 53 of file DocumentDefinitions.java.

53  {
54  save(this);
55  }
Here is the caller graph for this function:

The documentation for this class was generated from the following file: