test_class.declarator: testdataDirectory = "ltmWriter"
test_class.modifier: private final static
test_class.original_string: private final static String testdataDirectory = "ltmWriter";
test_class.type: String
test_class.var_name: testdataDirectory
test_class.declarator: builder
test_class.modifier: private
test_class.original_string: private TopicMapBuilderIF builder;
test_class.type: TopicMapBuilderIF
test_class.var_name: builder
test_class.declarator: tm
test_class.modifier: private
test_class.original_string: private TopicMapIF tm;
test_class.type: TopicMapIF
test_class.var_name: tm
test_class.file: ontopia-engine/src/test/java/net/ontopia/topicmaps/utils/ltm/LTMTopicMapWriterTest.java
test_class.identifier: LTMTopicMapWriterTest
test_case.body: @Test
    public void testBadId() throws IOException {
      LocatorIF base = new URILocator("http://example.com");
      TopicIF topic = builder.makeTopic();
      topic.addItemIdentifier(base.resolveAbsolute("#22"));
      
      String root = TestFileUtils.getTestdataOutputDirectory();
      TestFileUtils.verifyDirectory(root, testdataDirectory);
      String thebase = root + File.separator + testdataDirectory + File.separator;
      TestFileUtils.verifyDirectory(thebase, "out");
      File file = new File(thebase + File.separator + "out" + File.separator +
        "testBadId.ltm");
      
      new LTMTopicMapWriter(file).write(tm);
  
      tm = new LTMTopicMapReader(file).read();
      topic = (TopicIF) tm.getTopics().iterator().next();
      LocatorIF itemid = (LocatorIF) topic.getItemIdentifiers().iterator().next();
      Assert.assertTrue("Bad item ID was not filtered out",
                 itemid.getAddress().endsWith("testBadId.ltm#id1"));
    }
test_case.class_method_signature: LTMTopicMapWriterTest.testBadId()
test_case.full_signature: @Test public void testBadId()
test_case.identifier: testBadId
test_case.invocations: makeTopic addItemIdentifier resolveAbsolute getTestdataOutputDirectory verifyDirectory verifyDirectory write read next iterator getTopics next iterator getItemIdentifiers assertTrue endsWith getAddress
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testBadId()
focal_class.declarator: COLON = " : "
focal_class.modifier: private static final
focal_class.original_string: private static final String COLON = " : ";
focal_class.type: String
focal_class.var_name: COLON
focal_class.declarator: PROPERTY_PREFIXES = "prefixes"
focal_class.modifier: public static final
focal_class.original_string: public static final String PROPERTY_PREFIXES = "prefixes";
focal_class.type: String
focal_class.var_name: PROPERTY_PREFIXES
focal_class.declarator: PROPERTY_FILTER = "filter"
focal_class.modifier: public static final
focal_class.original_string: public static final String PROPERTY_FILTER = "filter";
focal_class.type: String
focal_class.var_name: PROPERTY_FILTER
focal_class.declarator: PROPERTY_PRESERVE_IDS = "preserveIds"
focal_class.modifier: public static final
focal_class.original_string: public static final String PROPERTY_PRESERVE_IDS = "preserveIds";
focal_class.type: String
focal_class.var_name: PROPERTY_PRESERVE_IDS
focal_class.declarator: log = LoggerFactory.getLogger(LTMTopicMapWriter.class.getName())
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = LoggerFactory.getLogger(LTMTopicMapWriter.class.getName());
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: encoding
focal_class.modifier: protected
focal_class.original_string: protected String encoding;
focal_class.type: String
focal_class.var_name: encoding
focal_class.declarator: preserveIds
focal_class.modifier: protected
focal_class.original_string: protected boolean preserveIds;
focal_class.type: boolean
focal_class.var_name: preserveIds
focal_class.declarator: roleCounter
focal_class.modifier: protected
focal_class.original_string: protected Map<String, Integer> roleCounter;
focal_class.type: Map<String, Integer>
focal_class.var_name: roleCounter
focal_class.declarator: rolesCounted
focal_class.modifier: protected
focal_class.original_string: protected Map<String, Boolean> rolesCounted;
focal_class.type: Map<String, Boolean>
focal_class.var_name: rolesCounted
focal_class.declarator: out
focal_class.modifier: protected
focal_class.original_string: protected Writer out;
focal_class.type: Writer
focal_class.var_name: out
focal_class.declarator: closeWriter = false
focal_class.modifier: protected
focal_class.original_string: protected boolean closeWriter = false;
focal_class.type: boolean
focal_class.var_name: closeWriter
focal_class.declarator: calendar
focal_class.modifier: protected
focal_class.original_string: protected Calendar calendar;
focal_class.type: Calendar
focal_class.var_name: calendar
focal_class.declarator: base
focal_class.modifier: protected
focal_class.original_string: protected String base;
focal_class.type: String
focal_class.var_name: base
focal_class.declarator: filter
focal_class.modifier: protected
focal_class.original_string: protected DeciderIF<Object> filter;
focal_class.type: DeciderIF<Object>
focal_class.var_name: filter
focal_class.declarator: associationComparator
focal_class.modifier: protected
focal_class.original_string: protected Comparator<AssociationIF> associationComparator;
focal_class.type: Comparator<AssociationIF>
focal_class.var_name: associationComparator
focal_class.declarator: baseNameComparator
focal_class.modifier: protected
focal_class.original_string: protected Comparator<TopicNameIF> baseNameComparator;
focal_class.type: Comparator<TopicNameIF>
focal_class.var_name: baseNameComparator
focal_class.declarator: elementIdComparator
focal_class.modifier: protected
focal_class.original_string: protected Comparator<TopicIF> elementIdComparator;
focal_class.type: Comparator<TopicIF>
focal_class.var_name: elementIdComparator
focal_class.declarator: supersubComparator
focal_class.modifier: protected
focal_class.original_string: protected Comparator<AssociationIF> supersubComparator;
focal_class.type: Comparator<AssociationIF>
focal_class.var_name: supersubComparator
focal_class.declarator: supersubRoleComparator
focal_class.modifier: protected
focal_class.original_string: protected Comparator<AssociationRoleIF> supersubRoleComparator;
focal_class.type: Comparator<AssociationRoleIF>
focal_class.var_name: supersubRoleComparator
focal_class.declarator: occurrenceComparator
focal_class.modifier: protected
focal_class.original_string: protected Comparator<OccurrenceIF> occurrenceComparator;
focal_class.type: Comparator<OccurrenceIF>
focal_class.var_name: occurrenceComparator
focal_class.declarator: reifierComparator
focal_class.modifier: protected
focal_class.original_string: protected Comparator<Collection<TopicIF>> reifierComparator;
focal_class.type: Comparator<Collection<TopicIF>>
focal_class.var_name: reifierComparator
focal_class.declarator: roleComparator
focal_class.modifier: protected
focal_class.original_string: protected Comparator<AssociationRoleIF> roleComparator;
focal_class.type: Comparator<AssociationRoleIF>
focal_class.var_name: roleComparator
focal_class.declarator: scopeComparator
focal_class.modifier: protected
focal_class.original_string: protected Comparator<Collection<TopicIF>> scopeComparator;
focal_class.type: Comparator<Collection<TopicIF>>
focal_class.var_name: scopeComparator
focal_class.declarator: topicComparator
focal_class.modifier: protected
focal_class.original_string: protected Comparator<TopicIF> topicComparator;
focal_class.type: Comparator<TopicIF>
focal_class.var_name: topicComparator
focal_class.declarator: variantComparator
focal_class.modifier: protected
focal_class.original_string: protected Comparator<VariantNameIF> variantComparator;
focal_class.type: Comparator<VariantNameIF>
focal_class.var_name: variantComparator
focal_class.declarator: idManager
focal_class.modifier: protected
focal_class.original_string: protected IdManager idManager;
focal_class.type: IdManager
focal_class.var_name: idManager
focal_class.declarator: groupString1
focal_class.modifier: protected
focal_class.original_string: protected String groupString1;
focal_class.type: String
focal_class.var_name: groupString1
focal_class.declarator: prefixes = new HashMap<String, String>()
focal_class.modifier: private
focal_class.original_string: private Map<String, String> prefixes = new HashMap<String, String>();
focal_class.type: Map<String, String>
focal_class.var_name: prefixes
focal_class.file: ontopia-engine/src/main/java/net/ontopia/topicmaps/utils/ltm/LTMTopicMapWriter.java
focal_class.identifier: LTMTopicMapWriter
focal_class.interfaces: implements TopicMapWriterIF
focal_class.class_method_signature: LTMTopicMapWriter.LTMTopicMapWriter(File file)
focal_class.full_signature: public  LTMTopicMapWriter(File file)
focal_class.identifier: LTMTopicMapWriter
focal_class.modifiers: public
focal_class.parameters: (File file)
focal_class.signature:  LTMTopicMapWriter(File file)
focal_class.class_method_signature: LTMTopicMapWriter.LTMTopicMapWriter(File file, String encoding)
focal_class.full_signature: public  LTMTopicMapWriter(File file, String encoding)
focal_class.identifier: LTMTopicMapWriter
focal_class.modifiers: public
focal_class.parameters: (File file, String encoding)
focal_class.signature:  LTMTopicMapWriter(File file, String encoding)
focal_class.class_method_signature: LTMTopicMapWriter.LTMTopicMapWriter(OutputStream stream)
focal_class.full_signature: public  LTMTopicMapWriter(OutputStream stream)
focal_class.identifier: LTMTopicMapWriter
focal_class.modifiers: public
focal_class.parameters: (OutputStream stream)
focal_class.signature:  LTMTopicMapWriter(OutputStream stream)
focal_class.class_method_signature: LTMTopicMapWriter.LTMTopicMapWriter(OutputStream stream, String encoding)
focal_class.full_signature: public  LTMTopicMapWriter(OutputStream stream, String encoding)
focal_class.identifier: LTMTopicMapWriter
focal_class.modifiers: public
focal_class.parameters: (OutputStream stream, String encoding)
focal_class.signature:  LTMTopicMapWriter(OutputStream stream, String encoding)
focal_class.class_method_signature: LTMTopicMapWriter.LTMTopicMapWriter(Writer out, String encoding)
focal_class.full_signature: public  LTMTopicMapWriter(Writer out, String encoding)
focal_class.identifier: LTMTopicMapWriter
focal_class.modifiers: public
focal_class.parameters: (Writer out, String encoding)
focal_class.signature:  LTMTopicMapWriter(Writer out, String encoding)
focal_class.class_method_signature: LTMTopicMapWriter.setPreserveIds(boolean preserveIds)
focal_class.full_signature: public void setPreserveIds(boolean preserveIds)
focal_class.identifier: setPreserveIds
focal_class.modifiers: public
focal_class.parameters: (boolean preserveIds)
focal_class.return: void
focal_class.signature: void setPreserveIds(boolean preserveIds)
focal_class.class_method_signature: LTMTopicMapWriter.setFilter(DeciderIF<Object> filter)
focal_class.full_signature: public void setFilter(DeciderIF<Object> filter)
focal_class.identifier: setFilter
focal_class.modifiers: public
focal_class.parameters: (DeciderIF<Object> filter)
focal_class.return: void
focal_class.signature: void setFilter(DeciderIF<Object> filter)
focal_class.class_method_signature: LTMTopicMapWriter.hasUnfiltered(Collection<? extends TMObjectIF> collection)
focal_class.full_signature: private boolean hasUnfiltered(Collection<? extends TMObjectIF> collection)
focal_class.identifier: hasUnfiltered
focal_class.modifiers: private
focal_class.parameters: (Collection<? extends TMObjectIF> collection)
focal_class.return: boolean
focal_class.signature: boolean hasUnfiltered(Collection<? extends TMObjectIF> collection)
focal_class.class_method_signature: LTMTopicMapWriter.addPrefix(String key, String prefix)
focal_class.full_signature: public boolean addPrefix(String key, String prefix)
focal_class.identifier: addPrefix
focal_class.modifiers: public
focal_class.parameters: (String key, String prefix)
focal_class.return: boolean
focal_class.signature: boolean addPrefix(String key, String prefix)
focal_class.class_method_signature: LTMTopicMapWriter.write(TopicMapIF tm)
focal_class.full_signature: @Override public void write(TopicMapIF tm)
focal_class.identifier: write
focal_class.modifiers: @Override public
focal_class.parameters: (TopicMapIF tm)
focal_class.return: void
focal_class.signature: void write(TopicMapIF tm)
focal_class.class_method_signature: LTMTopicMapWriter.writeTopics(Collection<TopicIF> topics)
focal_class.full_signature: private void writeTopics(Collection<TopicIF> topics)
focal_class.identifier: writeTopics
focal_class.modifiers: private
focal_class.parameters: (Collection<TopicIF> topics)
focal_class.return: void
focal_class.signature: void writeTopics(Collection<TopicIF> topics)
focal_class.class_method_signature: LTMTopicMapWriter.playerAssociations(Collection<TopicIF> rolePlayers,
        Collection<AssociationIF> associations)
focal_class.full_signature: private SortedSet<AssociationIF> playerAssociations(Collection<TopicIF> rolePlayers,
        Collection<AssociationIF> associations)
focal_class.identifier: playerAssociations
focal_class.modifiers: private
focal_class.parameters: (Collection<TopicIF> rolePlayers,
        Collection<AssociationIF> associations)
focal_class.return: SortedSet<AssociationIF>
focal_class.signature: SortedSet<AssociationIF> playerAssociations(Collection<TopicIF> rolePlayers,
        Collection<AssociationIF> associations)
focal_class.class_method_signature: LTMTopicMapWriter.topicTypes(Collection<TopicIF> topics, Collection<TopicIF> topicInstances)
focal_class.full_signature: private SortedSet<TopicIF> topicTypes(Collection<TopicIF> topics, Collection<TopicIF> topicInstances)
focal_class.identifier: topicTypes
focal_class.modifiers: private
focal_class.parameters: (Collection<TopicIF> topics, Collection<TopicIF> topicInstances)
focal_class.return: SortedSet<TopicIF>
focal_class.signature: SortedSet<TopicIF> topicTypes(Collection<TopicIF> topics, Collection<TopicIF> topicInstances)
focal_class.class_method_signature: LTMTopicMapWriter.associationTypes(Collection<AssociationIF> associations,
        Collection<TopicIF> topicInstances)
focal_class.full_signature: private SortedSet<TopicIF> associationTypes(Collection<AssociationIF> associations,
        Collection<TopicIF> topicInstances)
focal_class.identifier: associationTypes
focal_class.modifiers: private
focal_class.parameters: (Collection<AssociationIF> associations,
        Collection<TopicIF> topicInstances)
focal_class.return: SortedSet<TopicIF>
focal_class.signature: SortedSet<TopicIF> associationTypes(Collection<AssociationIF> associations,
        Collection<TopicIF> topicInstances)
focal_class.class_method_signature: LTMTopicMapWriter.roleTypes(Collection<AssociationIF> associations, Collection<TopicIF> topicInstances)
focal_class.full_signature: private SortedSet<TopicIF> roleTypes(Collection<AssociationIF> associations, Collection<TopicIF> topicInstances)
focal_class.identifier: roleTypes
focal_class.modifiers: private
focal_class.parameters: (Collection<AssociationIF> associations, Collection<TopicIF> topicInstances)
focal_class.return: SortedSet<TopicIF>
focal_class.signature: SortedSet<TopicIF> roleTypes(Collection<AssociationIF> associations, Collection<TopicIF> topicInstances)
focal_class.class_method_signature: LTMTopicMapWriter.occurrenceTypes(Collection<TopicIF> topics, Collection<TopicIF> topicInstances)
focal_class.full_signature: private SortedSet<TopicIF> occurrenceTypes(Collection<TopicIF> topics, Collection<TopicIF> topicInstances)
focal_class.identifier: occurrenceTypes
focal_class.modifiers: private
focal_class.parameters: (Collection<TopicIF> topics, Collection<TopicIF> topicInstances)
focal_class.return: SortedSet<TopicIF>
focal_class.signature: SortedSet<TopicIF> occurrenceTypes(Collection<TopicIF> topics, Collection<TopicIF> topicInstances)
focal_class.class_method_signature: LTMTopicMapWriter.sort(Collection<E> collection, Comparator<? super E> comparator)
focal_class.full_signature: private SortedSet<E> sort(Collection<E> collection, Comparator<? super E> comparator)
focal_class.identifier: sort
focal_class.modifiers: private
focal_class.parameters: (Collection<E> collection, Comparator<? super E> comparator)
focal_class.return: SortedSet<E>
focal_class.signature: SortedSet<E> sort(Collection<E> collection, Comparator<? super E> comparator)
focal_class.class_method_signature: LTMTopicMapWriter.getElementId(TopicIF topic)
focal_class.full_signature: private String getElementId(TopicIF topic)
focal_class.identifier: getElementId
focal_class.modifiers: private
focal_class.parameters: (TopicIF topic)
focal_class.return: String
focal_class.signature: String getElementId(TopicIF topic)
focal_class.class_method_signature: LTMTopicMapWriter.writeTopic(TopicIF topic, Writer out)
focal_class.full_signature: private void writeTopic(TopicIF topic, Writer out)
focal_class.identifier: writeTopic
focal_class.modifiers: private
focal_class.parameters: (TopicIF topic, Writer out)
focal_class.return: void
focal_class.signature: void writeTopic(TopicIF topic, Writer out)
focal_class.class_method_signature: LTMTopicMapWriter.writeTopic(TopicIF topic, Writer out, boolean writeHeaders)
focal_class.full_signature: private void writeTopic(TopicIF topic, Writer out, boolean writeHeaders)
focal_class.identifier: writeTopic
focal_class.modifiers: private
focal_class.parameters: (TopicIF topic, Writer out, boolean writeHeaders)
focal_class.return: void
focal_class.signature: void writeTopic(TopicIF topic, Writer out, boolean writeHeaders)
focal_class.class_method_signature: LTMTopicMapWriter.writeAssociation(AssociationIF association, Writer out)
focal_class.full_signature: private void writeAssociation(AssociationIF association, Writer out)
focal_class.identifier: writeAssociation
focal_class.modifiers: private
focal_class.parameters: (AssociationIF association, Writer out)
focal_class.return: void
focal_class.signature: void writeAssociation(AssociationIF association, Writer out)
focal_class.class_method_signature: LTMTopicMapWriter.writeAssociation(AssociationIF association, Writer out,
        boolean writeHeaders)
focal_class.full_signature: private void writeAssociation(AssociationIF association, Writer out,
        boolean writeHeaders)
focal_class.identifier: writeAssociation
focal_class.modifiers: private
focal_class.parameters: (AssociationIF association, Writer out,
        boolean writeHeaders)
focal_class.return: void
focal_class.signature: void writeAssociation(AssociationIF association, Writer out,
        boolean writeHeaders)
focal_class.class_method_signature: LTMTopicMapWriter.repeatString(String string, int length)
focal_class.full_signature: private String repeatString(String string, int length)
focal_class.identifier: repeatString
focal_class.modifiers: private
focal_class.parameters: (String string, int length)
focal_class.return: String
focal_class.signature: String repeatString(String string, int length)
focal_class.class_method_signature: LTMTopicMapWriter.writeSupersub(AssociationIF association, Writer out)
focal_class.full_signature: private void writeSupersub(AssociationIF association, Writer out)
focal_class.identifier: writeSupersub
focal_class.modifiers: private
focal_class.parameters: (AssociationIF association, Writer out)
focal_class.return: void
focal_class.signature: void writeSupersub(AssociationIF association, Writer out)
focal_class.class_method_signature: LTMTopicMapWriter.writeAssociationRole(AssociationRoleIF role, Writer out)
focal_class.full_signature: private void writeAssociationRole(AssociationRoleIF role, Writer out)
focal_class.identifier: writeAssociationRole
focal_class.modifiers: private
focal_class.parameters: (AssociationRoleIF role, Writer out)
focal_class.return: void
focal_class.signature: void writeAssociationRole(AssociationRoleIF role, Writer out)
focal_class.class_method_signature: LTMTopicMapWriter.filterCollection(Collection<E> unfiltered)
focal_class.full_signature: private Collection<E> filterCollection(Collection<E> unfiltered)
focal_class.identifier: filterCollection
focal_class.modifiers: private
focal_class.parameters: (Collection<E> unfiltered)
focal_class.return: Collection<E>
focal_class.signature: Collection<E> filterCollection(Collection<E> unfiltered)
focal_class.class_method_signature: LTMTopicMapWriter.filterOk(Object unfiltered)
focal_class.full_signature: private boolean filterOk(Object unfiltered)
focal_class.identifier: filterOk
focal_class.modifiers: private
focal_class.parameters: (Object unfiltered)
focal_class.return: boolean
focal_class.signature: boolean filterOk(Object unfiltered)
focal_class.class_method_signature: LTMTopicMapWriter.firstNameWithScopingPSI(Collection<VariantNameIF> variants,
        LocatorIF si)
focal_class.full_signature: private VariantNameIF firstNameWithScopingPSI(Collection<VariantNameIF> variants,
        LocatorIF si)
focal_class.identifier: firstNameWithScopingPSI
focal_class.modifiers: private
focal_class.parameters: (Collection<VariantNameIF> variants,
        LocatorIF si)
focal_class.return: VariantNameIF
focal_class.signature: VariantNameIF firstNameWithScopingPSI(Collection<VariantNameIF> variants,
        LocatorIF si)
focal_class.class_method_signature: LTMTopicMapWriter.writeTopicName(TopicNameIF baseName, Writer out,
        String indentString)
focal_class.full_signature: private void writeTopicName(TopicNameIF baseName, Writer out,
        String indentString)
focal_class.identifier: writeTopicName
focal_class.modifiers: private
focal_class.parameters: (TopicNameIF baseName, Writer out,
        String indentString)
focal_class.return: void
focal_class.signature: void writeTopicName(TopicNameIF baseName, Writer out,
        String indentString)
focal_class.class_method_signature: LTMTopicMapWriter.writeVariant(VariantNameIF variant, Writer out)
focal_class.full_signature: private void writeVariant(VariantNameIF variant, Writer out)
focal_class.identifier: writeVariant
focal_class.modifiers: private
focal_class.parameters: (VariantNameIF variant, Writer out)
focal_class.return: void
focal_class.signature: void writeVariant(VariantNameIF variant, Writer out)
focal_class.class_method_signature: LTMTopicMapWriter.writeOccurrence(OccurrenceIF occurrence, Writer out)
focal_class.full_signature: private void writeOccurrence(OccurrenceIF occurrence, Writer out)
focal_class.identifier: writeOccurrence
focal_class.modifiers: private
focal_class.parameters: (OccurrenceIF occurrence, Writer out)
focal_class.return: void
focal_class.signature: void writeOccurrence(OccurrenceIF occurrence, Writer out)
focal_class.class_method_signature: LTMTopicMapWriter.writeReifiers(ReifiableIF reifiable, Writer out)
focal_class.full_signature: private void writeReifiers(ReifiableIF reifiable, Writer out)
focal_class.identifier: writeReifiers
focal_class.modifiers: private
focal_class.parameters: (ReifiableIF reifiable, Writer out)
focal_class.return: void
focal_class.signature: void writeReifiers(ReifiableIF reifiable, Writer out)
focal_class.class_method_signature: LTMTopicMapWriter.writeScope(ScopedIF tmObject, Writer out)
focal_class.full_signature: private void writeScope(ScopedIF tmObject, Writer out)
focal_class.identifier: writeScope
focal_class.modifiers: private
focal_class.parameters: (ScopedIF tmObject, Writer out)
focal_class.return: void
focal_class.signature: void writeScope(ScopedIF tmObject, Writer out)
focal_class.class_method_signature: LTMTopicMapWriter.count(AssociationIF association, AssociationRoleIF role)
focal_class.full_signature: private void count(AssociationIF association, AssociationRoleIF role)
focal_class.identifier: count
focal_class.modifiers: private
focal_class.parameters: (AssociationIF association, AssociationRoleIF role)
focal_class.return: void
focal_class.signature: void count(AssociationIF association, AssociationRoleIF role)
focal_class.class_method_signature: LTMTopicMapWriter.countMaxRolesOf(AssociationIF association)
focal_class.full_signature: private void countMaxRolesOf(AssociationIF association)
focal_class.identifier: countMaxRolesOf
focal_class.modifiers: private
focal_class.parameters: (AssociationIF association)
focal_class.return: void
focal_class.signature: void countMaxRolesOf(AssociationIF association)
focal_class.class_method_signature: LTMTopicMapWriter.maxRolesOf(AssociationIF association)
focal_class.full_signature: private int maxRolesOf(AssociationIF association)
focal_class.identifier: maxRolesOf
focal_class.modifiers: private
focal_class.parameters: (AssociationIF association)
focal_class.return: int
focal_class.signature: int maxRolesOf(AssociationIF association)
focal_class.class_method_signature: LTMTopicMapWriter.countRoles(Collection<AssociationIF> associations)
focal_class.full_signature: private void countRoles(Collection<AssociationIF> associations)
focal_class.identifier: countRoles
focal_class.modifiers: private
focal_class.parameters: (Collection<AssociationIF> associations)
focal_class.return: void
focal_class.signature: void countRoles(Collection<AssociationIF> associations)
focal_class.class_method_signature: LTMTopicMapWriter.existsUnspecifiedRolePlayer(Collection<AssociationIF> associations)
focal_class.full_signature: private boolean existsUnspecifiedRolePlayer(Collection<AssociationIF> associations)
focal_class.identifier: existsUnspecifiedRolePlayer
focal_class.modifiers: private
focal_class.parameters: (Collection<AssociationIF> associations)
focal_class.return: boolean
focal_class.signature: boolean existsUnspecifiedRolePlayer(Collection<AssociationIF> associations)
focal_class.class_method_signature: LTMTopicMapWriter.generateId(TopicIF topic)
focal_class.full_signature: private String generateId(TopicIF topic)
focal_class.identifier: generateId
focal_class.modifiers: private
focal_class.parameters: (TopicIF topic)
focal_class.return: String
focal_class.signature: String generateId(TopicIF topic)
focal_class.class_method_signature: LTMTopicMapWriter.getCount(AssociationIF association, AssociationRoleIF role)
focal_class.full_signature: private Integer getCount(AssociationIF association, AssociationRoleIF role)
focal_class.identifier: getCount
focal_class.modifiers: private
focal_class.parameters: (AssociationIF association, AssociationRoleIF role)
focal_class.return: Integer
focal_class.signature: Integer getCount(AssociationIF association, AssociationRoleIF role)
focal_class.class_method_signature: LTMTopicMapWriter.lazyPlayerElementId(AssociationRoleIF role)
focal_class.full_signature: private String lazyPlayerElementId(AssociationRoleIF role)
focal_class.identifier: lazyPlayerElementId
focal_class.modifiers: private
focal_class.parameters: (AssociationRoleIF role)
focal_class.return: String
focal_class.signature: String lazyPlayerElementId(AssociationRoleIF role)
focal_class.class_method_signature: LTMTopicMapWriter.lazyTypeElementId(TypedIF tmObject)
focal_class.full_signature: private String lazyTypeElementId(TypedIF tmObject)
focal_class.identifier: lazyTypeElementId
focal_class.modifiers: private
focal_class.parameters: (TypedIF tmObject)
focal_class.return: String
focal_class.signature: String lazyTypeElementId(TypedIF tmObject)
focal_class.class_method_signature: LTMTopicMapWriter.preserveId(TopicIF topic)
focal_class.full_signature: private String preserveId(TopicIF topic)
focal_class.identifier: preserveId
focal_class.modifiers: private
focal_class.parameters: (TopicIF topic)
focal_class.return: String
focal_class.signature: String preserveId(TopicIF topic)
focal_class.class_method_signature: LTMTopicMapWriter.recordIds(Collection<TopicIF> topics)
focal_class.full_signature: private void recordIds(Collection<TopicIF> topics)
focal_class.identifier: recordIds
focal_class.modifiers: private
focal_class.parameters: (Collection<TopicIF> topics)
focal_class.return: void
focal_class.signature: void recordIds(Collection<TopicIF> topics)
focal_class.class_method_signature: LTMTopicMapWriter.allDigits(String source)
focal_class.full_signature: private static boolean allDigits(String source)
focal_class.identifier: allDigits
focal_class.modifiers: private static
focal_class.parameters: (String source)
focal_class.return: boolean
focal_class.signature: boolean allDigits(String source)
focal_class.class_method_signature: LTMTopicMapWriter.allSameAs(String source, char sameAs)
focal_class.full_signature: private static boolean allSameAs(String source, char sameAs)
focal_class.identifier: allSameAs
focal_class.modifiers: private static
focal_class.parameters: (String source, char sameAs)
focal_class.return: boolean
focal_class.signature: boolean allSameAs(String source, char sameAs)
focal_class.class_method_signature: LTMTopicMapWriter.createSpaces(int length)
focal_class.full_signature: private static String createSpaces(int length)
focal_class.identifier: createSpaces
focal_class.modifiers: private static
focal_class.parameters: (int length)
focal_class.return: String
focal_class.signature: String createSpaces(int length)
focal_class.class_method_signature: LTMTopicMapWriter.escapeString(String source)
focal_class.full_signature: private static String escapeString(String source)
focal_class.identifier: escapeString
focal_class.modifiers: private static
focal_class.parameters: (String source)
focal_class.return: String
focal_class.signature: String escapeString(String source)
focal_class.class_method_signature: LTMTopicMapWriter.escapeInternalOccurrence(String source)
focal_class.full_signature: private static String escapeInternalOccurrence(String source)
focal_class.identifier: escapeInternalOccurrence
focal_class.modifiers: private static
focal_class.parameters: (String source)
focal_class.return: String
focal_class.signature: String escapeInternalOccurrence(String source)
focal_class.class_method_signature: LTMTopicMapWriter.getFragment(LocatorIF locator)
focal_class.full_signature: private String getFragment(LocatorIF locator)
focal_class.identifier: getFragment
focal_class.modifiers: private
focal_class.parameters: (LocatorIF locator)
focal_class.return: String
focal_class.signature: String getFragment(LocatorIF locator)
focal_class.class_method_signature: LTMTopicMapWriter.validate(String id)
focal_class.full_signature: private boolean validate(String id)
focal_class.identifier: validate
focal_class.modifiers: private
focal_class.parameters: (String id)
focal_class.return: boolean
focal_class.signature: boolean validate(String id)
focal_class.class_method_signature: LTMTopicMapWriter.lazyHasLocator(TopicIF topic, LocatorIF uri)
focal_class.full_signature: private static boolean lazyHasLocator(TopicIF topic, LocatorIF uri)
focal_class.identifier: lazyHasLocator
focal_class.modifiers: private static
focal_class.parameters: (TopicIF topic, LocatorIF uri)
focal_class.return: boolean
focal_class.signature: boolean lazyHasLocator(TopicIF topic, LocatorIF uri)
focal_class.class_method_signature: LTMTopicMapWriter.isReservedId(String fragmentId)
focal_class.full_signature: private static boolean isReservedId(String fragmentId)
focal_class.identifier: isReservedId
focal_class.modifiers: private static
focal_class.parameters: (String fragmentId)
focal_class.return: boolean
focal_class.signature: boolean isReservedId(String fragmentId)
focal_class.class_method_signature: LTMTopicMapWriter.inRange(char lowerBound, char it, char upperBound)
focal_class.full_signature: private static boolean inRange(char lowerBound, char it, char upperBound)
focal_class.identifier: inRange
focal_class.modifiers: private static
focal_class.parameters: (char lowerBound, char it, char upperBound)
focal_class.return: boolean
focal_class.signature: boolean inRange(char lowerBound, char it, char upperBound)
focal_class.class_method_signature: LTMTopicMapWriter.lazyStringCompare(String source1, String source2)
focal_class.full_signature: private static int lazyStringCompare(String source1, String source2)
focal_class.identifier: lazyStringCompare
focal_class.modifiers: private static
focal_class.parameters: (String source1, String source2)
focal_class.return: int
focal_class.signature: int lazyStringCompare(String source1, String source2)
focal_class.class_method_signature: LTMTopicMapWriter.minLengthString(int source, int length)
focal_class.full_signature: private static String minLengthString(int source, int length)
focal_class.identifier: minLengthString
focal_class.modifiers: private static
focal_class.parameters: (int source, int length)
focal_class.return: String
focal_class.signature: String minLengthString(int source, int length)
focal_class.class_method_signature: LTMTopicMapWriter.setAdditionalProperties(Map<String, Object> properties)
focal_class.full_signature: @SuppressWarnings("unchecked") @Override public void setAdditionalProperties(Map<String, Object> properties)
focal_class.identifier: setAdditionalProperties
focal_class.modifiers: @SuppressWarnings("unchecked") @Override public
focal_class.parameters: (Map<String, Object> properties)
focal_class.return: void
focal_class.signature: void setAdditionalProperties(Map<String, Object> properties)
focal_method.body: @Override
    public void write(TopicMapIF tm) throws IOException {
      LocatorIF baseLocator = tm.getStore().getBaseAddress();
      base = (baseLocator == null) ? null : baseLocator.getExternalForm();
      idManager = new IdManager();
  
      ClassInstanceIndexIF classIndex = (ClassInstanceIndexIF)tm.getIndex(
              "net.ontopia.topicmaps.core.index.ClassInstanceIndexIF");
  
      // Check if there are any untyped associations, association roles or
      // occurrences
      boolean existsUntyped = (hasUnfiltered(classIndex.getAssociationRoles(null))
          || hasUnfiltered(classIndex.getAssociations(null)) || hasUnfiltered(classIndex
          .getOccurrences(null)));
  
      Collection<TopicIF> topics = tm.getTopics();
  
      recordIds(topics);
  
      // Get all relevant topics sorted.
      topics = sort(filterCollection(topics), topicComparator);
  
      // Get the topic(s) that reifies the topicmap.
      TopicIF reifier = tm.getReifier();
      // FIXME: no need to treat this as a collection anymore
      Collection<TopicIF> tmReifiers = (reifier == null ? Collections.<TopicIF>emptySet() : Collections.singleton(reifier));
      tmReifiers = filterCollection(tmReifiers);
      topics.removeAll(tmReifiers);
  
      // Get all associations.
      Collection<AssociationIF> allAssociations = filterCollection(tm.getAssociations());
      boolean existsUnspecified = existsUnspecifiedRolePlayer(allAssociations);
  
      // Sort all the topics.
      Collection<TopicIF> topicInstances = sort(topics, topicComparator);
  
      // Filter out the topics that are used to type other topics.
      Collection<TopicIF> topicTypes = topicTypes(topics, topicInstances);
  
      // Filter out the topics that are used to type association roles.
      Collection<TopicIF> roleTypes = roleTypes(allAssociations, topicInstances);
  
      // Filter out the topics that are used to type associations.
      Collection<TopicIF> associationTypes = associationTypes(allAssociations,
          topicInstances);
  
      // Filter out the topics that are used to type occurrences.
      Collection<TopicIF> occurrenceTypes = occurrenceTypes(topics, topicInstances);
  
      // Count up the number of associations that a particular role, e.g.
      // "player : type" takes part in.
      countRoles(allAssociations);
  
      // Get all the associations in correct output order.
      allAssociations = sort(allAssociations, associationComparator);
  
      // Filter out all superclass/subclass associations
      TopicIF supersubtype = tm.getTopicBySubjectIdentifier(PSI
          .getXTMSuperclassSubclass());
      Collection<AssociationIF> supersubAssociations = classIndex.getAssociations(supersubtype);
      supersubAssociations = filterCollection(supersubAssociations);
      allAssociations.removeAll(supersubAssociations);
  
      // Filter out the associations that have roles reifying the topic map.
      Collection<AssociationIF> tmReifierAssociations = playerAssociations(tmReifiers,
          allAssociations);
  
      // Output preamble.
      if (encoding != null)
        out.write("@\"" + encoding + "\"\n");
      out.write("#VERSION \"1.3\"\n");
      out.write("/*\n   Generator: Ontopia");
      out.write("\n   Date:      ");
      out.write(minLengthString(calendar.get(Calendar.YEAR), 4));
      out.write('-');
      out.write(minLengthString(calendar.get(Calendar.MONTH)+1, 2));
      out.write('-');
      out.write(minLengthString(calendar.get(Calendar.DAY_OF_MONTH), 2));
      out.write(' ');
      out.write(minLengthString(calendar.get(Calendar.HOUR_OF_DAY), 2));
      out.write(':');
      out.write(minLengthString(calendar.get(Calendar.MINUTE), 2));
      out.write("\n*/\n");
  
      for (String key : prefixes.keySet()) {
        out.write("#PREFIX " + key + " @\"" + prefixes.get(key) + "\"\n");
      }
  
      // If necessary, output the prefix for untyped topic map constructs.
      if (existsUntyped)
        out.write("\n#PREFIX untyped @\"http://psi.ontopia.net/ltm/untyped#\"\n");
  
      // If necessary, output prefix for unspecified topic map constructs(roles).
      if (existsUnspecified) {
        out.write("\n#PREFIX unspecified");
        out.write(" @\"http://psi.ontopia.net/ltm/unspecified#\"\n");
      }
  
      // If necessary, output the TOPICMAP directive with any topic reification.
      Iterator<TopicIF> tmReifiersIt = tmReifiers.iterator();
      if (!tmReifiers.isEmpty()) {
        out.write("\n/* ----------------- TOPIC MAP ----------------- */\n");
        out.write("\n#TOPICMAP");
        writeReifiers(tm, out);
        out.write("\n");
  
        // Output the topic map reifier(s)(usually one).
        groupString1 = "";
        tmReifiersIt = tmReifiers.iterator();
  
        // Output the reifiers
        while (tmReifiersIt.hasNext())
          writeTopic(tmReifiersIt.next(), out, false);
      }
  
      // Output all associations that the tm reifier(s) are directly involved in.
      groupString1 = "";
      Iterator<AssociationIF> tmReifierAssociationsIt = tmReifierAssociations.iterator();
      while (tmReifierAssociationsIt.hasNext())
        writeAssociation(tmReifierAssociationsIt.next(), out,
            false);
  
      out.write("\n/* ----------------- ONTOLOGY ------------------ */\n");
  
      out.write("\n/* ----------------- Topic Types --------------- */\n");
  
      // Output all the topic types.
      writeTopics(topicTypes);
  
      out.write("\n/* ----------------- Type Hierarchy ------------ */\n");
  
      // Write all supertype subtype associations
      groupString1 = "";
      Iterator<AssociationIF> hierarchyIt = sort(supersubAssociations, supersubComparator)
          .iterator();
      if (hierarchyIt.hasNext())
        out.write("\n");
      while (hierarchyIt.hasNext()) {
        AssociationIF currentAssociation = hierarchyIt.next();
        writeSupersub(currentAssociation, out);
      }
  
      out.write("\n/* ----------------- Role Types ---------------- */\n");
      // Write all remaining association role types.
      writeTopics(roleTypes);
  
      out.write("\n/* ----------------- Association Types --------- */\n");
      // Write all remaining association types
      writeTopics(associationTypes);
  
      out.write("\n/* ----------------- Occurrence Types ---------- */\n");
      // Write all remaining occurrence types
      writeTopics(occurrenceTypes);
  
      out.write("\n/* ----------------- INSTANCES ----------------- */\n");
  
      out.write("\n/* ----------------- Topics -------------------- */\n");
      // Write all remaining instance topics
      writeTopics(topicInstances);
  
      out.write("\n/* ----------------- Associations -------------- */\n");
      // Write all remaining associations
      groupString1 = "";
      Iterator<AssociationIF> associationsIt = allAssociations.iterator();
      while (associationsIt.hasNext())
        writeAssociation(associationsIt.next(), out);
  
      out.flush();
      
      if (closeWriter) {
        out.close();
      }
    }
focal_method.class_method_signature: LTMTopicMapWriter.write(TopicMapIF tm)
focal_method.full_signature: @Override public void write(TopicMapIF tm)
focal_method.identifier: write
focal_method.invocations: getBaseAddress getStore getExternalForm getIndex hasUnfiltered getAssociationRoles hasUnfiltered getAssociations hasUnfiltered getOccurrences getTopics recordIds sort filterCollection getReifier emptySet singleton filterCollection removeAll filterCollection getAssociations existsUnspecifiedRolePlayer sort topicTypes roleTypes associationTypes occurrenceTypes countRoles sort getTopicBySubjectIdentifier getXTMSuperclassSubclass getAssociations filterCollection removeAll playerAssociations write write write write write minLengthString get write write minLengthString get write write minLengthString get write write minLengthString get write write minLengthString get write keySet write get write write write iterator isEmpty write write writeReifiers write iterator hasNext writeTopic next iterator hasNext writeAssociation next write write writeTopics write iterator sort hasNext write hasNext next writeSupersub write writeTopics write writeTopics write writeTopics write write writeTopics write iterator hasNext writeAssociation next flush close
focal_method.modifiers: @Override public
focal_method.parameters: (TopicMapIF tm)
focal_method.return: void
focal_method.signature: void write(TopicMapIF tm)