/** * A utility method to ensure a proper naming for prefix URI */ private static String getProperPrefixURI(String prefixUri) { if (!prefixUri.endsWith("#")) { if (!prefixUri.endsWith("/")) { String defaultSeparator = EntityCreationPreferences.getDefaultSeparator(); if (!prefixUri.endsWith(defaultSeparator)) { prefixUri += defaultSeparator; } } } return prefixUri; } }
protected IRI createIRI(String fragment, IRI baseIRI) throws URISyntaxException { fragment = fragment.replace(" ", "_"); if (baseIRI == null){ if (useDefaultBaseIRI()){ baseIRI = EntityCreationPreferences.getDefaultBaseIRI(); } else{ baseIRI = mngr.getActiveOntology().getOntologyID().getOntologyIRI(); } } String base = baseIRI.toString().replace(" ", "_"); if (!base.endsWith("#") && !base.endsWith("/")) { base += EntityCreationPreferences.getDefaultSeparator(); } return IRI.create(new URI(base + fragment)); }
protected IRI createIRI(String fragment, IRI baseIRI) throws URISyntaxException { fragment = fragment.replace(" ", "_"); if (baseIRI == null){ if (useDefaultBaseIRI()){ baseIRI = EntityCreationPreferences.getDefaultBaseIRI(); } else{ baseIRI = mngr.getActiveOntology().getOntologyID().getOntologyIRI().get(); } } String base = baseIRI.toString().replace(" ", "_"); if (!base.endsWith("#") && !base.endsWith("/")) { base += EntityCreationPreferences.getDefaultSeparator(); } return IRI.create(new URI(base + fragment)); }
protected IRI createIRI(String fragment, IRI baseIRI) throws URISyntaxException { fragment = fragment.replace(" ", "_"); if (baseIRI == null){ if (useDefaultBaseIRI()){ baseIRI = EntityCreationPreferences.getDefaultBaseIRI(); } else{ baseIRI = mngr.getActiveOntology().getOntologyID().getOntologyIRI().get(); } } String base = baseIRI.toString().replace(" ", "_"); if (!base.endsWith("#") && !base.endsWith("/")) { base += EntityCreationPreferences.getDefaultSeparator(); } return IRI.create(new URI(base + fragment)); }
c.insets = new Insets(11,0,0,0); hashButton = new JRadioButton(SEP_HASH); hashButton.setSelected(EntityCreationPreferences.getDefaultSeparator().equals(SEP_HASH)); panel.add(hashButton, c); c.insets = new Insets(0,0,0,0); slashButton = new JRadioButton(SEP_SLASH); slashButton.setSelected(EntityCreationPreferences.getDefaultSeparator().equals(SEP_SLASH)); panel.add(slashButton, c); c.insets = new Insets(0,0,0,0); colonButton = new JRadioButton(SEP_COLON); colonButton.setSelected(EntityCreationPreferences.getDefaultSeparator().equals(SEP_COLON)); panel.add(colonButton, c);
c.insets = new Insets(11,0,0,0); hashButton = new JRadioButton(SEP_HASH); hashButton.setSelected(EntityCreationPreferences.getDefaultSeparator().equals(SEP_HASH)); panel.add(hashButton, c); c.insets = new Insets(0,0,0,0); slashButton = new JRadioButton(SEP_SLASH); slashButton.setSelected(EntityCreationPreferences.getDefaultSeparator().equals(SEP_SLASH)); panel.add(slashButton, c); c.insets = new Insets(0,0,0,0); colonButton = new JRadioButton(SEP_COLON); colonButton.setSelected(EntityCreationPreferences.getDefaultSeparator().equals(SEP_COLON)); panel.add(colonButton, c);
c.insets = new Insets(11,0,0,0); hashButton = new JRadioButton(SEP_HASH); hashButton.setSelected(EntityCreationPreferences.getDefaultSeparator().equals(SEP_HASH)); panel.add(hashButton, c); c.insets = new Insets(0,0,0,0); slashButton = new JRadioButton(SEP_SLASH); slashButton.setSelected(EntityCreationPreferences.getDefaultSeparator().equals(SEP_SLASH)); panel.add(slashButton, c); c.insets = new Insets(0,0,0,0); colonButton = new JRadioButton(SEP_COLON); colonButton.setSelected(EntityCreationPreferences.getDefaultSeparator().equals(SEP_COLON)); panel.add(colonButton, c);
c.insets = new Insets(11,0,0,0); hashButton = new JRadioButton(SEP_HASH); hashButton.setSelected(EntityCreationPreferences.getDefaultSeparator().equals(SEP_HASH)); panel.add(hashButton, c); c.insets = new Insets(0,0,0,0); slashButton = new JRadioButton(SEP_SLASH); slashButton.setSelected(EntityCreationPreferences.getDefaultSeparator().equals(SEP_SLASH)); panel.add(slashButton, c); c.insets = new Insets(0,0,0,0); colonButton = new JRadioButton(SEP_COLON); colonButton.setSelected(EntityCreationPreferences.getDefaultSeparator().equals(SEP_COLON)); panel.add(colonButton, c);
protected IRI createIRI(String fragment, IRI baseIRI) throws URISyntaxException { fragment = fragment.replace(" ", "_"); if (baseIRI == null){ if (useDefaultBaseIRI()){ baseIRI = EntityCreationPreferences.getDefaultBaseIRI(); } else{ baseIRI = mngr.getActiveOntology().getOntologyID().getOntologyIRI(); } } String base = baseIRI.toString().replace(" ", "_"); if (!base.endsWith("#") && !base.endsWith("/")) { base += EntityCreationPreferences.getDefaultSeparator(); } return IRI.create(new URI(base + fragment)); }