<commit_before>//////////////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2016, <NAME> - All Rights Reserved                /
//                                                                                       /
// Licensed under the GNU General Public License v3;                                     /
// you may not use this file except in compliance with the License.                      /
//                                                                                       /
// You may obtain a copy of the License at                                               /
//     http://www.gnu.org/licenses/gpl.html                                              /
//                                                                                       /
// Unless required by applicable law or agreed to in writing, software                   /
// distributed under the License is distributed on an "AS IS" BASIS,                     /
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.              /
// See the License for the specific language governing permissions and                   /
// limitations under the License.                                                        /
//                                                                                       /
// Written by <NAME> <<EMAIL>>, March 2016           /
// https://www.github.com/BloodShura                                                     /
//////////////////////////////////////////////////////////////////////////////////////////

package br.shura.venus.component.object;

import br.shura.venus.component.Container;
import br.shura.venus.executor.Context;
import br.shura.x.collection.list.List;
import br.shura.x.collection.list.impl.ArrayList;

/**
 * ObjectDefinition.java
 *
 * @author <a href="https://www.github.com/BloodShura">BloodShura</a> (<NAME>)
 * @contact <EMAIL>
 * @date 29/05/16 - 01:06
 * @since GAMMA - 0x3
 */
public class ObjectDefinition extends Container {
  private final List<Attribute> attributes;
  private final String name;

  public ObjectDefinition(String name) {
    this.attributes = new ArrayList<>();
    this.name = name;
  }

  public List<Attribute> getAttributes() {
    return attributes;
  }

  public String getName() {
    return name;
  }

  @Override
  public void setParent(Container parent) {
    super.setParent(parent);
    this.context = new Context(this, parent.getContext());
  }

  @Override
  public String toString() {<commit_msg>Added ObjectDefinition::getType (part of #23)<commit_after>//////////////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2016, <NAME> - All Rights Reserved                /
//                                                                                       /
// Licensed under the GNU General Public License v3;                                     /
// you may not use this file except in compliance with the License.                      /
//                                                                                       /
// You may obtain a copy of the License at                                               /
//     http://www.gnu.org/licenses/gpl.html                                              /
//                                                                                       /
// Unless required by applicable law or agreed to in writing, software                   /
// distributed under the License is distributed on an "AS IS" BASIS,                     /
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.              /
// See the License for the specific language governing permissions and                   /
// limitations under the License.                                                        /
//                                                                                       /
// Written by <NAME> <<EMAIL>>, March 2016           /
// https://www.github.com/BloodShura                                                     /
//////////////////////////////////////////////////////////////////////////////////////////

package br.shura.venus.component.object;

import br.shura.venus.component.Container;
import br.shura.venus.executor.Context;
import br.shura.venus.type.ObjectType;
import br.shura.venus.type.Type;
import br.shura.x.collection.list.List;
import br.shura.x.collection.list.impl.ArrayList;

/**
 * ObjectDefinition.java
 *
 * @author <a href="https://www.github.com/BloodShura">BloodShura</a> (<NAME>)
 * @contact <EMAIL>
 * @date 29/05/16 - 01:06
 * @since GAMMA - 0x3
 */
public class ObjectDefinition extends Container {
  private final List<Attribute> attributes;
  private final String name;
  private final Type type;

  public ObjectDefinition(String name) {
    this.attributes = new ArrayList<>();
    this.name = name;
    this.type = new ObjectType(name);
  }

  public List<Attribute> getAttributes() {
    return attributes;
  }

  public String getName() {
    return name;
  }

  public Type getType() {
    return type;
  }

  @Override
  public void setParent(Container parent) {
    super.setParent(parent);
    this.context = new Context(this, parent.getContext());
  }

  @Override
  public String toString() {
{'fraction_non_alphanumeric': 0.1512130900883957, 'fraction_numerical': 0.008275343238668423, 'mean_word_length': 1.066045066045066, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 4, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 42, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5759411', 'n_tokens_mistral': 1137, 'n_tokens_neox': 1074, 'n_words': 340}