public String[] getFieldCompletions(final String factType) { return this.getModelFields( factType ); }
public String[] getFieldCompletions(FieldAccessorsAndMutators accessorOrMutator, String factType) { return this.getModelFields( accessorOrMutator, factType ); }
public String[] getFieldCompletions(FieldAccessorsAndMutators accessorOrMutator, String factType) { return this.getModelFields( accessorOrMutator, factType ); }
public String[] getFieldCompletions(final String factType) { return this.getModelFields( factType ); }
public void setFieldsForTypes(Map<String, ModelField[]> fieldsForType) { this.getModelFields().clear(); this.getModelFields().putAll( fieldsForType ); }
public void setFactTypes(String[] factTypes) { for ( String factType : factTypes ) { //adds the fact type with no fields. this.getModelFields().put( factType, new ModelField[0] ); } }
public void setFactTypes(String[] factTypes) { for ( String factType : factTypes ) { //adds the fact type with no fields. this.getModelFields().put( factType, new ModelField[0] ); } }
public void setFieldsForTypes(Map<String, ModelField[]> fieldsForType) { this.getModelFields().clear(); this.getModelFields().putAll( fieldsForType ); }
/** * Returns all the fact types. * * @return */ public String[] getFactTypes() { String[] types = this.getModelFields().keySet().toArray( new String[this.getModelFields().size()] ); Arrays.sort( types ); return types; }
/** * Returns all the fact types. * * @return */ public String[] getFactTypes() { String[] types = this.getModelFields().keySet().toArray( new String[this.getModelFields().size()] ); Arrays.sort( types ); return types; }
public boolean containsFactType(String modelClassName) { if ( modelClassName == null ) { return false; } if ( modelClassName.contains( "." ) ) { modelClassName = modelClassName.substring( modelClassName.lastIndexOf( "." ) + 1 ); } return this.getModelFields().containsKey( modelClassName ); }
public boolean containsFactType(String modelClassName) { if ( modelClassName == null ) { return false; } if ( modelClassName.contains( "." ) ) { modelClassName = modelClassName.substring( modelClassName.lastIndexOf( "." ) + 1 ); } return this.getModelFields().containsKey( modelClassName ); }
public String[] getModelFields(String modelClassName) { String shortName = this.getFactNameFromType( modelClassName ); if ( !this.getModelFields().containsKey( shortName ) ) { return new String[0]; } ModelField[] fields = this.getModelFields().get( shortName ); String[] fieldNames = new String[fields.length]; for ( int i = 0; i < fields.length; i++ ) { fieldNames[i] = fields[i].getName(); } return fieldNames; }
public String[] getModelFields(String modelClassName) { String shortName = this.getFactNameFromType( modelClassName ); if ( !this.getModelFields().containsKey( shortName ) ) { return new String[0]; } ModelField[] fields = this.getModelFields().get( shortName ); String[] fieldNames = new String[fields.length]; for ( int i = 0; i < fields.length; i++ ) { fieldNames[i] = fields[i].getName(); } return fieldNames; }
public String[] getFieldCompletionsForGlobalVariable(final String varName) { final String type = this.getGlobalVariable( varName ); return this.getModelFields( type ); }
public String[] getFieldCompletionsForGlobalVariable(final String varName) { final String type = this.getGlobalVariable( varName ); return this.getModelFields( type ); }
public String[] getModelFields(FieldAccessorsAndMutators accessorOrMutator, String modelClassName) { String shortName = this.getFactNameFromType( modelClassName ); if ( !this.getModelFields().containsKey( shortName ) ) { return new String[0]; } ModelField[] fields = this.getModelFields().get( shortName ); List<String> fieldNames = new ArrayList<String>(); for ( int i = 0; i < fields.length; i++ ) { String fieldName = fields[i].getName(); if ( FieldAccessorsAndMutators.compare( accessorOrMutator, this.accessorsAndMutators.get( shortName + "." + fieldName ) ) ) { fieldNames.add( fieldName ); } } return fieldNames.toArray( new String[fieldNames.size()] ); }
public String[] getModelFields(FieldAccessorsAndMutators accessorOrMutator, String modelClassName) { String shortName = this.getFactNameFromType( modelClassName ); if ( !this.getModelFields().containsKey( shortName ) ) { return new String[0]; } ModelField[] fields = this.getModelFields().get( shortName ); List<String> fieldNames = new ArrayList<String>(); for ( int i = 0; i < fields.length; i++ ) { String fieldName = fields[i].getName(); if ( FieldAccessorsAndMutators.compare( accessorOrMutator, this.accessorsAndMutators.get( shortName + "." + fieldName ) ) ) { fieldNames.add( fieldName ); } } return fieldNames.toArray( new String[fieldNames.size()] ); }
public ModelField getField(String modelClassName, String fieldName) { String shortName = this.getFactNameFromType( modelClassName ); ModelField[] fields = this.getModelFields().get( shortName ); if ( fields == null ) { return null; } for ( ModelField modelField : fields ) { if ( modelField.getName().equals( fieldName ) ) { return modelField; } } return null; }
public ModelField getField(String modelClassName, String fieldName) { String shortName = this.getFactNameFromType( modelClassName ); ModelField[] fields = this.getModelFields().get( shortName ); if ( fields == null ) { return null; } for ( ModelField modelField : fields ) { if ( modelField.getName().equals( fieldName ) ) { return modelField; } } return null; }