Class: Lutaml::Xsd::SchemaClassifier

Inherits:
Object
  • Object
show all
Defined in:
lib/lutaml/xsd/schema_classifier.rb

Overview

Classifies schemas in a repository by their role and resolution status Follows single responsibility principle: only classification logic

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(repository) ⇒ SchemaClassifier

Returns a new instance of SchemaClassifier.



10
11
12
# File 'lib/lutaml/xsd/schema_classifier.rb', line 10

def initialize(repository)
  @repository = repository
end

Instance Attribute Details

#repositoryObject (readonly)

Returns the value of attribute repository.



8
9
10
# File 'lib/lutaml/xsd/schema_classifier.rb', line 8

def repository
  @repository
end

Instance Method Details

#classifyHash

Classify all schemas in repository Returns structured classification following MECE principle

Returns:

  • (Hash)

    Classification results with categories



17
18
19
20
21
22
23
24
25
# File 'lib/lutaml/xsd/schema_classifier.rb', line 17

def classify
  {
    entrypoint_schemas: classify_entrypoint_schemas,
    dependency_schemas: classify_dependency_schemas,
    fully_resolved: fully_resolved_schemas,
    partially_resolved: partially_resolved_schemas,
    summary: generate_summary,
  }
end